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

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

Issue 15579002: Implement transform/clip support for Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Turn on fuzzy comparator for new SoftwareRenderer tests Created 7 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
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/damage_tracker.h" 5 #include "cc/trees/damage_tracker.h"
6 6
7 #include "cc/base/math_util.h" 7 #include "cc/base/math_util.h"
8 #include "cc/layers/layer_impl.h" 8 #include "cc/layers/layer_impl.h"
9 #include "cc/test/fake_impl_proxy.h" 9 #include "cc/test/fake_impl_proxy.h"
10 #include "cc/test/fake_layer_tree_host_impl.h" 10 #include "cc/test/fake_layer_tree_host_impl.h"
(...skipping 18 matching lines...) Expand all
29 int dummy_max_texture_size = 512; 29 int dummy_max_texture_size = 512;
30 30
31 // Sanity check: The test itself should create the root layer's render 31 // Sanity check: The test itself should create the root layer's render
32 // surface, so that the surface (and its damage tracker) can 32 // surface, so that the surface (and its damage tracker) can
33 // persist across multiple calls to this function. 33 // persist across multiple calls to this function.
34 ASSERT_TRUE(root->render_surface()); 34 ASSERT_TRUE(root->render_surface());
35 ASSERT_FALSE(render_surface_layer_list.size()); 35 ASSERT_FALSE(render_surface_layer_list.size());
36 36
37 LayerTreeHostCommon::CalculateDrawProperties(root, 37 LayerTreeHostCommon::CalculateDrawProperties(root,
38 root->bounds(), 38 root->bounds(),
39 gfx::Transform(),
39 1.f, 40 1.f,
40 1.f, 41 1.f,
41 NULL, 42 NULL,
42 dummy_max_texture_size, 43 dummy_max_texture_size,
43 false, 44 false,
44 false, 45 false,
45 &render_surface_layer_list); 46 &render_surface_layer_list);
46 } 47 }
47 48
48 void ClearDamageForAllSurfaces(LayerImpl* layer) { 49 void ClearDamageForAllSurfaces(LayerImpl* layer) {
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 // Damage should remain empty even after one frame, since there's yet no new 1353 // Damage should remain empty even after one frame, since there's yet no new
1353 // damage. 1354 // damage.
1354 EmulateDrawingOneFrame(root.get()); 1355 EmulateDrawingOneFrame(root.get());
1355 root_damage_rect = 1356 root_damage_rect =
1356 root->render_surface()->damage_tracker()->current_damage_rect(); 1357 root->render_surface()->damage_tracker()->current_damage_rect();
1357 EXPECT_TRUE(root_damage_rect.IsEmpty()); 1358 EXPECT_TRUE(root_damage_rect.IsEmpty());
1358 } 1359 }
1359 1360
1360 } // namespace 1361 } // namespace
1361 } // namespace cc 1362 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698