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

Unified Diff: cc/layers/layer_impl.h

Issue 465853004: Moving RenderSurface creation outside of CalcDrawProps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated unit tests Created 6 years, 4 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/layer_impl.h
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index 8af8c3de3e9d08a16e863256d05906d908fdbfd9..57b33e20eb621ddb4801de6a55de6518f17cab7b 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -218,9 +218,6 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
void SetHideLayerAndSubtree(bool hide);
bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; }
- bool force_render_surface() const { return force_render_surface_; }
- void SetForceRenderSurface(bool force) { force_render_surface_ = force; }
-
void SetTransformOrigin(const gfx::Point3F& transform_origin);
gfx::Point3F transform_origin() const { return transform_origin_; }
@@ -302,6 +299,9 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
void CreateRenderSurface();
void ClearRenderSurface();
danakj 2014/08/26 18:06:13 Same Q re {Create,Clear} vs SetActive
awoloszyn 2014/08/28 19:31:43 Done.
void ClearRenderSurfaceLayerList();
+ void SetRenderSurfaceActive(bool active);
+ bool ShouldHaveRenderSurface() { return render_surface_; }
+ void SetShouldHaveRenderSurface(bool should_have_render_surface);
DrawProperties<LayerImpl>& draw_properties() {
return draw_properties_;
@@ -350,9 +350,7 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
draw_properties_.render_target->render_surface());
return draw_properties_.render_target;
}
- RenderSurfaceImpl* render_surface() const {
- return draw_properties_.render_surface.get();
- }
+ RenderSurfaceImpl* render_surface() const { return active_render_surface_; }
int num_unclipped_descendants() const {
return draw_properties_.num_unclipped_descendants;
}
@@ -629,7 +627,6 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
bool draw_checkerboard_for_missing_tiles_ : 1;
bool draws_content_ : 1;
bool hide_layer_and_subtree_ : 1;
- bool force_render_surface_ : 1;
// Cache transform_'s invertibility.
bool transform_is_invertible_ : 1;
@@ -703,7 +700,8 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
DrawProperties<LayerImpl> draw_properties_;
scoped_refptr<base::debug::ConvertableToTraceFormat> debug_info_;
-
+ scoped_ptr<RenderSurfaceImpl> render_surface_;
+ RenderSurfaceImpl* active_render_surface_;
DISALLOW_COPY_AND_ASSIGN(LayerImpl);
};

Powered by Google App Engine
This is Rietveld 408576698