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

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

Issue 2276033002: Pass SkPaint instead of its alpha and mode in WebMediaPlayer::paint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android should compile Created 4 years, 3 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/html_video_element_capturer_source.cc
diff --git a/content/renderer/media/html_video_element_capturer_source.cc b/content/renderer/media/html_video_element_capturer_source.cc
index 738f741157f10cb685c148a3573daac06f044401..b95a0677387fd75d74711a063bca0b88818093d8 100644
--- a/content/renderer/media/html_video_element_capturer_source.cc
+++ b/content/renderer/media/html_video_element_capturer_source.cc
@@ -135,9 +135,12 @@ void HtmlVideoElementCapturerSource::sendNewFrame() {
const blink::WebSize resolution = web_media_player_->naturalSize();
SkCanvas* canvas = surface_->getCanvas();
+ SkPaint paint;
+ paint.setXfermodeMode(SkXfermode::kSrc_Mode);
+ paint.setFilterQuality(kLow_SkFilterQuality);
web_media_player_->paint(
canvas, blink::WebRect(0, 0, resolution.width, resolution.height),
- 0xFF /* alpha */, SkXfermode::kSrc_Mode);
+ paint);
DCHECK_NE(kUnknown_SkColorType, canvas->imageInfo().colorType());
DCHECK_EQ(canvas->imageInfo().width(), resolution.width);
DCHECK_EQ(canvas->imageInfo().height(), resolution.height);

Powered by Google App Engine
This is Rietveld 408576698