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

Unified Diff: cc/layers/picture_layer_impl.h

Issue 519583003: Use the solid color detection to create solid layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a unit test for solid color on picturelayerimpl Created 6 years, 3 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/layers/picture_layer_impl.h
diff --git a/cc/layers/picture_layer_impl.h b/cc/layers/picture_layer_impl.h
index 47e74aeefcc247bcc8b9c193fc22de40c83c5fd8..0c2a4bfc1ab96ddb7a4fd40e2085977b73578f10 100644
--- a/cc/layers/picture_layer_impl.h
+++ b/cc/layers/picture_layer_impl.h
@@ -149,6 +149,9 @@ class CC_EXPORT PictureLayerImpl
virtual bool HasValidTilePriorities() const;
bool AllTilesRequiredForActivationAreReadyToDraw() const;
+ void SetSolidColorState(bool is_solid_color, SkColor solid_color);
+ bool IsSolidColor() const { return is_solid_color_; }
+
protected:
friend class LayerRasterTileIterator;
@@ -228,6 +231,9 @@ class CC_EXPORT PictureLayerImpl
gfx::Rect viewport_rect_for_tile_priority_;
gfx::Transform screen_space_transform_for_tile_priority_;
+ bool is_solid_color_;
+ SkColor solid_color_;
+
friend class PictureLayer;
DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
};

Powered by Google App Engine
This is Rietveld 408576698