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

Unified Diff: content/renderer/media/webmediaplayer_impl.cc

Issue 441303002: 2D Canvas doesn't blend video with the destination buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add Copy() as syntactic sugar Created 6 years, 4 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: content/renderer/media/webmediaplayer_impl.cc
diff --git a/content/renderer/media/webmediaplayer_impl.cc b/content/renderer/media/webmediaplayer_impl.cc
index 2787d776cafe87171a3e945114a048130349aae4..a1cecf8718b818c9c08e2977fa330904df167e6e 100644
--- a/content/renderer/media/webmediaplayer_impl.cc
+++ b/content/renderer/media/webmediaplayer_impl.cc
@@ -531,9 +531,16 @@ bool WebMediaPlayerImpl::didLoadingProgress() {
return pipeline_progress || data_progress;
}
-void WebMediaPlayerImpl::paint(WebCanvas* canvas,
- const WebRect& rect,
+void WebMediaPlayerImpl::paint(blink::WebCanvas* canvas,
+ const blink::WebRect& rect,
unsigned char alpha) {
+ paint(canvas, rect, alpha, SkXfermode::kSrcOver_Mode);
+}
+
+void WebMediaPlayerImpl::paint(blink::WebCanvas* canvas,
+ const blink::WebRect& rect,
+ unsigned char alpha,
+ SkXfermode::Mode mode) {
DCHECK(main_loop_->BelongsToCurrentThread());
TRACE_EVENT0("media", "WebMediaPlayerImpl:paint");
@@ -551,6 +558,7 @@ void WebMediaPlayerImpl::paint(WebCanvas* canvas,
canvas,
gfx_rect,
alpha,
+ mode,
pipeline_metadata_.video_rotation);
}

Powered by Google App Engine
This is Rietveld 408576698