| 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/base/scoped_ptr_vector.h" | 8 #include "cc/base/scoped_ptr_vector.h" |
| 9 #include "cc/output/copy_output_request.h" | 9 #include "cc/output/copy_output_request.h" |
| 10 #include "cc/quads/checkerboard_draw_quad.h" | 10 #include "cc/quads/checkerboard_draw_quad.h" |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 pass_quad->SetNew(pass->shared_quad_state_list.back(), | 218 pass_quad->SetNew(pass->shared_quad_state_list.back(), |
| 219 contrib_output_rect, | 219 contrib_output_rect, |
| 220 contrib_output_rect, | 220 contrib_output_rect, |
| 221 contrib_id, | 221 contrib_id, |
| 222 0, // mask_resource_id | 222 0, // mask_resource_id |
| 223 gfx::RectF(), // mask_uv_rect | 223 gfx::RectF(), // mask_uv_rect |
| 224 FilterOperations(), | 224 FilterOperations(), |
| 225 gfx::Vector2dF(), // filters_scale | 225 gfx::Vector2dF(), // filters_scale |
| 226 FilterOperations()); | 226 FilterOperations()); |
| 227 | 227 |
| 228 pass_list.push_back(pass.PassAs<RenderPass>()); | 228 pass_list.push_back(pass.Pass()); |
| 229 pass_list.push_back(contrib.PassAs<RenderPass>()); | 229 pass_list.push_back(contrib.Pass()); |
| 230 | 230 |
| 231 // Make a copy with CopyAll(). | 231 // Make a copy with CopyAll(). |
| 232 RenderPassList copy_list; | 232 RenderPassList copy_list; |
| 233 RenderPass::CopyAll(pass_list, ©_list); | 233 RenderPass::CopyAll(pass_list, ©_list); |
| 234 | 234 |
| 235 CompareRenderPassLists(pass_list, copy_list); | 235 CompareRenderPassLists(pass_list, copy_list); |
| 236 } | 236 } |
| 237 | 237 |
| 238 TEST(RenderPassTest, CopyAllWithCulledQuads) { | 238 TEST(RenderPassTest, CopyAllWithCulledQuads) { |
| 239 RenderPassList pass_list; | 239 RenderPassList pass_list; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 SkXfermode::kSrcOver_Mode, | 303 SkXfermode::kSrcOver_Mode, |
| 304 0); | 304 0); |
| 305 | 305 |
| 306 CheckerboardDrawQuad* checkerboard_quad2 = | 306 CheckerboardDrawQuad* checkerboard_quad2 = |
| 307 pass->CreateAndAppendDrawQuad<CheckerboardDrawQuad>(); | 307 pass->CreateAndAppendDrawQuad<CheckerboardDrawQuad>(); |
| 308 checkerboard_quad2->SetNew(pass->shared_quad_state_list.back(), | 308 checkerboard_quad2->SetNew(pass->shared_quad_state_list.back(), |
| 309 gfx::Rect(3, 3, 3, 3), | 309 gfx::Rect(3, 3, 3, 3), |
| 310 gfx::Rect(3, 3, 3, 3), | 310 gfx::Rect(3, 3, 3, 3), |
| 311 SkColor()); | 311 SkColor()); |
| 312 | 312 |
| 313 pass_list.push_back(pass.PassAs<RenderPass>()); | 313 pass_list.push_back(pass.Pass()); |
| 314 | 314 |
| 315 // Make a copy with CopyAll(). | 315 // Make a copy with CopyAll(). |
| 316 RenderPassList copy_list; | 316 RenderPassList copy_list; |
| 317 RenderPass::CopyAll(pass_list, ©_list); | 317 RenderPass::CopyAll(pass_list, ©_list); |
| 318 | 318 |
| 319 CompareRenderPassLists(pass_list, copy_list); | 319 CompareRenderPassLists(pass_list, copy_list); |
| 320 } | 320 } |
| 321 | 321 |
| 322 } // namespace | 322 } // namespace |
| 323 } // namespace cc | 323 } // namespace cc |
| OLD | NEW |