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

Unified Diff: cc/picture_pile_impl.h

Issue 12316084: cc: Consolidate the analysis_canvas operations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed unittest Created 7 years, 10 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
Index: cc/picture_pile_impl.h
diff --git a/cc/picture_pile_impl.h b/cc/picture_pile_impl.h
index 157f9e21e6280d5a7a8ae423145caa45d92af43b..57e254097403f0039adf9f2deb2012860443ab2e 100644
--- a/cc/picture_pile_impl.h
+++ b/cc/picture_pile_impl.h
@@ -49,7 +49,13 @@ class CC_EXPORT PicturePileImpl : public PicturePileBase {
slow_down_raster_scale_factor_for_debug_ = factor;
}
- bool IsCheapInRect(gfx::Rect content_rect, float contents_scale) const;
+ bool GetColorIfSolidInRect(const gfx::Rect& content_rect,
+ float contents_scale,
+ SkColor* color);
+ bool IsCheapInRect(const gfx::Rect& content_rect,
+ float contents_scale);
+ bool IsTransparentInRect(const gfx::Rect& content_rect,
+ float contents_scale);
protected:
friend class PicturePile;
@@ -57,6 +63,22 @@ class CC_EXPORT PicturePileImpl : public PicturePileBase {
PicturePileImpl();
virtual ~PicturePileImpl();
+ struct Analysis {
+ Analysis();
+
+ bool is_solid_color_;
+ SkColor solid_color_;
+ bool is_transparent_;
+ bool is_cheap_;
+
+ bool is_analyzed_;
+ gfx::Rect analyzed_content_rect_;
+ float analyzed_contents_scale_;
+ } analysis_;
+
+ void AnalyzeInRect(const gfx::Rect& content_rect,
+ float contents_scale);
+
typedef std::map<base::PlatformThreadId, scoped_refptr<PicturePileImpl> >
CloneMap;
CloneMap clones_;

Powered by Google App Engine
This is Rietveld 408576698