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

Unified Diff: Source/core/paint/VideoPainter.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: fixup 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/paint/VideoPainter.cpp
diff --git a/Source/core/paint/VideoPainter.cpp b/Source/core/paint/VideoPainter.cpp
index d681963c04be4c747e033942992723d835ac60a6..bf00db6f7cde27016b8dfa5c8aa99a44b3b2cd46 100644
--- a/Source/core/paint/VideoPainter.cpp
+++ b/Source/core/paint/VideoPainter.cpp
@@ -42,11 +42,13 @@ void VideoPainter::paintReplaced(const PaintInfo& paintInfo, const LayoutPoint&
context->clip(contentRect);
}
- if (displayingPoster)
+ if (displayingPoster) {
ImagePainter(m_layoutVideo).paintIntoRect(context, rect);
- else if ((m_layoutVideo.document().view() && m_layoutVideo.document().view()->paintBehavior() & PaintBehaviorFlattenCompositingLayers) || !m_layoutVideo.acceleratedRenderingInUse())
- m_layoutVideo.videoElement()->paintCurrentFrameInContext(context, pixelSnappedIntRect(rect));
-
+ } else if ((m_layoutVideo.document().view() && m_layoutVideo.document().view()->paintBehavior() & PaintBehaviorFlattenCompositingLayers) || !m_layoutVideo.acceleratedRenderingInUse()) {
+ SkPaint videoPaint = context->fillPaint();
+ videoPaint.setColor(SK_ColorBLACK);
+ m_layoutVideo.videoElement()->paintCurrentFrame(context->canvas(), pixelSnappedIntRect(rect), &videoPaint);
+ }
if (clip)
context->restore();
}

Powered by Google App Engine
This is Rietveld 408576698