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

Side by Side Diff: cc/layers/layer_impl_unittest.cc

Issue 2035863003: cc: Add mask and replica layer ids to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 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 unified diff | Download patch
« no previous file with comments | « cc/layers/layer_impl_test_properties.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/layer_impl.h" 5 #include "cc/layers/layer_impl.h"
6 6
7 #include "cc/animation/mutable_properties.h" 7 #include "cc/animation/mutable_properties.h"
8 #include "cc/layers/painted_scrollbar_layer_impl.h" 8 #include "cc/layers/painted_scrollbar_layer_impl.h"
9 #include "cc/layers/solid_color_scrollbar_layer_impl.h" 9 #include "cc/layers/solid_color_scrollbar_layer_impl.h"
10 #include "cc/output/filter_operation.h" 10 #include "cc/output/filter_operation.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 layer->layer_tree_impl() 293 layer->layer_tree_impl()
294 ->property_trees() 294 ->property_trees()
295 ->scroll_tree.SetScrollOffsetDeltaForTesting(layer->id(), 295 ->scroll_tree.SetScrollOffsetDeltaForTesting(layer->id(),
296 gfx::Vector2dF()); 296 gfx::Vector2dF());
297 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetCurrentScrollOffset( 297 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetCurrentScrollOffset(
298 gfx::ScrollOffset(arbitrary_vector2d.x(), arbitrary_vector2d.y()))); 298 gfx::ScrollOffset(arbitrary_vector2d.x(), arbitrary_vector2d.y())));
299 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetCurrentScrollOffset( 299 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetCurrentScrollOffset(
300 gfx::ScrollOffset(arbitrary_vector2d.x(), arbitrary_vector2d.y()))); 300 gfx::ScrollOffset(arbitrary_vector2d.x(), arbitrary_vector2d.y())));
301 301
302 // Unrelated functions, always set to new values, always set needs update. 302 // Unrelated functions, always set to new values, always set needs update.
303 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(
304 layer->SetMaskLayer(LayerImpl::Create(host_impl.active_tree(), 4));
305 layer->NoteLayerPropertyChanged());
306 host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting(); 303 host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting();
307 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetMasksToBounds(true); 304 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetMasksToBounds(true);
308 layer->NoteLayerPropertyChanged()); 305 layer->NoteLayerPropertyChanged());
309 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetContentsOpaque(true); 306 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetContentsOpaque(true);
310 layer->NoteLayerPropertyChanged()); 307 layer->NoteLayerPropertyChanged());
311 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(
312 layer->SetReplicaLayer(LayerImpl::Create(host_impl.active_tree(), 5));
313 layer->NoteLayerPropertyChanged());
314 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer2->SetPosition(arbitrary_point_f); 308 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer2->SetPosition(arbitrary_point_f);
315 layer->NoteLayerPropertyChanged()); 309 layer->NoteLayerPropertyChanged());
316 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->Set3dSortingContextId(1); 310 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->Set3dSortingContextId(1);
317 layer->NoteLayerPropertyChanged()); 311 layer->NoteLayerPropertyChanged());
318 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES( 312 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(
319 layer->SetBackgroundColor(arbitrary_color)); 313 layer->SetBackgroundColor(arbitrary_color));
320 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES( 314 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(
321 layer->SetBackgroundFilters(arbitrary_filters)); 315 layer->SetBackgroundFilters(arbitrary_filters));
322 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES( 316 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(
323 layer->OnOpacityAnimated(arbitrary_number)); 317 layer->OnOpacityAnimated(arbitrary_number));
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 560
567 pending_layer->PushPropertiesTo(layer()); 561 pending_layer->PushPropertiesTo(layer());
568 562
569 EXPECT_VECTOR_EQ(gfx::Vector2dF(22, 23), layer()->CurrentScrollOffset()); 563 EXPECT_VECTOR_EQ(gfx::Vector2dF(22, 23), layer()->CurrentScrollOffset());
570 EXPECT_VECTOR_EQ(layer()->CurrentScrollOffset(), 564 EXPECT_VECTOR_EQ(layer()->CurrentScrollOffset(),
571 pending_layer->CurrentScrollOffset()); 565 pending_layer->CurrentScrollOffset());
572 } 566 }
573 567
574 } // namespace 568 } // namespace
575 } // namespace cc 569 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl_test_properties.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698