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

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

Issue 2110683004: cc: Move filters to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 years, 5 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.h ('k') | cc/layers/render_surface_impl.h » ('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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES( 312 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(
313 layer->OnOpacityAnimated(arbitrary_number)); 313 layer->OnOpacityAnimated(arbitrary_number));
314 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBlendMode(arbitrary_blend_mode); 314 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBlendMode(arbitrary_blend_mode);
315 layer->NoteLayerPropertyChanged()); 315 layer->NoteLayerPropertyChanged());
316 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES( 316 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(
317 layer->OnTransformAnimated(arbitrary_transform)); 317 layer->OnTransformAnimated(arbitrary_transform));
318 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBounds(arbitrary_size); 318 VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBounds(arbitrary_size);
319 layer->NoteLayerPropertyChanged()); 319 layer->NoteLayerPropertyChanged());
320 320
321 // Unrelated functions, set to the same values, no needs update. 321 // Unrelated functions, set to the same values, no needs update.
322 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetFilters(arbitrary_filters)); 322 layer->test_properties()->filters = arbitrary_filters;
323 host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting();
324 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(
325 layer->OnFilterAnimated(arbitrary_filters));
323 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetMasksToBounds(true)); 326 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetMasksToBounds(true));
324 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetContentsOpaque(true)); 327 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetContentsOpaque(true));
325 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES( 328 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(
326 layer2->SetPosition(arbitrary_point_f)); 329 layer2->SetPosition(arbitrary_point_f));
327 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->Set3dSortingContextId(1)); 330 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->Set3dSortingContextId(1));
328 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetDrawsContent(true)); 331 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetDrawsContent(true));
329 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES( 332 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(
330 layer->SetBackgroundColor(arbitrary_color)); 333 layer->SetBackgroundColor(arbitrary_color));
331 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES( 334 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(
332 layer->SetBlendMode(arbitrary_blend_mode)); 335 layer->SetBlendMode(arbitrary_blend_mode));
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 561
559 pending_layer->PushPropertiesTo(layer()); 562 pending_layer->PushPropertiesTo(layer());
560 563
561 EXPECT_VECTOR_EQ(gfx::Vector2dF(22, 23), layer()->CurrentScrollOffset()); 564 EXPECT_VECTOR_EQ(gfx::Vector2dF(22, 23), layer()->CurrentScrollOffset());
562 EXPECT_VECTOR_EQ(layer()->CurrentScrollOffset(), 565 EXPECT_VECTOR_EQ(layer()->CurrentScrollOffset(),
563 pending_layer->CurrentScrollOffset()); 566 pending_layer->CurrentScrollOffset());
564 } 567 }
565 568
566 } // namespace 569 } // namespace
567 } // namespace cc 570 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl_test_properties.h ('k') | cc/layers/render_surface_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698