| Index: Source/platform/DragImage.cpp
|
| diff --git a/Source/platform/DragImage.cpp b/Source/platform/DragImage.cpp
|
| index d02cfe2e8d7f9981b3363abfdf31347f891a2f2b..63f4e3adf07d114d075b39e29555dbdf45ca2f73 100644
|
| --- a/Source/platform/DragImage.cpp
|
| +++ b/Source/platform/DragImage.cpp
|
| @@ -39,8 +39,8 @@
|
| #include "platform/graphics/GraphicsContext.h"
|
| #include "platform/graphics/Image.h"
|
| #include "platform/graphics/ImageBuffer.h"
|
| -#include "platform/graphics/paint/DisplayItemListContextRecorder.h"
|
| #include "platform/graphics/paint/DrawingRecorder.h"
|
| +#include "platform/graphics/paint/SkPictureBuilder.h"
|
| #include "platform/text/BidiTextRun.h"
|
| #include "platform/text/StringTruncator.h"
|
| #include "platform/text/TextRun.h"
|
| @@ -170,9 +170,9 @@ PassOwnPtr<DragImage> DragImage::create(const KURL& url, const String& inLabel,
|
| if (!buffer)
|
| return nullptr;
|
|
|
| + SkPictureBuilder pictureBuilder(FloatRect(0, 0, scaledImageSize.width(), scaledImageSize.height()));
|
| {
|
| - DisplayItemListContextRecorder contextRecorder(*buffer->context());
|
| - GraphicsContext& paintContext = contextRecorder.context();
|
| + GraphicsContext& paintContext = pictureBuilder.context();
|
|
|
| IntRect rect(IntPoint(), imageSize);
|
| DrawingRecorder drawingRecorder(paintContext, *buffer, DisplayItem::DragImage, rect);
|
| @@ -208,6 +208,8 @@ PassOwnPtr<DragImage> DragImage::create(const KURL& url, const String& inLabel,
|
| paintContext.drawBidiText(labelFont, TextRunPaintInfo(textRun), FloatPoint(textPos));
|
| }
|
| }
|
| + RefPtr<const SkPicture> recording = pictureBuilder.endRecording();
|
| + buffer->canvas()->drawPicture(recording.get());
|
|
|
| RefPtr<Image> image = buffer->copyImage();
|
| return DragImage::create(image.get(), DoNotRespectImageOrientation, deviceScaleFactor);
|
|
|