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

Unified Diff: Source/core/html/canvas/WebGLRenderingContextBase.cpp

Issue 1170523002: Removing GraphicsContext from ImageBuffer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix for shape bug Created 5 years, 6 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
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/core/layout/shapes/Shape.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/canvas/WebGLRenderingContextBase.cpp
diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
index 177893cd0e25848484b4d2a88363ac1d16799430..0de60d442fa09bf2852f82e317b2e02e28247600 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
@@ -3748,7 +3748,8 @@ PassRefPtr<Image> WebGLRenderingContextBase::drawImageIntoBuffer(Image* image, i
IntRect srcRect(IntPoint(), image->size());
IntRect destRect(0, 0, size.width(), size.height());
- buf->context()->drawImage(image, destRect, srcRect);
+ SkPaint paint;
+ image->draw(buf->canvas(), paint, destRect, srcRect, DoNotRespectImageOrientation, Image::DoNotClampImageToSourceRect);
return buf->copyImage(ImageBuffer::fastCopyImageMode());
}
@@ -3938,7 +3939,7 @@ void WebGLRenderingContextBase::texImage2D(GLenum target, GLint level, GLenum in
// we enable the WebMediaPlayer implementation to do any necessary color space conversion on the GPU (though it
// may still do a CPU conversion and upload the results).
video->paintCurrentFrame(imageBuffer->canvas(), IntRect(0, 0, video->videoWidth(), video->videoHeight()), nullptr);
- imageBuffer->context()->canvas()->flush();
+ imageBuffer->canvas()->flush();
// This is a straight GPU-GPU copy, any necessary color space conversion was handled in the paintCurrentFrameInContext() call.
if (imageBuffer->copyToPlatformTexture(webContext(), texture->object(), internalformat, type,
« no previous file with comments | « Source/core/frame/LocalFrame.cpp ('k') | Source/core/layout/shapes/Shape.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698