OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/quads/render_pass.h" | 5 #include "cc/quads/render_pass.h" |
6 | 6 |
7 #include "cc/base/math_util.h" | 7 #include "cc/base/math_util.h" |
8 #include "cc/output/copy_output_request.h" | 8 #include "cc/output/copy_output_request.h" |
9 #include "cc/quads/render_pass_draw_quad.h" | 9 #include "cc/quads/render_pass_draw_quad.h" |
10 #include "cc/quads/solid_color_draw_quad.h" | 10 #include "cc/quads/solid_color_draw_quad.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 contrib_output_rect, | 213 contrib_output_rect, |
214 contrib_output_rect, | 214 contrib_output_rect, |
215 contrib_id, | 215 contrib_id, |
216 0, | 216 0, |
217 gfx::Vector2dF(), | 217 gfx::Vector2dF(), |
218 gfx::Size(), | 218 gfx::Size(), |
219 FilterOperations(), | 219 FilterOperations(), |
220 gfx::Vector2dF(), | 220 gfx::Vector2dF(), |
221 FilterOperations()); | 221 FilterOperations()); |
222 | 222 |
223 pass_list.push_back(pass.Pass()); | 223 pass_list.push_back(std::move(pass)); |
224 pass_list.push_back(contrib.Pass()); | 224 pass_list.push_back(std::move(contrib)); |
225 | 225 |
226 // Make a copy with CopyAll(). | 226 // Make a copy with CopyAll(). |
227 RenderPassList copy_list; | 227 RenderPassList copy_list; |
228 RenderPass::CopyAll(pass_list, ©_list); | 228 RenderPass::CopyAll(pass_list, ©_list); |
229 | 229 |
230 CompareRenderPassLists(pass_list, copy_list); | 230 CompareRenderPassLists(pass_list, copy_list); |
231 } | 231 } |
232 | 232 |
233 TEST(RenderPassTest, CopyAllWithCulledQuads) { | 233 TEST(RenderPassTest, CopyAllWithCulledQuads) { |
234 RenderPassList pass_list; | 234 RenderPassList pass_list; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 1, | 296 1, |
297 SkXfermode::kSrcOver_Mode, | 297 SkXfermode::kSrcOver_Mode, |
298 0); | 298 0); |
299 | 299 |
300 SolidColorDrawQuad* color_quad2 = | 300 SolidColorDrawQuad* color_quad2 = |
301 pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); | 301 pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); |
302 color_quad2->SetNew(pass->shared_quad_state_list.back(), | 302 color_quad2->SetNew(pass->shared_quad_state_list.back(), |
303 gfx::Rect(3, 3, 3, 3), gfx::Rect(3, 3, 3, 3), SkColor(), | 303 gfx::Rect(3, 3, 3, 3), gfx::Rect(3, 3, 3, 3), SkColor(), |
304 false); | 304 false); |
305 | 305 |
306 pass_list.push_back(pass.Pass()); | 306 pass_list.push_back(std::move(pass)); |
307 | 307 |
308 // Make a copy with CopyAll(). | 308 // Make a copy with CopyAll(). |
309 RenderPassList copy_list; | 309 RenderPassList copy_list; |
310 RenderPass::CopyAll(pass_list, ©_list); | 310 RenderPass::CopyAll(pass_list, ©_list); |
311 | 311 |
312 CompareRenderPassLists(pass_list, copy_list); | 312 CompareRenderPassLists(pass_list, copy_list); |
313 } | 313 } |
314 | 314 |
315 } // namespace | 315 } // namespace |
316 } // namespace cc | 316 } // namespace cc |
OLD | NEW |