diff options
Diffstat (limited to 'src/pipe/SkGPipePriv.h')
-rw-r--r-- | src/pipe/SkGPipePriv.h | 20 |
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 { |