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

Side by Side 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: Created 5 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/paint/VideoPainter.h" 6 #include "core/paint/VideoPainter.h"
7 7
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/html/HTMLVideoElement.h" 10 #include "core/html/HTMLVideoElement.h"
(...skipping 27 matching lines...) Expand all
38 38
39 bool clip = !contentRect.contains(rect); 39 bool clip = !contentRect.contains(rect);
40 if (clip) { 40 if (clip) {
41 context->save(); 41 context->save();
42 context->clip(contentRect); 42 context->clip(contentRect);
43 } 43 }
44 44
45 if (displayingPoster) 45 if (displayingPoster)
46 ImagePainter(m_layoutVideo).paintIntoRect(context, rect); 46 ImagePainter(m_layoutVideo).paintIntoRect(context, rect);
47 else if ((m_layoutVideo.document().view() && m_layoutVideo.document().view() ->paintBehavior() & PaintBehaviorFlattenCompositingLayers) || !m_layoutVideo.acc eleratedRenderingInUse()) 47 else if ((m_layoutVideo.document().view() && m_layoutVideo.document().view() ->paintBehavior() & PaintBehaviorFlattenCompositingLayers) || !m_layoutVideo.acc eleratedRenderingInUse())
48 m_layoutVideo.videoElement()->paintCurrentFrameInContext(context, pixelS nappedIntRect(rect)); 48 m_layoutVideo.videoElement()->paintCurrentFrame(context->canvas(), pixel SnappedIntRect(rect), &context->fillPaint());
49 49
50 if (clip) 50 if (clip)
51 context->restore(); 51 context->restore();
52 } 52 }
53 53
54 } // namespace blink 54 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698