Chromium Code Reviews| Index: skia/ext/analysis_canvas.h |
| diff --git a/skia/ext/analysis_canvas.h b/skia/ext/analysis_canvas.h |
| index fd7ee25c56863a8973738de99e4ec9364425967a..70b59166975aebc4a1675286331027e7c964b430 100644 |
| --- a/skia/ext/analysis_canvas.h |
| +++ b/skia/ext/analysis_canvas.h |
| @@ -5,6 +5,10 @@ |
| #ifndef SKIA_EXT_ANALYSIS_CANVAS_H_ |
| #define SKIA_EXT_ANALYSIS_CANVAS_H_ |
| +#include <list> |
| +#include <set> |
| + |
| +#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 +32,7 @@ class SK_API AnalysisCanvas : public SkCanvas { |
| bool isCheap() const; |
| bool getColorIfSolid(SkColor* color) const; |
| bool isTransparent() const; |
| + void consumeLazyPixelRefs(std::list<LazyPixelRef*>& pixelRefs); |
| // Returns the estimated cost of drawing, in arbitrary units. |
| int getEstimatedCost() const; |
| @@ -65,6 +70,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 +126,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_; |
| + std::set<uint32_t> existingPixelRefIDs_; |
|
Justin Novosad
2013/03/11 15:26:11
for performance, this should be an std::unordered_
|
| + std::list<skia::LazyPixelRef*> lazyPixelRefs_; |
| }; |
| } // namespace skia |