| Index: third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
| index fce55762b41d60740ebe853b59143a1b8a45b3a7..56098c3f8f89a72257c5360b0fd161d6ad54eab6 100644
|
| --- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
|
| @@ -92,7 +92,9 @@
|
| #include "public/platform/WebFrameScheduler.h"
|
| #include "public/platform/WebScreenInfo.h"
|
| #include "public/platform/WebViewScheduler.h"
|
| +#include "skia/ext/cdl_canvas.h"
|
| #include "third_party/skia/include/core/SkImage.h"
|
| +#include "third_party/skia/include/core/SkPictureRecorder.h"
|
| #include "wtf/PtrUtil.h"
|
| #include "wtf/StdLibExtras.h"
|
| #include <memory>
|
| @@ -140,10 +142,16 @@ class DragImageBuilder {
|
| context().getPaintController().endItem<EndTransformDisplayItem>(
|
| *m_pictureBuilder);
|
| // TODO(fmalita): endRecording() should return a non-const SKP.
|
| - sk_sp<SkPicture> recording(
|
| - const_cast<SkPicture*>(m_pictureBuilder->endRecording().release()));
|
| + sk_sp<CdlPicture> recording(
|
| + const_cast<CdlPicture*>(m_pictureBuilder->endRecording().release()));
|
| +
|
| + SkPictureRecorder recorder;
|
| + SkCanvas* sk_canvas = recorder.beginRecording(m_bounds);
|
| + CdlPassThroughCanvas canvas(sk_canvas);
|
| + canvas.drawPicture(recording);
|
| +
|
| sk_sp<SkImage> skImage = SkImage::MakeFromPicture(
|
| - std::move(recording),
|
| + recorder.finishRecordingAsPicture(),
|
| SkISize::Make(m_bounds.width(), m_bounds.height()), nullptr, nullptr);
|
| RefPtr<Image> image = StaticBitmapImage::create(std::move(skImage));
|
| float screenDeviceScaleFactor =
|
|
|