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

Unified Diff: cc/layers/layer_impl_unittest.cc

Issue 332873005: Rendering context information added to SharedQuadState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rendering context now in Layers, removed is_3d_sorted 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_impl_unittest.cc
diff --git a/cc/layers/layer_impl_unittest.cc b/cc/layers/layer_impl_unittest.cc
index 51939e459dea468c50f1565c30b93a25fccaff39..87eac8636d0944160d528e3b5025ac24b9897284 100644
--- a/cc/layers/layer_impl_unittest.cc
+++ b/cc/layers/layer_impl_unittest.cc
@@ -155,7 +155,8 @@ TEST(LayerImplTest, VerifyLayerChangesAreTrackedProperly) {
root->SetReplicaLayer(LayerImpl::Create(host_impl.active_tree(), 10)));
EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetPosition(arbitrary_point_f));
EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetShouldFlattenTransform(false));
- EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetIs3dSorted(true));
+ // Set rendering context ID to 1 for 3D sorting
danakj 2014/06/15 18:15:35 Don't need these comments here. Were just setting
troyhildebrandt 2014/06/17 00:29:43 Done.
+ EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetRenderingContextId(1));
EXECUTE_AND_VERIFY_SUBTREE_CHANGED(
root->SetDoubleSided(false)); // constructor initializes it to "true".
EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->ScrollBy(arbitrary_vector2d));
@@ -209,7 +210,8 @@ TEST(LayerImplTest, VerifyLayerChangesAreTrackedProperly) {
root->SetPosition(arbitrary_point_f));
EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(
root->SetShouldFlattenTransform(false));
- EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->SetIs3dSorted(true));
+ // Set rendering context ID to 1 for 3D sorting
+ EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->SetRenderingContextId(1));
EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(
root->SetTransform(arbitrary_transform));
EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(
@@ -303,7 +305,8 @@ TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties) {
layer->SetReplicaLayer(LayerImpl::Create(host_impl.active_tree(), 5)));
VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetPosition(arbitrary_point_f));
VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetShouldFlattenTransform(false));
- VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetIs3dSorted(true));
+ // Set rendering context ID to 1 for 3D sorting
+ VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetRenderingContextId(1));
VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(
layer->SetDoubleSided(false)); // constructor initializes it to "true".
@@ -328,7 +331,8 @@ TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties) {
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetMasksToBounds(true));
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetContentsOpaque(true));
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetPosition(arbitrary_point_f));
- VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetIs3dSorted(true));
+ // Set rendering context ID to 1 for 3D sorting
+ VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetRenderingContextId(1));
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(
layer->SetDoubleSided(false)); // constructor initializes it to "true".
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(

Powered by Google App Engine
This is Rietveld 408576698