Index: cc/picture_pile_impl.h |
diff --git a/cc/picture_pile_impl.h b/cc/picture_pile_impl.h |
index 157f9e21e6280d5a7a8ae423145caa45d92af43b..3faebd6898da8f59751a7a1efb3dfa83a4ee1f93 100644 |
--- a/cc/picture_pile_impl.h |
+++ b/cc/picture_pile_impl.h |
@@ -19,6 +19,38 @@ struct RenderingStats; |
class CC_EXPORT PicturePileImpl : public PicturePileBase { |
public: |
+ |
+ class Analysis { |
reveman
2013/02/28 21:23:10
can we move this or just use the Picture::Analysis
|
+ public: |
+ Analysis(); |
+ |
+ bool is_solid_color() const { |
+ return is_analyzed_ && is_solid_color_; |
+ } |
+ |
+ SkColor get_solid_color() const { |
+ DCHECK(is_solid_color()); |
+ return solid_color_; |
+ } |
+ |
+ bool is_transparent() const { |
+ return is_analyzed_ && is_transparent_; |
+ } |
+ |
+ bool is_cheap_to_raster() const { |
+ return is_analyzed_ && is_cheap_to_raster_; |
+ } |
+ |
+ private: |
+ friend class PicturePileImpl; |
+ |
+ bool is_solid_color_; |
+ bool is_transparent_; |
+ bool is_cheap_to_raster_; |
+ bool is_analyzed_; |
reveman
2013/02/28 21:23:10
why do you need this flag? can't you just initiali
|
+ SkColor solid_color_; |
+ }; |
+ |
static scoped_refptr<PicturePileImpl> Create(); |
// Get paint-safe version of this picture for a specific thread. |
@@ -49,7 +81,9 @@ class CC_EXPORT PicturePileImpl : public PicturePileBase { |
slow_down_raster_scale_factor_for_debug_ = factor; |
} |
- bool IsCheapInRect(gfx::Rect content_rect, float contents_scale) const; |
+ void AnalyzeInRect(const gfx::Rect& content_rect, |
+ float contents_scale, |
+ Analysis* analysis); |
protected: |
friend class PicturePile; |