diff options
author | mtklein <mtklein@chromium.org> | 2015-05-18 13:47:17 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-18 13:47:17 -0700 |
commit | 15877b6eae33a9282458bdb904a6d00440eca0ec (patch) | |
tree | 9aee7fa5144cc7039eff79fef5a1c82a59b740f3 /src/core/SkRecordDraw.h | |
parent | cfa90a1aaff2ffbb71a8597905607287856601e5 (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
Review URL: https://codereview.chromium.org/1112523006
Diffstat (limited to 'src/core/SkRecordDraw.h')
-rw-r--r-- | src/core/SkRecordDraw.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/SkRecordDraw.h b/src/core/SkRecordDraw.h index 7bbab81b5a..5b248cfbd5 100644 --- a/src/core/SkRecordDraw.h +++ b/src/core/SkRecordDraw.h @@ -9,6 +9,7 @@ #define SkRecordDraw_DEFINED #include "SkBBoxHierarchy.h" +#include "SkBigPicture.h" #include "SkCanvas.h" #include "SkMatrix.h" #include "SkRecord.h" @@ -20,7 +21,7 @@ class SkLayerInfo; void SkRecordFillBounds(const SkRect& cullRect, const SkRecord&, SkBBoxHierarchy*); void SkRecordComputeLayers(const SkRect& cullRect, const SkRecord& record, - const SkPicture::SnapshotArray*, + const SkBigPicture::SnapshotArray*, SkBBoxHierarchy* bbh, SkLayerInfo* data); // Draw an SkRecord into an SkCanvas. A convenience wrapper around SkRecords::Draw. |