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

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

Issue 1093673002: Removing the dependency on GraphicsContext for drawing images in 2D canvas (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: pdr corrections + needsrebaselines Created 5 years, 7 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 81550c6b5c79f743e923a2ce6fb6608fa4b07017..f34d77d1d06a859406056d6036494728b1a3c0cf 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
@@ -3906,7 +3906,7 @@ PassRefPtr<Image> WebGLRenderingContextBase::videoFrameToImage(HTMLVideoElement*
return nullptr;
}
IntRect destRect(0, 0, size.width(), size.height());
- video->paintCurrentFrameInContext(buf->context(), destRect);
+ video->paintCurrentFrame(buf->canvas(), destRect, nullptr);
return buf->copyImage(backingStoreCopy);
}
@@ -3935,7 +3935,7 @@ void WebGLRenderingContextBase::texImage2D(GLenum target, GLint level, GLenum in
// The video element paints an RGBA frame into our surface here. By using an AcceleratedImageBufferSurface,
// 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->paintCurrentFrameInContext(imageBuffer->context(), IntRect(0, 0, video->videoWidth(), video->videoHeight()));
+ video->paintCurrentFrame(imageBuffer->canvas(), IntRect(0, 0, video->videoWidth(), video->videoHeight()), nullptr);
imageBuffer->context()->canvas()->flush();
// This is a straight GPU-GPU copy, any necessary color space conversion was handled in the paintCurrentFrameInContext() call.

Powered by Google App Engine
This is Rietveld 408576698