| 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 31c459fa95afe7fd0a177137d92dbf0fbfc5de2a..23fa6e996adcd8e231e18308710bb7b2787ceec0 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
|
| @@ -258,8 +258,12 @@
|
| if (!imageId)
|
| return Canvas2DLayerBridge::ImageInfo();
|
|
|
| - GLuint textureId;
|
| - gl->GenTextures(1, &textureId);
|
| + GLuint textureId= webContext->createTexture();
|
| + if (!textureId) {
|
| + gl->DestroyImageCHROMIUM(imageId);
|
| + return Canvas2DLayerBridge::ImageInfo();
|
| + }
|
| +
|
| GLenum target = GC3D_TEXTURE_RECTANGLE_ARB;
|
| gl->BindTexture(target, textureId);
|
| gl->TexParameteri(target, GL_TEXTURE_MAG_FILTER, getGLFilter());
|
| @@ -282,7 +286,7 @@
|
| gl->BindTexture(target, info.m_textureId);
|
| gl->ReleaseTexImage2DCHROMIUM(target, info.m_imageId);
|
| gl->DestroyImageCHROMIUM(info.m_imageId);
|
| - gl->DeleteTextures(1, &info.m_textureId);
|
| + webContext->deleteTexture(info.m_textureId);
|
| gl->BindTexture(target, 0);
|
|
|
| resetSkiaTextureBinding();
|
|
|