| Index: third_party/WebKit/Source/core/paint/VideoPainter.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/VideoPainter.cpp b/third_party/WebKit/Source/core/paint/VideoPainter.cpp
|
| index 49ea54a6bbfed97026e035d2de081d3d9ca54d78..07b42bda4689a75e8cd1ef529283e47b6f14ffe2 100644
|
| --- a/third_party/WebKit/Source/core/paint/VideoPainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/VideoPainter.cpp
|
| @@ -12,7 +12,6 @@
|
| #include "core/paint/LayoutObjectDrawingRecorder.h"
|
| #include "core/paint/PaintInfo.h"
|
| #include "platform/geometry/LayoutPoint.h"
|
| -#include "platform/graphics/paint/ClipRecorder.h"
|
| #include "platform/graphics/paint/ForeignLayerDisplayItem.h"
|
|
|
| namespace blink {
|
| @@ -29,18 +28,13 @@ void VideoPainter::paintReplaced(const PaintInfo& paintInfo, const LayoutPoint&
|
| return;
|
| rect.moveBy(paintOffset);
|
|
|
| + if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.context, m_layoutVideo, paintInfo.phase))
|
| + return;
|
| +
|
| GraphicsContext& context = paintInfo.context;
|
| LayoutRect contentRect = m_layoutVideo.contentBoxRect();
|
| contentRect.moveBy(paintOffset);
|
|
|
| - Optional<ClipRecorder> clipRecorder;
|
| - if (!contentRect.contains(rect))
|
| - clipRecorder.emplace(context, m_layoutVideo, paintInfo.displayItemTypeForClipping(), pixelSnappedIntRect(contentRect));
|
| -
|
| - if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(context, m_layoutVideo, paintInfo.phase))
|
| - return;
|
| -
|
| -
|
| // Video frames are only painted in software for printing or capturing node images via web APIs.
|
| bool forceSoftwareVideoPaint = paintInfo.getGlobalPaintFlags() & GlobalPaintFlattenCompositingLayers;
|
|
|
| @@ -61,7 +55,7 @@ void VideoPainter::paintReplaced(const PaintInfo& paintInfo, const LayoutPoint&
|
|
|
| if (displayingPoster || !forceSoftwareVideoPaint) {
|
| // This will display the poster image, if one is present, and otherwise paint nothing.
|
| - ImagePainter(m_layoutVideo).paintIntoRect(context, rect);
|
| + ImagePainter(m_layoutVideo).paintIntoRect(context, rect, contentRect);
|
| } else {
|
| SkPaint videoPaint = context.fillPaint();
|
| videoPaint.setColor(SK_ColorBLACK);
|
|
|