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

Unified Diff: third_party/WebKit/Source/core/html/HTMLVideoElement.cpp

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: update layout expectation Created 4 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: third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
index 4bc83610e903afc6cc3fc93b955609de5ec5a6b5..ab4345b5bf26096c162b78a00551d9a4c295e597 100644
--- a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
@@ -204,8 +204,16 @@ void HTMLVideoElement::paintCurrentFrame(SkCanvas* canvas, const IntRect& destRe
if (!paint || !SkXfermode::AsMode(paint->getXfermode(), &mode))
mode = SkXfermode::kSrcOver_Mode;
- // TODO(junov, foolip): crbug.com/456529 Pass the whole SkPaint instead of only alpha and xfermode
- webMediaPlayer()->paint(canvas, destRect, paint ? paint->getAlpha() : 0xFF, mode);
+ SkPaint mediaPaint;
+ if (paint) {
+ mediaPaint = *paint;
+ } else {
+ mediaPaint.setAlpha(0xFF);
+ mediaPaint.setFilterQuality(kLow_SkFilterQuality);
+ }
+ mediaPaint.setXfermodeMode(mode);
+
+ webMediaPlayer()->paint(canvas, destRect, &mediaPaint);
}
bool HTMLVideoElement::copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface* gl, GLuint texture, GLenum internalFormat, GLenum type, bool premultiplyAlpha, bool flipY)

Powered by Google App Engine
This is Rietveld 408576698