| 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/layers/delegated_renderer_layer_impl.h" | 5 #include "cc/layers/delegated_renderer_layer_impl.h" |
| 6 | 6 |
| 7 #include "cc/base/scoped_ptr_vector.h" | 7 #include "cc/base/scoped_ptr_vector.h" |
| 8 #include "cc/layers/solid_color_layer_impl.h" | 8 #include "cc/layers/solid_color_layer_impl.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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 root_pass_clip_rect, | 568 root_pass_clip_rect, |
| 569 root_pass_clipped, | 569 root_pass_clipped, |
| 570 1.f, | 570 1.f, |
| 571 SkXfermode::kSrcOver_Mode, | 571 SkXfermode::kSrcOver_Mode, |
| 572 0); | 572 0); |
| 573 | 573 |
| 574 RenderPassDrawQuad* render_pass_quad = | 574 RenderPassDrawQuad* render_pass_quad = |
| 575 pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 575 pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
| 576 render_pass_quad->SetNew( | 576 render_pass_quad->SetNew( |
| 577 shared_quad_state, | 577 shared_quad_state, |
| 578 gfx::Rect(5, 5, 7, 7), // quad_rect | 578 gfx::Rect(5, 5, 7, 7), // quad_rect |
| 579 gfx::Rect(5, 5, 7, 7), // visible_rect | 579 gfx::Rect(5, 5, 7, 7), // visible_rect |
| 580 RenderPass::Id(10, 7), // render_pass_id | 580 RenderPass::Id(10, 7), // render_pass_id |
| 581 false, // is_replica | 581 false, // is_replica |
| 582 0, // mask_resource_id | 582 0, // mask_resource_id |
| 583 child_pass_rect, // contents_changed_since_last_frame | 583 child_pass_rect, // contents_changed_since_last_frame |
| 584 gfx::RectF(), // mask_uv_rect | 584 gfx::RectF(), // mask_uv_rect |
| 585 FilterOperations(), // filters | 585 FilterOperations(), // filters |
| 586 FilterOperations()); // background_filters | 586 FilterOperations(), // background_filters |
| 587 gfx::Vector2dF(1.f, 1.f)); // scale |
| 587 | 588 |
| 588 SolidColorDrawQuad* color_quad; | 589 SolidColorDrawQuad* color_quad; |
| 589 color_quad = pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); | 590 color_quad = pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); |
| 590 color_quad->SetNew(shared_quad_state, | 591 color_quad->SetNew(shared_quad_state, |
| 591 gfx::Rect(0, 0, 10, 10), | 592 gfx::Rect(0, 0, 10, 10), |
| 592 gfx::Rect(0, 0, 10, 10), | 593 gfx::Rect(0, 0, 10, 10), |
| 593 1u, | 594 1u, |
| 594 false); | 595 false); |
| 595 | 596 |
| 596 color_quad = pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); | 597 color_quad = pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1004 root_pass_clip_rect, | 1005 root_pass_clip_rect, |
| 1005 root_pass_clipped, | 1006 root_pass_clipped, |
| 1006 1.f, | 1007 1.f, |
| 1007 SkXfermode::kSrcOver_Mode, | 1008 SkXfermode::kSrcOver_Mode, |
| 1008 0); | 1009 0); |
| 1009 | 1010 |
| 1010 RenderPassDrawQuad* render_pass_quad = | 1011 RenderPassDrawQuad* render_pass_quad = |
| 1011 pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 1012 pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
| 1012 render_pass_quad->SetNew( | 1013 render_pass_quad->SetNew( |
| 1013 shared_quad_state, | 1014 shared_quad_state, |
| 1014 gfx::Rect(5, 5, 7, 7), // quad_rect | 1015 gfx::Rect(5, 5, 7, 7), // quad_rect |
| 1015 gfx::Rect(5, 5, 7, 7), // visible_quad_rect | 1016 gfx::Rect(5, 5, 7, 7), // visible_quad_rect |
| 1016 RenderPass::Id(10, 7), // render_pass_id | 1017 RenderPass::Id(10, 7), // render_pass_id |
| 1017 false, // is_replica | 1018 false, // is_replica |
| 1018 0, // mask_resource_id | 1019 0, // mask_resource_id |
| 1019 child_pass_rect, // contents_changed_since_last_frame | 1020 child_pass_rect, // contents_changed_since_last_frame |
| 1020 gfx::RectF(), // mask_uv_rect | 1021 gfx::RectF(), // mask_uv_rect |
| 1021 FilterOperations(), // filters | 1022 FilterOperations(), // filters |
| 1022 FilterOperations()); // background_filters | 1023 FilterOperations(), // background_filters |
| 1024 gfx::Vector2dF(1.f, 1.f)); // scale |
| 1023 | 1025 |
| 1024 SolidColorDrawQuad* color_quad; | 1026 SolidColorDrawQuad* color_quad; |
| 1025 color_quad = pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); | 1027 color_quad = pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); |
| 1026 color_quad->SetNew(shared_quad_state, | 1028 color_quad->SetNew(shared_quad_state, |
| 1027 gfx::Rect(0, 0, 10, 10), | 1029 gfx::Rect(0, 0, 10, 10), |
| 1028 gfx::Rect(0, 0, 10, 10), | 1030 gfx::Rect(0, 0, 10, 10), |
| 1029 1u, | 1031 1u, |
| 1030 false); | 1032 false); |
| 1031 | 1033 |
| 1032 color_quad = pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); | 1034 color_quad = pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1504 // The occlusion extends to 500 in the x-axis, pushing the left of the | 1506 // The occlusion extends to 500 in the x-axis, pushing the left of the |
| 1505 // visible part of the quad to 500 - 211 = 300 - 11 inside the quad. | 1507 // visible part of the quad to 500 - 211 = 300 - 11 inside the quad. |
| 1506 EXPECT_EQ(gfx::Rect(300 - 11, 0, 100 + 11, 500).ToString(), | 1508 EXPECT_EQ(gfx::Rect(300 - 11, 0, 100 + 11, 500).ToString(), |
| 1507 impl.quad_list()[0]->visible_rect.ToString()); | 1509 impl.quad_list()[0]->visible_rect.ToString()); |
| 1508 } | 1510 } |
| 1509 } | 1511 } |
| 1510 } | 1512 } |
| 1511 | 1513 |
| 1512 } // namespace | 1514 } // namespace |
| 1513 } // namespace cc | 1515 } // namespace cc |
| OLD | NEW |