| 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 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 SkXfermode::kSrcOver_Mode, | 575 SkXfermode::kSrcOver_Mode, |
| 576 0); | 576 0); |
| 577 | 577 |
| 578 RenderPassDrawQuad* render_pass_quad = | 578 RenderPassDrawQuad* render_pass_quad = |
| 579 pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 579 pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
| 580 render_pass_quad->SetNew( | 580 render_pass_quad->SetNew( |
| 581 shared_quad_state, | 581 shared_quad_state, |
| 582 gfx::Rect(5, 5, 7, 7), // quad_rect | 582 gfx::Rect(5, 5, 7, 7), // quad_rect |
| 583 gfx::Rect(5, 5, 7, 7), // visible_rect | 583 gfx::Rect(5, 5, 7, 7), // visible_rect |
| 584 RenderPass::Id(10, 7), // render_pass_id | 584 RenderPass::Id(10, 7), // render_pass_id |
| 585 false, // is_replica | |
| 586 0, // mask_resource_id | 585 0, // mask_resource_id |
| 587 child_pass_rect, // contents_changed_since_last_frame | |
| 588 gfx::RectF(), // mask_uv_rect | 586 gfx::RectF(), // mask_uv_rect |
| 589 FilterOperations(), // filters | 587 FilterOperations(), // filters |
| 590 gfx::Vector2dF(), // filters_scale | 588 gfx::Vector2dF(), // filters_scale |
| 591 FilterOperations()); // background_filters | 589 FilterOperations()); // background_filters |
| 592 | 590 |
| 593 SolidColorDrawQuad* color_quad; | 591 SolidColorDrawQuad* color_quad; |
| 594 color_quad = pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); | 592 color_quad = pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); |
| 595 color_quad->SetNew(shared_quad_state, | 593 color_quad->SetNew(shared_quad_state, |
| 596 gfx::Rect(0, 0, 10, 10), | 594 gfx::Rect(0, 0, 10, 10), |
| 597 gfx::Rect(0, 0, 10, 10), | 595 gfx::Rect(0, 0, 10, 10), |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 SkXfermode::kSrcOver_Mode, | 1010 SkXfermode::kSrcOver_Mode, |
| 1013 0); | 1011 0); |
| 1014 | 1012 |
| 1015 RenderPassDrawQuad* render_pass_quad = | 1013 RenderPassDrawQuad* render_pass_quad = |
| 1016 pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 1014 pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
| 1017 render_pass_quad->SetNew( | 1015 render_pass_quad->SetNew( |
| 1018 shared_quad_state, | 1016 shared_quad_state, |
| 1019 gfx::Rect(5, 5, 7, 7), // quad_rect | 1017 gfx::Rect(5, 5, 7, 7), // quad_rect |
| 1020 gfx::Rect(5, 5, 7, 7), // visible_quad_rect | 1018 gfx::Rect(5, 5, 7, 7), // visible_quad_rect |
| 1021 RenderPass::Id(10, 7), // render_pass_id | 1019 RenderPass::Id(10, 7), // render_pass_id |
| 1022 false, // is_replica | |
| 1023 0, // mask_resource_id | 1020 0, // mask_resource_id |
| 1024 child_pass_rect, // contents_changed_since_last_frame | |
| 1025 gfx::RectF(), // mask_uv_rect | 1021 gfx::RectF(), // mask_uv_rect |
| 1026 FilterOperations(), // filters | 1022 FilterOperations(), // filters |
| 1027 gfx::Vector2dF(), // filters_scale | 1023 gfx::Vector2dF(), // filters_scale |
| 1028 FilterOperations()); // background_filters | 1024 FilterOperations()); // background_filters |
| 1029 | 1025 |
| 1030 SolidColorDrawQuad* color_quad; | 1026 SolidColorDrawQuad* color_quad; |
| 1031 color_quad = pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); | 1027 color_quad = pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); |
| 1032 color_quad->SetNew(shared_quad_state, | 1028 color_quad->SetNew(shared_quad_state, |
| 1033 gfx::Rect(0, 0, 10, 10), | 1029 gfx::Rect(0, 0, 10, 10), |
| 1034 gfx::Rect(0, 0, 10, 10), | 1030 gfx::Rect(0, 0, 10, 10), |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 scoped_ptr<DelegatedRendererLayerImpl> other_layer = | 1561 scoped_ptr<DelegatedRendererLayerImpl> other_layer = |
| 1566 DelegatedRendererLayerImpl::Create(host_impl_->active_tree(), 6); | 1562 DelegatedRendererLayerImpl::Create(host_impl_->active_tree(), 6); |
| 1567 | 1563 |
| 1568 delegated_renderer_layer_impl->PushPropertiesTo(other_layer.get()); | 1564 delegated_renderer_layer_impl->PushPropertiesTo(other_layer.get()); |
| 1569 | 1565 |
| 1570 EXPECT_EQ(0.5f, other_layer->inverse_device_scale_factor()); | 1566 EXPECT_EQ(0.5f, other_layer->inverse_device_scale_factor()); |
| 1571 } | 1567 } |
| 1572 | 1568 |
| 1573 } // namespace | 1569 } // namespace |
| 1574 } // namespace cc | 1570 } // namespace cc |
| OLD | NEW |