diff options
author | reed <reed@google.com> | 2014-11-18 11:08:05 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-18 11:08:05 -0800 |
commit | 6be2aa9a251bf6022570a03140f956655b3ef1da (patch) | |
tree | 52ccd2b4fd1fde02617f08ee03d30faee917c38f /src/core/SkRecords.h | |
parent | ad3a8846f8963e03faa6de647502e1c553161ecb (diff) |
wip for drawables
Idea:
1. in its mutable recording state, keep a table of drawables on the side, and store an index in the record list.
2. In "immediate-mode" draw, just call the clients drawable directly (need access to our private list to turn the stored index into a proc)
3. when we "snap", we replace the list of drawables with a list of (sub) pictures, and then during playback of the snapped picture, we invoke a private drawable which just calls "drawPicture" on the index'd subpicture.
Review URL: https://codereview.chromium.org/727363003
Diffstat (limited to 'src/core/SkRecords.h')
-rw-r--r-- | src/core/SkRecords.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/SkRecords.h b/src/core/SkRecords.h index f6292d419b..d303e98915 100644 --- a/src/core/SkRecords.h +++ b/src/core/SkRecords.h @@ -9,6 +9,7 @@ #define SkRecords_DEFINED #include "SkCanvas.h" +#include "SkCanvasDrawable.h" #include "SkPicture.h" #include "SkTextBlob.h" @@ -44,6 +45,7 @@ namespace SkRecords { M(DrawBitmapMatrix) \ M(DrawBitmapNine) \ M(DrawBitmapRectToRect) \ + M(DrawDrawable) \ M(DrawImage) \ M(DrawImageRect) \ M(DrawDRRect) \ @@ -236,6 +238,7 @@ RECORD5(DrawBitmapRectToRect, Optional<SkPaint>, paint, SkRect, dst, SkCanvas::DrawBitmapRectFlags, flags); RECORD3(DrawDRRect, SkPaint, paint, SkRRect, outer, SkRRect, inner); +RECORD2(DrawDrawable, SkRect, worstCaseBounds, int32_t, index); RECORD4(DrawImage, Optional<SkPaint>, paint, RefBox<const SkImage>, image, SkScalar, left, |