| 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 26b0e05b6e465bd57b5b9aca82a0664eee844266..ade818e8529103e067bb98c1640c83c9694bce02 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
|
| @@ -252,18 +252,13 @@ Canvas2DLayerBridge::ImageInfo Canvas2DLayerBridge::createIOSurfaceBackedTexture
|
| return info;
|
| }
|
|
|
| - WebGraphicsContext3D* webContext = context();
|
| gpu::gles2::GLES2Interface* gl = contextGL();
|
| GLuint imageId = gl->CreateGpuMemoryBufferImageCHROMIUM(m_size.width(), m_size.height(), GL_BGRA_EXT, GC3D_SCANOUT_CHROMIUM);
|
| if (!imageId)
|
| return Canvas2DLayerBridge::ImageInfo();
|
|
|
| - GLuint textureId= webContext->createTexture();
|
| - if (!textureId) {
|
| - gl->DestroyImageCHROMIUM(imageId);
|
| - return Canvas2DLayerBridge::ImageInfo();
|
| - }
|
| -
|
| + GLuint textureId;
|
| + gl->GenTextures(1, &textureId);
|
| GLenum target = GC3D_TEXTURE_RECTANGLE_ARB;
|
| gl->BindTexture(target, textureId);
|
| gl->TexParameteri(target, GL_TEXTURE_MAG_FILTER, getGLFilter());
|
| @@ -277,7 +272,6 @@ Canvas2DLayerBridge::ImageInfo Canvas2DLayerBridge::createIOSurfaceBackedTexture
|
|
|
| void Canvas2DLayerBridge::deleteCHROMIUMImage(ImageInfo info)
|
| {
|
| - WebGraphicsContext3D* webContext = context();
|
| gpu::gles2::GLES2Interface* gl = contextGL();
|
| if (gl->GetGraphicsResetStatusKHR() != GL_NO_ERROR)
|
| return;
|
| @@ -286,7 +280,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();
|
|
|