OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/resources/picture_layer_tiling.h" | 5 #include "cc/resources/picture_layer_tiling.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
11 #include "cc/resources/picture_layer_tiling_set.h" | 11 #include "cc/resources/picture_layer_tiling_set.h" |
12 #include "cc/test/fake_output_surface.h" | 12 #include "cc/test/fake_output_surface.h" |
13 #include "cc/test/fake_output_surface_client.h" | 13 #include "cc/test/fake_output_surface_client.h" |
14 #include "cc/test/fake_picture_layer_tiling_client.h" | 14 #include "cc/test/fake_picture_layer_tiling_client.h" |
15 #include "cc/test/test_context_provider.h" | 15 #include "cc/test/test_context_provider.h" |
16 #include "cc/test/test_shared_bitmap_manager.h" | 16 #include "cc/test/test_shared_bitmap_manager.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "ui/gfx/rect_conversions.h" | 18 #include "ui/gfx/geometry/quad_f.h" |
19 #include "ui/gfx/size_conversions.h" | 19 #include "ui/gfx/geometry/rect_conversions.h" |
| 20 #include "ui/gfx/geometry/size_conversions.h" |
20 | 21 |
21 namespace cc { | 22 namespace cc { |
22 namespace { | 23 namespace { |
23 | 24 |
24 static gfx::Rect ViewportInLayerSpace( | 25 static gfx::Rect ViewportInLayerSpace( |
25 const gfx::Transform& transform, | 26 const gfx::Transform& transform, |
26 const gfx::Size& device_viewport) { | 27 const gfx::Size& device_viewport) { |
27 | 28 |
28 gfx::Transform inverse; | 29 gfx::Transform inverse; |
29 if (!transform.GetInverse(&inverse)) | 30 if (!transform.GetInverse(&inverse)) |
(...skipping 2135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2165 EXPECT_EQ(active_tiling->TileAt(0, 0), recycle_tiling->TileAt(0, 0)); | 2166 EXPECT_EQ(active_tiling->TileAt(0, 0), recycle_tiling->TileAt(0, 0)); |
2166 | 2167 |
2167 // Reset the active tiling. The recycle tiles should be released too. | 2168 // Reset the active tiling. The recycle tiles should be released too. |
2168 active_tiling->Reset(); | 2169 active_tiling->Reset(); |
2169 EXPECT_FALSE(active_tiling->TileAt(0, 0)); | 2170 EXPECT_FALSE(active_tiling->TileAt(0, 0)); |
2170 EXPECT_FALSE(recycle_tiling->TileAt(0, 0)); | 2171 EXPECT_FALSE(recycle_tiling->TileAt(0, 0)); |
2171 } | 2172 } |
2172 | 2173 |
2173 } // namespace | 2174 } // namespace |
2174 } // namespace cc | 2175 } // namespace cc |
OLD | NEW |