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 24 matching lines...) Expand all Loading... |
35 void CreateRenderPassDrawQuad(RenderPass* pass, | 35 void CreateRenderPassDrawQuad(RenderPass* pass, |
36 const gfx::Transform& transform, | 36 const gfx::Transform& transform, |
37 const gfx::Rect& root_rect, | 37 const gfx::Rect& root_rect, |
38 const gfx::Rect& quad_rect, | 38 const gfx::Rect& quad_rect, |
39 int render_pass_id) { | 39 int render_pass_id) { |
40 CreateSharedQuadState(pass, transform, root_rect); | 40 CreateSharedQuadState(pass, transform, root_rect); |
41 RenderPassDrawQuad* render_pass_quad = | 41 RenderPassDrawQuad* render_pass_quad = |
42 pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 42 pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
43 render_pass_quad->SetNew(pass->shared_quad_state_list.back(), quad_rect, | 43 render_pass_quad->SetNew(pass->shared_quad_state_list.back(), quad_rect, |
44 quad_rect, render_pass_id, ResourceId(), | 44 quad_rect, render_pass_id, ResourceId(), |
45 gfx::Vector2dF(), gfx::Size(), FilterOperations(), | 45 gfx::Vector2dF(), gfx::Size(), gfx::Vector2dF(), |
46 gfx::Vector2dF(), gfx::PointF(), FilterOperations()); | 46 gfx::PointF()); |
47 } | 47 } |
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>(); |
(...skipping 63 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. | 120 // If the point provided falls outside the inset, then we accept this surface. |
121 if (!bounds.Contains(point_in_quad_space)) { | 121 if (!bounds.Contains(point_in_quad_space)) { |
122 ++accept_target_overrides_; | 122 ++accept_target_overrides_; |
123 return true; | 123 return true; |
124 } | 124 } |
125 return false; | 125 return false; |
126 } | 126 } |
127 | 127 |
128 } // namespace test | 128 } // namespace test |
129 } // namespace cc | 129 } // namespace cc |
OLD | NEW |