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

Side by Side Diff: cc/trees/layer_tree_host_common_unittest.cc

Issue 2099743002: cc: Move background filters to the effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ' 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/trees/draw_property_utils.cc ('k') | cc/trees/occlusion_tracker.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/trees/layer_tree_host_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 gfx::PointF(), gfx::Size(10, 10), true, false, 1330 gfx::PointF(), gfx::Size(10, 10), true, false,
1331 true); 1331 true);
1332 SetLayerPropertiesForTesting(child, identity_matrix, gfx::Point3F(), 1332 SetLayerPropertiesForTesting(child, identity_matrix, gfx::Point3F(),
1333 gfx::PointF(), gfx::Size(10, 10), true, false, 1333 gfx::PointF(), gfx::Size(10, 10), true, false,
1334 false); 1334 false);
1335 render_surface1->test_properties()->opacity = 0.f; 1335 render_surface1->test_properties()->opacity = 0.f;
1336 render_surface1->SetDrawsContent(true); 1336 render_surface1->SetDrawsContent(true);
1337 child->SetDrawsContent(true); 1337 child->SetDrawsContent(true);
1338 FilterOperations filters; 1338 FilterOperations filters;
1339 filters.Append(FilterOperation::CreateBlurFilter(1.5f)); 1339 filters.Append(FilterOperation::CreateBlurFilter(1.5f));
1340 render_surface1->SetBackgroundFilters(filters); 1340 render_surface1->test_properties()->background_filters = filters;
1341 1341
1342 { 1342 {
1343 LayerImplList render_surface_layer_list; 1343 LayerImplList render_surface_layer_list;
1344 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( 1344 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs(
1345 parent, parent->bounds(), &render_surface_layer_list); 1345 parent, parent->bounds(), &render_surface_layer_list);
1346 inputs.can_adjust_raster_scales = true; 1346 inputs.can_adjust_raster_scales = true;
1347 LayerTreeHostCommon::CalculateDrawPropertiesForTesting(&inputs); 1347 LayerTreeHostCommon::CalculateDrawPropertiesForTesting(&inputs);
1348 EXPECT_EQ(2U, render_surface_layer_list.size()); 1348 EXPECT_EQ(2U, render_surface_layer_list.size());
1349 } 1349 }
1350 // The layer is fully transparent, but has a background filter, so it 1350 // The layer is fully transparent, but has a background filter, so it
(...skipping 8975 matching lines...) Expand 10 before | Expand all | Expand 10 after
10326 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index()); 10326 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index());
10327 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index()); 10327 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index());
10328 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index()); 10328 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index());
10329 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index()); 10329 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index());
10330 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index()); 10330 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index());
10331 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index()); 10331 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index());
10332 } 10332 }
10333 10333
10334 } // namespace 10334 } // namespace
10335 } // namespace cc 10335 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/draw_property_utils.cc ('k') | cc/trees/occlusion_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698