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/output/delegated_frame_data.h" | 8 #include "cc/output/delegated_frame_data.h" |
9 #include "cc/quads/render_pass_draw_quad.h" | 9 #include "cc/quads/render_pass_draw_quad.h" |
10 #include "cc/quads/shared_quad_state.h" | 10 #include "cc/quads/shared_quad_state.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 std::unique_ptr<RenderPass> render_pass = RenderPass::Create(); | 66 std::unique_ptr<RenderPass> render_pass = RenderPass::Create(); |
67 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); |
68 render_pass_list->push_back(std::move(render_pass)); | 68 render_pass_list->push_back(std::move(render_pass)); |
69 } | 69 } |
70 | 70 |
71 std::unique_ptr<CompositorFrame> CreateCompositorFrameWithRenderPassList( | 71 std::unique_ptr<CompositorFrame> CreateCompositorFrameWithRenderPassList( |
72 RenderPassList* render_pass_list) { | 72 RenderPassList* render_pass_list) { |
73 std::unique_ptr<DelegatedFrameData> root_delegated_frame_data( | 73 std::unique_ptr<DelegatedFrameData> root_delegated_frame_data( |
74 new DelegatedFrameData); | 74 new DelegatedFrameData); |
75 root_delegated_frame_data->render_pass_list.swap(*render_pass_list); | 75 root_delegated_frame_data->render_pass_list.swap(*render_pass_list); |
76 std::unique_ptr<CompositorFrame> root_frame(new CompositorFrame); | 76 std::unique_ptr<CompositorFrame> root_frame(CompositorFrame::Create()); |
77 root_frame->delegated_frame_data = std::move(root_delegated_frame_data); | 77 root_frame->delegated_frame_data = std::move(root_delegated_frame_data); |
78 return root_frame; | 78 return root_frame; |
79 } | 79 } |
80 | 80 |
81 std::unique_ptr<CompositorFrame> CreateCompositorFrame( | 81 std::unique_ptr<CompositorFrame> CreateCompositorFrame( |
82 const gfx::Rect& root_rect, | 82 const gfx::Rect& root_rect, |
83 RenderPass** render_pass) { | 83 RenderPass** render_pass) { |
84 RenderPassList render_pass_list; | 84 RenderPassList render_pass_list; |
85 RenderPassId root_id(1, 1); | 85 RenderPassId root_id(1, 1); |
86 CreateRenderPass(root_id, root_rect, gfx::Transform(), &render_pass_list); | 86 CreateRenderPass(root_id, root_rect, gfx::Transform(), &render_pass_list); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // If the point provided falls outside the inset, then we accept this surface. | 136 // If the point provided falls outside the inset, then we accept this surface. |
137 if (!bounds.Contains(point_in_quad_space)) { | 137 if (!bounds.Contains(point_in_quad_space)) { |
138 ++accept_target_overrides_; | 138 ++accept_target_overrides_; |
139 return true; | 139 return true; |
140 } | 140 } |
141 return false; | 141 return false; |
142 } | 142 } |
143 | 143 |
144 } // namespace test | 144 } // namespace test |
145 } // namespace cc | 145 } // namespace cc |
OLD | NEW |