| 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/test/layer_test_common.h" | 5 #include "cc/test/layer_test_common.h" |
| 6 | 6 |
| 7 #include "cc/base/math_util.h" | 7 #include "cc/base/math_util.h" |
| 8 #include "cc/base/region.h" | 8 #include "cc/base/region.h" |
| 9 #include "cc/layers/append_quads_data.h" | 9 #include "cc/layers/append_quads_data.h" |
| 10 #include "cc/quads/draw_quad.h" | 10 #include "cc/quads/draw_quad.h" |
| 11 #include "cc/quads/render_pass.h" | 11 #include "cc/quads/render_pass.h" |
| 12 #include "cc/test/fake_output_surface.h" | 12 #include "cc/test/fake_output_surface.h" |
| 13 #include "cc/test/mock_occlusion_tracker.h" | 13 #include "cc/test/mock_occlusion_tracker.h" |
| 14 #include "cc/trees/layer_tree_host_common.h" | 14 #include "cc/trees/layer_tree_host_common.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 #include "ui/gfx/point_conversions.h" | 16 #include "ui/gfx/geometry/point_conversions.h" |
| 17 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/geometry/rect.h" |
| 18 #include "ui/gfx/rect_conversions.h" | 18 #include "ui/gfx/geometry/rect_conversions.h" |
| 19 #include "ui/gfx/size_conversions.h" | 19 #include "ui/gfx/geometry/size_conversions.h" |
| 20 | 20 |
| 21 namespace cc { | 21 namespace cc { |
| 22 | 22 |
| 23 // Align with expected and actual output. | 23 // Align with expected and actual output. |
| 24 const char* LayerTestCommon::quad_string = " Quad: "; | 24 const char* LayerTestCommon::quad_string = " Quad: "; |
| 25 | 25 |
| 26 static bool CanRectFBeSafelyRoundedToRect(const gfx::RectF& r) { | 26 static bool CanRectFBeSafelyRoundedToRect(const gfx::RectF& r) { |
| 27 // Ensure that range of float values is not beyond integer range. | 27 // Ensure that range of float values is not beyond integer range. |
| 28 if (!r.IsExpressibleAsRect()) | 28 if (!r.IsExpressibleAsRect()) |
| 29 return false; | 29 return false; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 render_pass_->shared_quad_state_list.clear(); | 161 render_pass_->shared_quad_state_list.clear(); |
| 162 occlusion_tracker_.set_occluded_target_rect_for_contributing_surface( | 162 occlusion_tracker_.set_occluded_target_rect_for_contributing_surface( |
| 163 occluded); | 163 occluded); |
| 164 bool for_replica = false; | 164 bool for_replica = false; |
| 165 RenderPassId id(1, 1); | 165 RenderPassId id(1, 1); |
| 166 surface_impl->AppendQuads( | 166 surface_impl->AppendQuads( |
| 167 render_pass_.get(), occlusion_tracker_, &data, for_replica, id); | 167 render_pass_.get(), occlusion_tracker_, &data, for_replica, id); |
| 168 } | 168 } |
| 169 | 169 |
| 170 } // namespace cc | 170 } // namespace cc |
| OLD | NEW |