aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPictureRecorder.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-05-19 11:11:26 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-19 11:11:26 -0700
commit9db912c2ac2ab53bc24f2d50a3e5a80162051dcc (patch)
tree053a0e9ec711d0ccb95625219dd83022e7b6ece2 /include/core/SkPictureRecorder.h
parent612f70d5fa2d4bf7a393c791966bbce933407017 (diff)
Sketch splitting SkPicture into an interface and SkBigPicture.
Adds small pictures for drawRect(), drawTextBlob(), and drawPath(). These cover about 89% of draw calls from Blink SKPs, and about 25% of draw calls from our GMs. SkPicture handles: - serialization and deserialization - unique IDs Everything else is left to the subclasses: - playback(), cullRect() - hasBitmap(), hasText(), suitableForGPU(), etc. - LayerInfo / AccelData if applicable. The time to record a 1-op picture improves a good chunk (2 mallocs to 1), and the time to record a 0-op picture greatly improves (2 mallocs to none): picture_overhead_draw: 450ns -> 350ns picture_overhead_nodraw: 300ns -> 90ns BUG=skia: Committed: https://skia.googlesource.com/skia/+/c92c129ff85b05a714bd1bf921c02d5e14651f8b Latest blink_linux_rel: http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/61248 Committed: https://skia.googlesource.com/skia/+/15877b6eae33a9282458bdb904a6d00440eca0ec http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/62015 Review URL: https://codereview.chromium.org/1112523006
Diffstat (limited to 'include/core/SkPictureRecorder.h')
-rw-r--r--include/core/SkPictureRecorder.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/core/SkPictureRecorder.h b/include/core/SkPictureRecorder.h
index 2cf7909cf3..a84b721e44 100644
--- a/include/core/SkPictureRecorder.h
+++ b/include/core/SkPictureRecorder.h
@@ -8,6 +8,7 @@
#ifndef SkPictureRecorder_DEFINED
#define SkPictureRecorder_DEFINED
+#include "../../src/core/SkMiniRecorder.h"
#include "SkBBHFactory.h"
#include "SkPicture.h"
#include "SkRefCnt.h"
@@ -102,6 +103,7 @@ private:
SkAutoTUnref<SkBBoxHierarchy> fBBH;
SkAutoTUnref<SkRecorder> fRecorder;
SkAutoTUnref<SkRecord> fRecord;
+ SkMiniRecorder fMiniRecorder;
typedef SkNoncopyable INHERITED;
};