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

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

Issue 1814263004: Remove create/delete methods from WebGraphicsContext3D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@complex-casts
Patch Set: Created 4 years, 9 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: 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 edc710bc2dc45728b2766e0120b9f006f3e402d8..01d472f2140ff937a1d0748f398b20ad5d50a65e 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
@@ -257,12 +257,8 @@ Canvas2DLayerBridge::ImageInfo Canvas2DLayerBridge::createIOSurfaceBackedTexture
if (!imageId)
return Canvas2DLayerBridge::ImageInfo();
- GLuint textureId= webContext->createTexture();
- if (!textureId) {
- gl->DestroyImageCHROMIUM(imageId);
- return Canvas2DLayerBridge::ImageInfo();
- }
-
+ uint32_t textureId;
+ gl->GenTextures(1, &textureId);
GLenum target = GC3D_TEXTURE_RECTANGLE_ARB;
gl->BindTexture(target, textureId);
gl->TexParameteri(target, GL_TEXTURE_MAG_FILTER, getGLFilter());
@@ -285,7 +281,7 @@ void Canvas2DLayerBridge::deleteCHROMIUMImage(ImageInfo info)
gl->BindTexture(target, info.m_textureId);
gl->ReleaseTexImage2DCHROMIUM(target, info.m_imageId);
gl->DestroyImageCHROMIUM(info.m_imageId);
- webContext->deleteTexture(info.m_textureId);
+ gl->DeleteTextures(1, &info.m_textureId);
gl->BindTexture(target, 0);
resetSkiaTextureBinding();

Powered by Google App Engine
This is Rietveld 408576698