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

Unified Diff: third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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/platform/graphics/RecordingImageBufferSurface.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp b/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp
index ec92dcc7e1cdccb275dcf801a42b1631715c871d..6ab7c08a55e4cfe0e1cce2a679613539830d5c7a 100644
--- a/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp
+++ b/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp
@@ -10,7 +10,7 @@
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/ImageBuffer.h"
#include "third_party/skia/include/core/SkCanvas.h"
-#include "third_party/skia/include/core/SkPictureRecorder.h"
+#include "skia/ext/cdl_picture_recorder.h"
#include "wtf/PassRefPtr.h"
#include "wtf/PtrUtil.h"
#include <memory>
@@ -39,8 +39,8 @@ RecordingImageBufferSurface::~RecordingImageBufferSurface() {}
void RecordingImageBufferSurface::initializeCurrentFrame() {
static SkRTreeFactory rTreeFactory;
- m_currentFrame = wrapUnique(new SkPictureRecorder);
- SkCanvas* canvas = m_currentFrame->beginRecording(
+ m_currentFrame = wrapUnique(new CdlPictureRecorder);
+ CdlCanvas* canvas = m_currentFrame->beginRecording(
size().width(), size().height(), &rTreeFactory);
// Always save an initial frame, to support resetting the top level matrix
// and clip.
@@ -165,7 +165,7 @@ sk_sp<SkImage> RecordingImageBufferSurface::newImageSnapshot(
return m_fallbackSurface->newImageSnapshot(hint, reason);
}
-SkCanvas* RecordingImageBufferSurface::canvas() {
+CdlCanvas* RecordingImageBufferSurface::canvas() {
if (m_fallbackSurface)
return m_fallbackSurface->canvas();
@@ -208,7 +208,7 @@ void RecordingImageBufferSurface::disableDeferral(
fallBackToRasterCanvas(disableDeferralReasonToFallbackReason(reason));
}
-sk_sp<SkPicture> RecordingImageBufferSurface::getPicture() {
+sk_sp<CdlPicture> RecordingImageBufferSurface::getPicture() {
if (m_fallbackSurface)
return nullptr;
@@ -327,7 +327,7 @@ void RecordingImageBufferSurface::draw(GraphicsContext& context,
return;
}
- sk_sp<SkPicture> picture = getPicture();
+ sk_sp<CdlPicture> picture = getPicture();
if (picture) {
context.compositePicture(std::move(picture), destRect, srcRect, op);
} else {

Powered by Google App Engine
This is Rietveld 408576698