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

Unified Diff: src/core/SkPicture.cpp

Issue 550083006: Turn on all pixel-perfect SkRecord optimizations. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update unit test Created 6 years, 3 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
« no previous file with comments | « no previous file | src/core/SkRecordOpts.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPicture.cpp
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index e80a17bd22cda92bae2feef21fc0a42f69dafa3b..8ccd3c95e7b4069117270e013d4ae1a33e3eec91 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -40,6 +40,7 @@
#include "SkRecord.h"
#include "SkRecordDraw.h"
+#include "SkRecordOpts.h"
#include "SkRecorder.h"
template <typename T> int SafeCount(const T* obj) {
@@ -271,7 +272,7 @@ SkPicture::SkPicture(SkScalar width, SkScalar height,
static SkPicture* backport(const SkRecord& src, const SkRect& cullRect) {
SkPictureRecorder recorder;
SkRecordDraw(src,
- recorder.DEPRECATED_beginRecording(cullRect.width(), cullRect.height()),
+ recorder.DEPRECATED_beginRecording(cullRect.width(), cullRect.height()),
NULL/*bbh*/, NULL/*callback*/);
return recorder.endRecording();
}
@@ -460,7 +461,7 @@ SkPicture* SkPicture::Forwardport(const SkPicture& src) {
SkAutoTDelete<SkRecord> record(SkNEW(SkRecord));
SkRecorder canvas(record.get(), src.cullRect().width(), src.cullRect().height());
src.playback(&canvas);
- return SkNEW_ARGS(SkPicture, (src.cullRect().width(), src.cullRect().height(),
+ return SkNEW_ARGS(SkPicture, (src.cullRect().width(), src.cullRect().height(),
record.detach(), NULL/*bbh*/));
}
@@ -645,6 +646,8 @@ SkPicture::SkPicture(SkScalar width, SkScalar height, SkRecord* record, SkBBoxHi
, fRecord(record)
, fBBH(SkSafeRef(bbh))
, fAnalysis(*record) {
+ // TODO: move optimization before we construct fAnalysis?
+ SkRecordOptimize(record);
// TODO: delay as much of this work until just before first playback?
if (fBBH.get()) {
SkRecordFillBounds(*record, fBBH.get());
« no previous file with comments | « no previous file | src/core/SkRecordOpts.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698