OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/surfaces/surface_aggregator_test_helpers.h" | 5 #include "cc/surfaces/surface_aggregator_test_helpers.h" |
6 | 6 |
7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "cc/layers/append_quads_data.h" | 9 #include "cc/layers/append_quads_data.h" |
10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 0); | 44 0); |
45 | 45 |
46 SurfaceDrawQuad* surface_quad = | 46 SurfaceDrawQuad* surface_quad = |
47 pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); | 47 pass->CreateAndAppendDrawQuad<SurfaceDrawQuad>(); |
48 gfx::Rect quad_rect = gfx::Rect(surface_size); | 48 gfx::Rect quad_rect = gfx::Rect(surface_size); |
49 surface_quad->SetNew(pass->shared_quad_state_list.back(), | 49 surface_quad->SetNew(pass->shared_quad_state_list.back(), |
50 gfx::Rect(surface_size), | 50 gfx::Rect(surface_size), |
51 gfx::Rect(surface_size), | 51 gfx::Rect(surface_size), |
52 surface_id); | 52 surface_id); |
53 } | 53 } |
54 void AddTestRenderPassQuad(TestRenderPass* pass, | 54 void AddTestRenderPassQuad(TestRenderPass* pass, RenderPassId render_pass_id) { |
55 RenderPass::Id render_pass_id) { | |
56 gfx::Rect output_rect = gfx::Rect(0, 0, 5, 5); | 55 gfx::Rect output_rect = gfx::Rect(0, 0, 5, 5); |
57 SharedQuadState* shared_state = pass->CreateAndAppendSharedQuadState(); | 56 SharedQuadState* shared_state = pass->CreateAndAppendSharedQuadState(); |
58 shared_state->SetAll(gfx::Transform(), | 57 shared_state->SetAll(gfx::Transform(), |
59 output_rect.size(), | 58 output_rect.size(), |
60 output_rect, | 59 output_rect, |
61 output_rect, | 60 output_rect, |
62 false, | 61 false, |
63 1, | 62 1, |
64 SkXfermode::kSrcOver_Mode, | 63 SkXfermode::kSrcOver_Mode, |
65 0); | 64 0); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 138 |
140 for (size_t i = 0; i < passes->size(); ++i) { | 139 for (size_t i = 0; i < passes->size(); ++i) { |
141 SCOPED_TRACE(base::StringPrintf("Pass number %" PRIuS, i)); | 140 SCOPED_TRACE(base::StringPrintf("Pass number %" PRIuS, i)); |
142 RenderPass* pass = passes->at(i); | 141 RenderPass* pass = passes->at(i); |
143 TestPassMatchesExpectations(expected_passes[i], pass); | 142 TestPassMatchesExpectations(expected_passes[i], pass); |
144 } | 143 } |
145 } | 144 } |
146 | 145 |
147 } // namespace test | 146 } // namespace test |
148 } // namespace cc | 147 } // namespace cc |
OLD | NEW |