| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/surface_hittest_test_helpers.h" | 5 #include "cc/test/surface_hittest_test_helpers.h" |
| 6 | 6 |
| 7 #include "cc/output/compositor_frame.h" | 7 #include "cc/output/compositor_frame.h" |
| 8 #include "cc/quads/render_pass_draw_quad.h" | 8 #include "cc/quads/render_pass_draw_quad.h" |
| 9 #include "cc/quads/shared_quad_state.h" | 9 #include "cc/quads/shared_quad_state.h" |
| 10 #include "cc/quads/solid_color_draw_quad.h" | 10 #include "cc/quads/solid_color_draw_quad.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 void CreateSurfaceDrawQuad(RenderPass* pass, | 49 void CreateSurfaceDrawQuad(RenderPass* pass, |
| 50 const gfx::Transform& transform, | 50 const gfx::Transform& transform, |
| 51 const gfx::Rect& root_rect, | 51 const gfx::Rect& root_rect, |
| 52 const gfx::Rect& quad_rect, | 52 const gfx::Rect& quad_rect, |
| 53 SurfaceId surface_id) { | 53 SurfaceId surface_id) { |
| 54 CreateSharedQuadState(pass, transform, root_rect); | 54 CreateSharedQuadState(pass, transform, root_rect); |
| 55 SurfaceDrawQuad* surface_quad = | 55 SurfaceDrawQuad* surface_quad = |
| 56 pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); | 56 pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); |
| 57 surface_quad->SetNew(pass->shared_quad_state_list.back(), quad_rect, | 57 surface_quad->SetNew(pass->shared_quad_state_list.back(), quad_rect, |
| 58 quad_rect, surface_id); | 58 quad_rect, surface_id, SurfaceDrawQuadType::PRIMARY, |
| 59 nullptr); |
| 59 } | 60 } |
| 60 | 61 |
| 61 void CreateRenderPass(int render_pass_id, | 62 void CreateRenderPass(int render_pass_id, |
| 62 const gfx::Rect& rect, | 63 const gfx::Rect& rect, |
| 63 const gfx::Transform& transform_to_root_target, | 64 const gfx::Transform& transform_to_root_target, |
| 64 RenderPassList* render_pass_list) { | 65 RenderPassList* render_pass_list) { |
| 65 std::unique_ptr<RenderPass> render_pass = RenderPass::Create(); | 66 std::unique_ptr<RenderPass> render_pass = RenderPass::Create(); |
| 66 render_pass->SetNew(render_pass_id, rect, rect, transform_to_root_target); | 67 render_pass->SetNew(render_pass_id, rect, rect, transform_to_root_target); |
| 67 render_pass_list->push_back(std::move(render_pass)); | 68 render_pass_list->push_back(std::move(render_pass)); |
| 68 } | 69 } |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // If the point provided falls outside the inset, then we accept this surface. | 121 // If the point provided falls outside the inset, then we accept this surface. |
| 121 if (!bounds.Contains(point_in_quad_space)) { | 122 if (!bounds.Contains(point_in_quad_space)) { |
| 122 ++accept_target_overrides_; | 123 ++accept_target_overrides_; |
| 123 return true; | 124 return true; |
| 124 } | 125 } |
| 125 return false; | 126 return false; |
| 126 } | 127 } |
| 127 | 128 |
| 128 } // namespace test | 129 } // namespace test |
| 129 } // namespace cc | 130 } // namespace cc |
| OLD | NEW |