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

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: rebase 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 87cd5857b9d73a0f4e9c93b5b573c290cc74766a..9d6a9ace57765c7b1ceb41bb2c626508620b71b2 100644
--- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp
@@ -3926,7 +3926,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);
}
@@ -3955,7 +3955,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