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

Unified Diff: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp

Issue 1508903002: Use GrGLTextureInfo for Skia texture handles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ignore_gl_target
Patch Set: update assertions Created 5 years 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: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
index 249ab194cb75d2c5f2c35d21f6cc6f4bbf896afe..50b517fe975ddc3878197b5558ed8d29d4e9390e 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
@@ -43,6 +43,7 @@
#include "third_party/skia/include/core/SkPictureRecorder.h"
#include "third_party/skia/include/core/SkSurface.h"
#include "third_party/skia/include/gpu/GrContext.h"
+#include "third_party/skia/include/gpu/gl/GrGLTypes.h"
#include "wtf/RefCountedLeakCounter.h"
namespace {
@@ -602,7 +603,8 @@ bool Canvas2DLayerBridge::prepareMailbox(WebExternalTextureMailbox* outMailbox,
// in SkSurface_Gpu does not make any false assumptions.
mailboxInfo.m_image->getTexture()->textureParamsModified();
- webContext->bindTexture(GL_TEXTURE_2D, mailboxInfo.m_image->getTexture()->getTextureHandle());
+ GLuint textureID = reinterpret_cast<const GrGLTextureInfo*>(mailboxInfo.m_image->getTexture()->getTextureHandle())->fID;
+ webContext->bindTexture(GL_TEXTURE_2D, textureID);
webContext->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter);
webContext->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter);
webContext->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);

Powered by Google App Engine
This is Rietveld 408576698