| Index: third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
|
| index e014804efc3c757d376654182ff01ea43ed06ea5..28170ef0b2d3c3df7b6eaad5558f5e919a1a015e 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
|
| @@ -300,6 +300,17 @@ sk_sp<PaintRecord> GraphicsContext::endRecording() {
|
| return record;
|
| }
|
|
|
| +sk_sp<SkDrawable> GraphicsContext::endRecordingAsDrawable() {
|
| + if (contextDisabled()) {
|
| + return nullptr;
|
| + }
|
| +
|
| + sk_sp<SkDrawable> drawable = m_paintRecorder.finishRecordingAsDrawable();
|
| + m_canvas = nullptr;
|
| + DCHECK(drawable);
|
| + return drawable;
|
| +}
|
| +
|
| void GraphicsContext::drawRecord(const PaintRecord* record) {
|
| if (contextDisabled() || !record || record->cullRect().isEmpty())
|
| return;
|
| @@ -308,6 +319,14 @@ void GraphicsContext::drawRecord(const PaintRecord* record) {
|
| m_canvas->drawPicture(record);
|
| }
|
|
|
| +void GraphicsContext::drawDrawable(const SkDrawable* drawable) {
|
| + if (contextDisabled() || !drawable)
|
| + return;
|
| +
|
| + DCHECK(m_canvas);
|
| + m_canvas->drawDrawable((SkDrawable*)drawable, nullptr);
|
| +}
|
| +
|
| void GraphicsContext::compositeRecord(sk_sp<PaintRecord> record,
|
| const FloatRect& dest,
|
| const FloatRect& src,
|
|
|