summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/Source
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/WebKit/Source')
-rw-r--r--third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp5
-rw-r--r--third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h4
-rw-r--r--third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp1
-rw-r--r--third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp1
4 files changed, 6 insertions, 5 deletions
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
index 5e7d0d3..21d3da2 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) {
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
index dcb87d5..df6f231 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
@@ -60,9 +60,7 @@ class SharedContextRateLimiter;
#define CANVAS2D_HIBERNATION_ENABLED 0
// IOSurfaces are a primitive only present on OS X.
-// Temporarily disable IOSurfaces while investigating a compositing bug.
-// https://crbug.com/595063
-#define USE_IOSURFACE_FOR_2D_CANVAS 0
+#define USE_IOSURFACE_FOR_2D_CANVAS 1
#else
#define CANVAS2D_HIBERNATION_ENABLED 1
#define USE_IOSURFACE_FOR_2D_CANVAS 0
diff --git a/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp b/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
index 8b76f1e..64a4543 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
@@ -207,6 +207,7 @@ bool ImageBuffer::copyToPlatformTexture(WebGraphicsContext3D* context, Platform3
return false;
OwnPtr<WebExternalTextureMailbox> mailbox = adoptPtr(new WebExternalTextureMailbox);
+ mailbox->textureSize = WebSize(textureImage->width(), textureImage->height());
// Contexts may be in a different share group. We must transfer the texture through a mailbox first
sharedContext->genMailboxCHROMIUM(mailbox->name);
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
index 3b361f7..6234643 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -306,6 +306,7 @@ bool DrawingBuffer::prepareMailbox(WebExternalTextureMailbox* outMailbox, WebExt
frontColorBufferMailbox->mailbox.validSyncToken = m_context->genSyncTokenCHROMIUM(fenceSync, frontColorBufferMailbox->mailbox.syncToken);
frontColorBufferMailbox->mailbox.allowOverlay = frontColorBufferMailbox->textureInfo.imageId != 0;
frontColorBufferMailbox->mailbox.textureTarget = frontColorBufferMailbox->textureInfo.parameters.target;
+ frontColorBufferMailbox->mailbox.textureSize = WebSize(m_size.width(), m_size.height());
setBufferClearNeeded(true);
// set m_parentDrawingBuffer to make sure 'this' stays alive as long as it has live mailboxes