| OLD | NEW |
| 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 "core/paint/VideoPainter.h" | 5 #include "core/paint/VideoPainter.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
| 9 #include "core/html/HTMLVideoElement.h" | 9 #include "core/html/HTMLVideoElement.h" |
| 10 #include "core/layout/LayoutVideo.h" | 10 #include "core/layout/LayoutVideo.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // Should apply a clip here like EmbeddedObjectPainter does. | 60 // Should apply a clip here like EmbeddedObjectPainter does. |
| 61 LayoutObjectDrawingRecorder drawingRecorder(context, m_layoutVideo, | 61 LayoutObjectDrawingRecorder drawingRecorder(context, m_layoutVideo, |
| 62 paintInfo.phase, contentRect); | 62 paintInfo.phase, contentRect); |
| 63 | 63 |
| 64 if (displayingPoster || !forceSoftwareVideoPaint) { | 64 if (displayingPoster || !forceSoftwareVideoPaint) { |
| 65 // This will display the poster image, if one is present, and otherwise | 65 // This will display the poster image, if one is present, and otherwise |
| 66 // paint nothing. | 66 // paint nothing. |
| 67 ImagePainter(m_layoutVideo) | 67 ImagePainter(m_layoutVideo) |
| 68 .paintIntoRect(context, replacedRect, contentRect); | 68 .paintIntoRect(context, replacedRect, contentRect); |
| 69 } else { | 69 } else { |
| 70 SkPaint videoPaint = context.fillPaint(); | 70 PaintFlags videoPaint = context.fillPaint(); |
| 71 videoPaint.setColor(SK_ColorBLACK); | 71 videoPaint.setColor(SK_ColorBLACK); |
| 72 m_layoutVideo.videoElement()->paintCurrentFrame( | 72 m_layoutVideo.videoElement()->paintCurrentFrame( |
| 73 context.canvas(), snappedReplacedRect, &videoPaint); | 73 context.canvas(), snappedReplacedRect, &videoPaint); |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace blink | 77 } // namespace blink |
| OLD | NEW |