[webkit-changes] [WebKit/WebKit] 6b85e2: Have GraphicsContextGLImageExtractor::imagePixelDa...

Chris Dumez noreply at github.com
Thu Jan 16 17:25:09 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6b85e2966feb4124d40326b2f227102ff954e088
      https://github.com/WebKit/WebKit/commit/6b85e2966feb4124d40326b2f227102ff954e088
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2025-01-16 (Thu, 16 Jan 2025)

  Changed paths:
    M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
    M Source/WebCore/platform/graphics/GraphicsContextGLImageExtractor.h
    M Source/WebCore/platform/graphics/cairo/GraphicsContextGLCairo.cpp
    M Source/WebCore/platform/graphics/cg/GraphicsContextGLCG.cpp
    M Source/WebCore/platform/graphics/skia/GraphicsContextGLSkia.cpp
    M Source/WebCore/platform/graphics/skia/ImageBufferSkiaUnacceleratedBackend.cpp
    M Source/WebCore/platform/graphics/skia/SkiaSpanExtras.h

  Log Message:
  -----------
  Have GraphicsContextGLImageExtractor::imagePixelData() return a span
https://bugs.webkit.org/show_bug.cgi?id=286096

Reviewed by Geoffrey Garen.

This also addresses the issue where the data size is not always correctly
calculated in WebGLRenderingContextBase::texImageImpl(), which was preventing
me from doing further bounds checking (since the span has the wrong size).

* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::texImageImpl):
* Source/WebCore/platform/graphics/GraphicsContextGLImageExtractor.h:
(WebCore::GraphicsContextGLImageExtractor::imagePixelData):
* Source/WebCore/platform/graphics/cairo/GraphicsContextGLCairo.cpp:
(WebCore::span):
(WebCore::GraphicsContextGLImageExtractor::extractImage):
* Source/WebCore/platform/graphics/cg/GraphicsContextGLCG.cpp:
(WebCore::GraphicsContextGLImageExtractor::extractImage):
* Source/WebCore/platform/graphics/skia/GraphicsContextGLSkia.cpp:
(WebCore::GraphicsContextGLImageExtractor::extractImage):
* Source/WebCore/platform/graphics/skia/ImageBufferSkiaUnacceleratedBackend.cpp:
(WebCore::span): Deleted.
(WebCore::mutableSpan): Deleted.
* Source/WebCore/platform/graphics/skia/SkiaSpanExtras.h:
(WebCore::span):
(WebCore::mutableSpan):

Canonical link: https://commits.webkit.org/289032@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list