Index: skia/ext/analysis_canvas.h |
diff --git a/skia/ext/analysis_canvas.h b/skia/ext/analysis_canvas.h |
index fd7ee25c56863a8973738de99e4ec9364425967a..3692437a06398a8d70439b88fc001247c041d33b 100644 |
--- a/skia/ext/analysis_canvas.h |
+++ b/skia/ext/analysis_canvas.h |
@@ -5,6 +5,11 @@ |
#ifndef SKIA_EXT_ANALYSIS_CANVAS_H_ |
#define SKIA_EXT_ANALYSIS_CANVAS_H_ |
+#include <list> |
+#include <set> |
+ |
+#include "base/hash_tables.h" |
+#include "skia/ext/lazy_pixel_ref.h" |
#include "third_party/skia/include/core/SkCanvas.h" |
#include "third_party/skia/include/core/SkDevice.h" |
@@ -28,6 +33,7 @@ class SK_API AnalysisCanvas : public SkCanvas { |
bool isCheap() const; |
bool getColorIfSolid(SkColor* color) const; |
bool isTransparent() const; |
+ void consumeLazyPixelRefs(std::list<LazyPixelRef*>& pixelRefs); |
Tom Hudson
2013/03/18 11:52:39
This name is really unclear to me; "consume" doesn
Sami
2013/03/18 12:14:33
Use a pointer instead of reference (all reference
|
// Returns the estimated cost of drawing, in arbitrary units. |
int getEstimatedCost() const; |
@@ -65,6 +71,7 @@ class SK_API AnalysisDevice : public SkDevice { |
int getEstimatedCost() const; |
bool getColorIfSolid(SkColor* color) const; |
bool isTransparent() const; |
+ void consumeLazyPixelRefs(std::list<LazyPixelRef*>& pixelRefs); |
void setForceNotSolid(bool flag); |
void setForceNotTransparent(bool flag); |
@@ -120,13 +127,20 @@ class SK_API AnalysisDevice : public SkDevice { |
int estimatedCost_; |
private: |
+ |
typedef SkDevice INHERITED; |
+ void addPixelRefIfLazy(SkPixelRef* pixelRef); |
+ void addBitmap(const SkBitmap& bitmap); |
+ void addBitmapFromPaint(const SkPaint& paint); |
+ |
bool isForcedNotSolid_; |
bool isForcedNotTransparent_; |
bool isSolidColor_; |
SkColor color_; |
bool isTransparent_; |
+ base::hash_set<uint32_t> existingPixelRefIDs_; |
Sami
2013/03/18 12:14:33
This could be a typedef too.
|
+ std::list<skia::LazyPixelRef*> lazyPixelRefs_; |
}; |
} // namespace skia |