Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: src/pipe/SkGPipePriv.h

Issue 1129843003: Make drawImage a virtual on SkDevice (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/image/SkImage_Raster.cpp ('k') | src/pipe/SkGPipeRead.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pipe/SkGPipePriv.h
diff --git a/src/pipe/SkGPipePriv.h b/src/pipe/SkGPipePriv.h
index 736930b652e2e020dbc51a5bfc5f09e18b26330f..c3919f635bd6232221d51eb37a08266a0bf1f5b5 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 {
« no previous file with comments | « src/image/SkImage_Raster.cpp ('k') | src/pipe/SkGPipeRead.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698