| Index: third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp b/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
|
| index 285fb50e74bf138f5d068d4b0974d5613fbfbdf8..6a8122525ca208f937c22c0ff059fda940129336 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
|
| @@ -228,9 +228,8 @@ bool ImageBuffer::copyToPlatformTexture(gpu::gles2::GLES2Interface* gl,
|
| if (!m_surface->isAccelerated())
|
| return false;
|
|
|
| - ASSERT(
|
| - textureImage
|
| - ->isTextureBacked()); // isAccelerated() check above should guarantee this
|
| + DCHECK(textureImage->isTextureBacked()); // The isAccelerated() check above
|
| + // should guarantee this.
|
| // Get the texture ID, flushing pending operations if needed.
|
| const GrGLTextureInfo* textureInfo = skia::GrBackendObjectToGrGLTextureInfo(
|
| textureImage->getTextureHandle(true));
|
| @@ -246,7 +245,8 @@ bool ImageBuffer::copyToPlatformTexture(gpu::gles2::GLES2Interface* gl,
|
| gpu::Mailbox mailbox;
|
| IntSize textureSize(textureImage->width(), textureImage->height());
|
|
|
| - // Contexts may be in a different share group. We must transfer the texture through a mailbox first
|
| + // Contexts may be in a different share group. We must transfer the texture
|
| + // through a mailbox first.
|
| sharedGL->GenMailboxCHROMIUM(mailbox.name);
|
| sharedGL->ProduceTextureDirectCHROMIUM(textureInfo->fID, textureInfo->fTarget,
|
| mailbox.name);
|
| @@ -260,8 +260,9 @@ bool ImageBuffer::copyToPlatformTexture(gpu::gles2::GLES2Interface* gl,
|
| GLuint sourceTexture =
|
| gl->CreateAndConsumeTextureCHROMIUM(textureInfo->fTarget, mailbox.name);
|
|
|
| - // The canvas is stored in a premultiplied format, so unpremultiply if necessary.
|
| - // The canvas is stored in an inverted position, so the flip semantics are reversed.
|
| + // The canvas is stored in a premultiplied format, so unpremultiply if
|
| + // necessary. The canvas is also stored in an inverted position, so the flip
|
| + // semantics are reversed.
|
| gl->CopyTextureCHROMIUM(sourceTexture, texture, internalFormat, destType,
|
| flipY ? GL_FALSE : GL_TRUE, GL_FALSE,
|
| premultiplyAlpha ? GL_FALSE : GL_TRUE);
|
|
|