| 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 26 matching lines...) Expand all Loading... |
| 37 const gfx::Transform& transform, | 37 const gfx::Transform& transform, |
| 38 const gfx::Rect& root_rect, | 38 const gfx::Rect& root_rect, |
| 39 const gfx::Rect& quad_rect, | 39 const gfx::Rect& quad_rect, |
| 40 const RenderPassId& render_pass_id) { | 40 const RenderPassId& render_pass_id) { |
| 41 CreateSharedQuadState(pass, transform, root_rect); | 41 CreateSharedQuadState(pass, transform, root_rect); |
| 42 RenderPassDrawQuad* render_pass_quad = | 42 RenderPassDrawQuad* render_pass_quad = |
| 43 pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 43 pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
| 44 render_pass_quad->SetNew(pass->shared_quad_state_list.back(), quad_rect, | 44 render_pass_quad->SetNew(pass->shared_quad_state_list.back(), quad_rect, |
| 45 quad_rect, render_pass_id, ResourceId(), | 45 quad_rect, render_pass_id, ResourceId(), |
| 46 gfx::Vector2dF(), gfx::Size(), FilterOperations(), | 46 gfx::Vector2dF(), gfx::Size(), FilterOperations(), |
| 47 gfx::Vector2dF(), FilterOperations()); | 47 gfx::Vector2dF(), gfx::PointF(), FilterOperations()); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void CreateSurfaceDrawQuad(RenderPass* pass, | 50 void CreateSurfaceDrawQuad(RenderPass* pass, |
| 51 const gfx::Transform& transform, | 51 const gfx::Transform& transform, |
| 52 const gfx::Rect& root_rect, | 52 const gfx::Rect& root_rect, |
| 53 const gfx::Rect& quad_rect, | 53 const gfx::Rect& quad_rect, |
| 54 SurfaceId surface_id) { | 54 SurfaceId surface_id) { |
| 55 CreateSharedQuadState(pass, transform, root_rect); | 55 CreateSharedQuadState(pass, transform, root_rect); |
| 56 SurfaceDrawQuad* surface_quad = | 56 SurfaceDrawQuad* surface_quad = |
| 57 pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); | 57 pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // If the point provided falls outside the inset, then we accept this surface. | 134 // If the point provided falls outside the inset, then we accept this surface. |
| 135 if (!bounds.Contains(point_in_quad_space)) { | 135 if (!bounds.Contains(point_in_quad_space)) { |
| 136 ++accept_target_overrides_; | 136 ++accept_target_overrides_; |
| 137 return true; | 137 return true; |
| 138 } | 138 } |
| 139 return false; | 139 return false; |
| 140 } | 140 } |
| 141 | 141 |
| 142 } // namespace test | 142 } // namespace test |
| 143 } // namespace cc | 143 } // namespace cc |
| OLD | NEW |