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

Unified Diff: cc/tile.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/tile.h
diff --git a/cc/tile.h b/cc/tile.h
index 9d2c2f07a664cd3c2ad0cfca396969eac1e84144..8665ea9913eb9e53d1fa3be72f9a203b48e377b2 100644
--- a/cc/tile.h
+++ b/cc/tile.h
@@ -60,6 +60,41 @@ class CC_EXPORT Tile : public base::RefCounted<Tile> {
return managed_state_.resource->id();
}
+ bool is_ready_to_draw() const {
+ return GetResourceId() != 0 ||
+ is_solid_color_ ||
+ is_transparent_;
+ }
+
+ bool is_solid_color() const {
+ return is_solid_color_;
+ }
+
+ void set_solid_color(const SkColor& color) {
+ is_solid_color_ = true;
+ solid_color_ = color;
+ }
+
+ bool is_transparent() const {
+ return is_transparent_;
+ }
+
+ void set_transparent(bool flag) {
+ is_transparent_ = flag;
+ }
+
+ SkColor get_solid_color() const {
+ return solid_color_;
+ }
+
+ void set_cheap(bool flag) {
+ is_cheap_ = flag;
+ }
+
+ bool is_cheap() const {
+ return is_cheap_;
+ }
+
const gfx::Rect& opaque_rect() const { return opaque_rect_; }
bool contents_swizzled() const { return managed_state_.contents_swizzled; }
@@ -100,6 +135,11 @@ class CC_EXPORT Tile : public base::RefCounted<Tile> {
TilePriority priority_[NUM_BIN_PRIORITIES];
ManagedTileState managed_state_;
+
+ SkColor solid_color_;
+ bool is_solid_color_;
+ bool is_transparent_;
+ bool is_cheap_;
};
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698