Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1355)

Unified Diff: Source/platform/graphics/ImageBuffer.cpp

Issue 127163003: Completely removed the Extensions3D class (Take 2) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}
« no previous file with comments | « Source/platform/graphics/GraphicsTypes3D.h ('k') | Source/platform/graphics/filters/custom/FECustomFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698