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

Unified Diff: cc/layers/layer.h

Issue 332873005: Rendering context information added to SharedQuadState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed RenderingContextId to 3dSortingContextId for clarity. 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
Index: cc/layers/layer.h
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index 9e94b535052c82b8d351be534233f788a4e62e2c..94a76be494b07775fe937c6faba6675ac85b133c 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -320,8 +320,7 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
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 set_use_parent_backface_visibility(bool use) {
use_parent_backface_visibility_ = use;
@@ -458,6 +457,9 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
virtual void RunMicroBenchmark(MicroBenchmark* benchmark);
+ void Set3dSortingContextId(int id);
+ int sorting_context_id() const { return sorting_context_id_; }
+
protected:
friend class LayerImpl;
friend class TreeSynchronizer;
@@ -530,6 +532,9 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
// will be handled implicitly after the update completes.
bool ignore_set_needs_commit_;
+ // The rendering context ID, necessary for properly sorting 3D layers.
enne (OOO) 2014/06/17 00:46:04 This comment is also not that helpful. Maybe some
troyhildebrandt 2014/06/17 16:33:20 Done.
+ int sorting_context_id_;
+
private:
friend class base::RefCounted<Layer>;
@@ -588,7 +593,6 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
bool use_parent_backface_visibility_ : 1;
bool draw_checkerboard_for_missing_tiles_ : 1;
bool force_render_surface_ : 1;
- bool is_3d_sorted_ : 1;
bool transform_is_invertible_ : 1;
Region non_fast_scrollable_region_;
Region touch_event_handler_region_;

Powered by Google App Engine
This is Rietveld 408576698