Index: Source/platform/graphics/ImageBuffer.cpp |
diff --git a/Source/platform/graphics/ImageBuffer.cpp b/Source/platform/graphics/ImageBuffer.cpp |
index 33c9cfec1b66d484e242eb7c10008965f269963b..22ddbc2e86a9937dbc0af9cc9443b2daf415fcf8 100644 |
--- a/Source/platform/graphics/ImageBuffer.cpp |
+++ b/Source/platform/graphics/ImageBuffer.cpp |
@@ -36,7 +36,6 @@ |
#include "platform/MIMETypeRegistry.h" |
#include "platform/geometry/IntRect.h" |
#include "platform/graphics/BitmapImage.h" |
-#include "platform/graphics/Extensions3D.h" |
#include "platform/graphics/GraphicsContext.h" |
#include "platform/graphics/GraphicsContext3D.h" |
#include "platform/graphics/UnacceleratedImageBufferSurface.h" |
@@ -48,6 +47,7 @@ |
#include "platform/image-encoders/skia/PNGImageEncoder.h" |
#include "platform/image-encoders/skia/WEBPImageEncoder.h" |
#include "public/platform/Platform.h" |
+#include "public/platform/WebGraphicsContext3D.h" |
#include "third_party/skia/include/effects/SkTableColorFilter.h" |
#include "wtf/MathExtras.h" |
#include "wtf/text/Base64.h" |
@@ -134,20 +134,19 @@ bool ImageBuffer::copyToPlatformTexture(GraphicsContext3D& context, Platform3DOb |
if (!context.makeContextCurrent()) |
return false; |
- Extensions3D* extensions = context.extensions(); |
- if (!extensions->supports("GL_CHROMIUM_copy_texture") || !extensions->supports("GL_CHROMIUM_flipy") |
- || !extensions->canUseCopyTextureCHROMIUM(internalFormat, destType, level)) |
+ if (!context.supportsExtension("GL_CHROMIUM_copy_texture") || !context.supportsExtension("GL_CHROMIUM_flipy") |
+ || !context.canUseCopyTextureCHROMIUM(internalFormat, destType, level)) |
return false; |
// The canvas is stored in a premultiplied format, so unpremultiply if necessary. |
- context.pixelStorei(Extensions3D::UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, !premultiplyAlpha); |
+ context.pixelStorei(GC3D_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, !premultiplyAlpha); |
// The canvas is stored in an inverted position, so the flip semantics are reversed. |
- context.pixelStorei(Extensions3D::UNPACK_FLIP_Y_CHROMIUM, !flipY); |
- extensions->copyTextureCHROMIUM(GL_TEXTURE_2D, getBackingTexture(), texture, level, internalFormat, destType); |
+ context.pixelStorei(GC3D_UNPACK_FLIP_Y_CHROMIUM, !flipY); |
+ context.webContext()->copyTextureCHROMIUM(GL_TEXTURE_2D, getBackingTexture(), texture, level, internalFormat, destType); |
- context.pixelStorei(Extensions3D::UNPACK_FLIP_Y_CHROMIUM, false); |
- context.pixelStorei(Extensions3D::UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, false); |
+ context.pixelStorei(GC3D_UNPACK_FLIP_Y_CHROMIUM, false); |
+ context.pixelStorei(GC3D_UNPACK_UNPREMULTIPLY_ALPHA_CHROMIUM, false); |
context.flush(); |
return true; |
} |