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

Unified Diff: cc/layers/layer.h

Issue 13939005: cc: Add strict layer property change checking and handle bounds changes during paint. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/CHECK/DCHECK/ Created 7 years, 8 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
« no previous file with comments | « cc/layers/contents_scaling_layer.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.h
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index 40909cf0cdb614629fa66cd08a064c36ff1246d1..84119649773f43d3e1decfa18041c772ad49e81e 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -17,6 +17,7 @@
#include "cc/layers/draw_properties.h"
#include "cc/layers/layer_lists.h"
#include "cc/layers/layer_position_constraint.h"
+#include "cc/layers/paint_properties.h"
#include "cc/layers/render_surface.h"
#include "cc/trees/occlusion_tracker.h"
#include "skia/ext/refptr.h"
@@ -268,6 +269,7 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
// These methods typically need to be overwritten by derived classes.
virtual bool DrawsContent() const;
+ virtual void SavePaintProperties();
virtual void Update(ResourceUpdateQueue* queue,
const OcclusionTracker* occlusion,
RenderingStats* stats) {}
@@ -370,6 +372,10 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
RenderingStatsInstrumentation* rendering_stats_instrumentation() const;
+ const PaintProperties& paint_properties() const {
+ return paint_properties_;
+ }
+
protected:
friend class LayerImpl;
friend class TreeSynchronizer;
@@ -379,6 +385,7 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
void SetNeedsCommit();
void SetNeedsFullTreeSync();
+ bool IsPropertyChangeAllowed() const;
// This flag is set when layer need repainting/updating.
bool needs_display_;
@@ -477,6 +484,8 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
DrawProperties<Layer, RenderSurface> draw_properties_;
+ PaintProperties paint_properties_;
+
DISALLOW_COPY_AND_ASSIGN(Layer);
};
« no previous file with comments | « cc/layers/contents_scaling_layer.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698