Index: src/pipe/SkPipeCanvas.h |
diff --git a/src/pipe/SkPipeCanvas.h b/src/pipe/SkPipeCanvas.h |
index 25353c922fd9e9d68a16a5c254773fdf4293764c..8dbb83fe203247044c3fa7f17c404315dc6212ca 100644 |
--- a/src/pipe/SkPipeCanvas.h |
+++ b/src/pipe/SkPipeCanvas.h |
@@ -23,7 +23,7 @@ public: |
void reset() { fArray.reset(); } |
// returns the found index or 0 |
- int find(const T& key) { |
+ int find(const T& key) const { |
const Rec* stop = fArray.end(); |
for (const Rec* curr = fArray.begin(); curr < stop; ++curr) { |
if (key == curr->fKey) { |
@@ -64,6 +64,9 @@ public: |
void setStream(SkWStream* stream) { fStream = stream; } |
void setTypefaceSerializer(SkTypefaceSerializer* tfs) { fTFSerializer = tfs; } |
+ // returns 0 if not found |
+ int findImage(SkImage* image) const { return fImages.find(image->uniqueID()); } |
+ |
int findOrDefineImage(SkImage*) override; |
int findOrDefinePicture(SkPicture*) override; |
int findOrDefineTypeface(SkTypeface*) override; |