Skip to content

Commit

Permalink
ImageBuffer has unused WebGL related functions
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=261865
rdar://115826789

Reviewed by Antti Koivisto.

Remove the unused functions.

* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::copyToPlatformTexture const): Deleted.
* Source/WebCore/platform/graphics/ImageBuffer.h:
* Source/WebCore/platform/graphics/ImageBufferBackend.h:
(WebCore::ImageBufferBackend::copyToPlatformTexture): Deleted.

Canonical link: https://commits.webkit.org/268249@main
  • Loading branch information
kkinnunen-apple committed Sep 21, 2023
1 parent 967c25e commit 507f229
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
7 changes: 0 additions & 7 deletions Source/WebCore/platform/graphics/ImageBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,13 +491,6 @@ void ImageBuffer::putPixelBuffer(const PixelBuffer& pixelBuffer, const IntRect&
backend->putPixelBuffer(pixelBuffer, sourceRectScaled, destinationPointScaled, destinationFormat);
}

bool ImageBuffer::copyToPlatformTexture(GraphicsContextGL& context, GCGLenum target, PlatformGLObject destinationTexture, GCGLenum internalformat, bool premultiplyAlpha, bool flipY) const
{
if (auto* backend = ensureBackendCreated())
return backend->copyToPlatformTexture(context, target, destinationTexture, internalformat, premultiplyAlpha, flipY);
return false;
}

bool ImageBuffer::isInUse() const
{
if (auto* backend = ensureBackendCreated())
Expand Down
3 changes: 0 additions & 3 deletions Source/WebCore/platform/graphics/ImageBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,6 @@ class ImageBuffer : public ThreadSafeRefCountedAndCanMakeThreadSafeWeakPtr<Image
WEBCORE_EXPORT virtual RefPtr<PixelBuffer> getPixelBuffer(const PixelBufferFormat& outputFormat, const IntRect& srcRect, const ImageBufferAllocator& = ImageBufferAllocator()) const;
WEBCORE_EXPORT virtual void putPixelBuffer(const PixelBuffer&, const IntRect& srcRect, const IntPoint& destPoint = { }, AlphaPremultiplication destFormat = AlphaPremultiplication::Premultiplied);

PlatformLayer* platformLayer() const;
bool copyToPlatformTexture(GraphicsContextGL&, GCGLenum target, PlatformGLObject destinationTexture, GCGLenum internalformat, bool premultiplyAlpha, bool flipY) const;

WEBCORE_EXPORT bool isInUse() const;
WEBCORE_EXPORT void releaseGraphicsContext();
WEBCORE_EXPORT bool setVolatile();
Expand Down
2 changes: 0 additions & 2 deletions Source/WebCore/platform/graphics/ImageBufferBackend.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ class ImageBufferBackend {
virtual void getPixelBuffer(const IntRect& srcRect, PixelBuffer& destination) = 0;
virtual void putPixelBuffer(const PixelBuffer&, const IntRect& srcRect, const IntPoint& destPoint, AlphaPremultiplication destFormat) = 0;

virtual bool copyToPlatformTexture(GraphicsContextGL&, GCGLenum, PlatformGLObject, GCGLenum, bool, bool) { return false; }

#if USE(CAIRO)
virtual RefPtr<cairo_surface_t> createCairoSurface() { return nullptr; }
#endif
Expand Down

0 comments on commit 507f229

Please sign in to comment.