Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(539)

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2716203002: blink: Fix cc/paint skia type mismatches (Closed)
Patch Set: Fix canvas Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 5c03337e37bd2b7489dd18e59fb81dd46299e306..4791627deeb64b252026697c7aecc48867f8cc3b 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -88,6 +88,7 @@
#include "platform/graphics/paint/PaintCanvas.h"
#include "platform/graphics/paint/PaintController.h"
#include "platform/graphics/paint/PaintRecordBuilder.h"
+#include "platform/graphics/paint/PaintSurface.h"
#include "platform/graphics/paint/TransformDisplayItem.h"
#include "platform/json/JSONValues.h"
#include "platform/loader/fetch/ResourceFetcher.h"
@@ -98,7 +99,6 @@
#include "public/platform/WebScreenInfo.h"
#include "public/platform/WebViewScheduler.h"
#include "third_party/skia/include/core/SkImage.h"
-#include "third_party/skia/include/core/SkSurface.h"
#include "wtf/PtrUtil.h"
#include "wtf/StdLibExtras.h"
@@ -144,7 +144,7 @@ class DragImageBuilder {
DoNotRespectImageOrientation) {
context().getPaintController().endItem<EndTransformDisplayItem>(*m_builder);
// TODO(fmalita): endRecording() should return a non-const SKP.
- sk_sp<PaintRecord> recording(
+ sk_sp<PaintRecord> record(
const_cast<PaintRecord*>(m_builder->endRecording().release()));
// Rasterize upfront, since DragImage::create() is going to do it anyway
@@ -155,7 +155,7 @@ class DragImageBuilder {
if (!surface)
return nullptr;
- surface->getCanvas()->drawPicture(recording);
+ record->playback(surface->getCanvas());
RefPtr<Image> image =
StaticBitmapImage::create(surface->makeImageSnapshot());

Powered by Google App Engine
This is Rietveld 408576698