aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pipe/SkGPipePriv.h
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-05-05 12:54:33 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-05 12:54:33 -0700
commit14fe8fd3e53b5e988aac189a8bc3ed28904d85c8 (patch)
tree1f7f2259964a150606e18a4b27c131f76a53a244 /src/pipe/SkGPipePriv.h
parentbeedb81a7fa9bd1274d64b2c000ef6ee23c9a810 (diff)
Make drawImage a virtual on SkDevice
Now with patch for SkDeferredCanvas This reverts commit 119468b71f8f4f45657ab30ead331be665de5a57. BUG=skia: Review URL: https://codereview.chromium.org/1122643005
Diffstat (limited to 'src/pipe/SkGPipePriv.h')
-rw-r--r--src/pipe/SkGPipePriv.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/pipe/SkGPipePriv.h b/src/pipe/SkGPipePriv.h
index 736930b652..c3919f635b 100644
--- a/src/pipe/SkGPipePriv.h
+++ b/src/pipe/SkGPipePriv.h
@@ -43,6 +43,8 @@ enum DrawOps {
kDrawBitmapNine_DrawOp,
kDrawBitmapRectToRect_DrawOp,
kDrawDRRect_DrawOp,
+ kDrawImage_DrawOp,
+ kDrawImageRect_DrawOp,
kDrawOval_DrawOp,
kDrawPaint_DrawOp,
kDrawPatch_DrawOp,
@@ -79,6 +81,7 @@ enum DrawOps {
// these are signals to playback, not drawing verbs
kReportFlags_DrawOp,
kShareBitmapHeap_DrawOp,
+ kShareImageHeap_DrawOp,
kDone_DrawOp,
};
@@ -141,6 +144,7 @@ enum {
kDrawVertices_HasIndices_DrawOpFlag = 1 << 2,
kDrawVertices_HasXfermode_DrawOpFlag = 1 << 3,
};
+// These are shared between drawbitmap and drawimage
enum {
kDrawBitmap_HasPaint_DrawOpFlag = 1 << 0,
// Specific to drawBitmapRect, but needs to be different from HasPaint,
@@ -213,6 +217,22 @@ static inline bool shouldFlattenBitmaps(uint32_t flags) {
&& !(flags & SkGPipeWriter::kSharedAddressSpace_Flag));
}
+class SkImageHeap : public SkRefCnt {
+public:
+ SkImageHeap();
+ virtual ~SkImageHeap();
+
+ // slot must be "valid" -- 0 is never valid
+ const SkImage* get(int32_t slot) const;
+ // returns 0 if not found, else returns slot
+ int32_t find(const SkImage*) const;
+ // returns non-zero value for where the image was stored
+ int32_t insert(const SkImage*);
+
+private:
+ SkTDArray<const SkImage*> fArray;
+};
+
///////////////////////////////////////////////////////////////////////////////
enum PaintOps {