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

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

Issue 1804243002: Re-enable IOSurface Canvas2D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile errors from rebase, still... 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 5e7d0d3f45c2f6a54b9b87821eebb1963c0803f4..21d3da230dc7f2d3f92a359faf98267abc2f4685 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
@@ -274,11 +274,11 @@ Canvas2DLayerBridge::ImageInfo Canvas2DLayerBridge::createIOSurfaceBackedTexture
void Canvas2DLayerBridge::deleteCHROMIUMImage(ImageInfo info)
{
- WebGraphicsContext3D* webContext = context();
- if (webContext->isContextLost())
+ if (m_contextProvider->contextGL()->GetGraphicsResetStatusKHR() != GL_NO_ERROR)
return;
GLenum target = GC3D_TEXTURE_RECTANGLE_ARB;
+ WebGraphicsContext3D* webContext = context();
webContext->bindTexture(target, info.m_textureId);
webContext->releaseTexImage2DCHROMIUM(target, info.m_imageId);
webContext->destroyImageCHROMIUM(info.m_imageId);
@@ -309,6 +309,7 @@ bool Canvas2DLayerBridge::prepareMailboxFromImage(PassRefPtr<SkImage> image, Web
createMailboxInfo();
MailboxInfo& mailboxInfo = m_mailboxes.first();
mailboxInfo.m_mailbox.nearestNeighbor = getGLFilter() == GL_NEAREST;
+ mailboxInfo.m_mailbox.textureSize = WebSize(m_size.width(), m_size.height());
GrContext* grContext = m_contextProvider->grContext();
if (!grContext) {

Powered by Google App Engine
This is Rietveld 408576698