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

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 unit test crashes 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
Index: Source/core/html/canvas/WebGLRenderingContextBase.cpp
diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
index 9d6a9ace57765c7b1ceb41bb2c626508620b71b2..0ea3186e0f9efa79f753ddea03e2a24fada01cb8 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
@@ -3766,7 +3766,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());
}
@@ -3956,7 +3957,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,

Powered by Google App Engine
This is Rietveld 408576698