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

Unified Diff: cc/layers/layer_impl.h

Issue 332873005: Rendering context information added to SharedQuadState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layer_tree_json_parser fix Created 6 years, 6 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.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.h
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index b93a50425906f82d2738d9505006329066612874..299a741b290e58fe11a809ffe967b2fb49180368 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -267,8 +267,7 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
void SetShouldFlattenTransform(bool flatten);
bool should_flatten_transform() const { return should_flatten_transform_; }
- void SetIs3dSorted(bool sorted);
- bool is_3d_sorted() const { return is_3d_sorted_; }
+ bool Is3dSorted() const { return sorting_context_id_ != 0; }
void SetUseParentBackfaceVisibility(bool use) {
use_parent_backface_visibility_ = use;
@@ -531,6 +530,9 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
bool IsDrawnRenderSurfaceLayerListMember() const;
+ void Set3dSortingContextId(int id);
+ int sorting_context_id() { return sorting_context_id_; }
+
protected:
LayerImpl(LayerTreeImpl* layer_impl, int id);
@@ -618,7 +620,6 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
// Set for the layer that other layers are fixed to.
bool is_container_for_fixed_position_layers_ : 1;
- bool is_3d_sorted_ : 1;
Region non_fast_scrollable_region_;
Region touch_event_handler_region_;
SkColor background_color_;
@@ -653,6 +654,11 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
// active side.
int num_dependents_need_push_properties_;
+ // Layers that share a sorting context id will be sorted together in 3d
+ // space. 0 is a special value that means this layer will not be sorted and
+ // will be drawn in paint order.
+ int sorting_context_id_;
+
DrawMode current_draw_mode_;
private:
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698