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

Unified Diff: cc/layers/render_surface_impl.h

Issue 2834123002: cc: Replace render surface layer list with a render surface list (Closed)
Patch Set: Address review comments Created 3 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/layer_position_constraint_unittest.cc ('k') | cc/layers/render_surface_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/render_surface_impl.h
diff --git a/cc/layers/render_surface_impl.h b/cc/layers/render_surface_impl.h
index 5cf15e86af2e9d911a1d58ff618208ced52aefa6..04f0348b39f6e53b46ddb7dbb156a33beec04dfb 100644
--- a/cc/layers/render_surface_impl.h
+++ b/cc/layers/render_surface_impl.h
@@ -104,6 +104,13 @@ class CC_EXPORT RenderSurfaceImpl {
return has_contributing_layer_that_escapes_clip_;
}
+ void set_is_render_surface_list_member(bool is_render_surface_list_member) {
+ is_render_surface_list_member_ = is_render_surface_list_member;
+ }
+ bool is_render_surface_list_member() const {
+ return is_render_surface_list_member_;
+ }
+
void CalculateContentRectFromAccumulatedContentRect(int max_texture_size);
void SetContentRectToViewport();
void SetContentRectForTesting(const gfx::Rect& rect);
@@ -119,6 +126,14 @@ class CC_EXPORT RenderSurfaceImpl {
return accumulated_content_rect_;
}
+ void increment_num_contributors() { num_contributors_++; }
+ void decrement_num_contributors() {
+ num_contributors_--;
+ DCHECK_GE(num_contributors_, 0);
+ }
+ void reset_num_contributors() { num_contributors_ = 0; }
+ int num_contributors() const { return num_contributors_; }
+
const Occlusion& occlusion_in_content_space() const {
return occlusion_in_content_space_;
}
@@ -126,9 +141,6 @@ class CC_EXPORT RenderSurfaceImpl {
occlusion_in_content_space_ = occlusion;
}
- LayerImplList& layer_list() { return layer_list_; }
- void ClearLayerLists();
-
int id() const { return stable_effect_id_; }
LayerImpl* MaskLayer();
@@ -204,14 +216,15 @@ class CC_EXPORT RenderSurfaceImpl {
// Is used to calculate the content rect from property trees.
gfx::Rect accumulated_content_rect_;
+ int num_contributors_;
// Is used to decide if the surface is clipped.
bool has_contributing_layer_that_escapes_clip_ : 1;
bool surface_property_changed_ : 1;
bool ancestor_property_changed_ : 1;
bool contributes_to_drawn_surface_ : 1;
+ bool is_render_surface_list_member_ : 1;
- LayerImplList layer_list_;
Occlusion occlusion_in_content_space_;
// The nearest ancestor target surface that will contain the contents of this
« no previous file with comments | « cc/layers/layer_position_constraint_unittest.cc ('k') | cc/layers/render_surface_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698