| 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/quad_sink.h" | 8 #include "cc/layers/quad_sink.h" |
| 9 #include "cc/layers/solid_color_layer_impl.h" | 9 #include "cc/layers/solid_color_layer_impl.h" |
| 10 #include "cc/quads/render_pass_draw_quad.h" | 10 #include "cc/quads/render_pass_draw_quad.h" |
| 11 #include "cc/quads/solid_color_draw_quad.h" | 11 #include "cc/quads/solid_color_draw_quad.h" |
| 12 #include "cc/test/fake_delegated_renderer_layer_impl.h" | 12 #include "cc/test/fake_delegated_renderer_layer_impl.h" |
| 13 #include "cc/test/fake_layer_tree_host_impl.h" | 13 #include "cc/test/fake_layer_tree_host_impl.h" |
| 14 #include "cc/test/fake_layer_tree_host_impl_client.h" | 14 #include "cc/test/fake_layer_tree_host_impl_client.h" |
| 15 #include "cc/test/fake_output_surface.h" | 15 #include "cc/test/fake_output_surface.h" |
| 16 #include "cc/test/fake_proxy.h" | 16 #include "cc/test/fake_proxy.h" |
| 17 #include "cc/test/fake_rendering_stats_instrumentation.h" | 17 #include "cc/test/fake_rendering_stats_instrumentation.h" |
| 18 #include "cc/test/geometry_test_utils.h" | 18 #include "cc/test/geometry_test_utils.h" |
| 19 #include "cc/test/layer_test_common.h" | 19 #include "cc/test/layer_test_common.h" |
| 20 #include "cc/test/mock_quad_culler.h" | |
| 21 #include "cc/test/render_pass_test_common.h" | 20 #include "cc/test/render_pass_test_common.h" |
| 22 #include "cc/test/render_pass_test_utils.h" | 21 #include "cc/test/render_pass_test_utils.h" |
| 23 #include "cc/test/test_shared_bitmap_manager.h" | 22 #include "cc/test/test_shared_bitmap_manager.h" |
| 24 #include "cc/test/test_web_graphics_context_3d.h" | 23 #include "cc/test/test_web_graphics_context_3d.h" |
| 25 #include "cc/trees/layer_tree_host_impl.h" | 24 #include "cc/trees/layer_tree_host_impl.h" |
| 26 #include "cc/trees/layer_tree_impl.h" | 25 #include "cc/trees/layer_tree_impl.h" |
| 27 #include "cc/trees/single_thread_proxy.h" | 26 #include "cc/trees/single_thread_proxy.h" |
| 28 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
| 29 #include "ui/gfx/frame_time.h" | 28 #include "ui/gfx/frame_time.h" |
| 30 #include "ui/gfx/transform.h" | 29 #include "ui/gfx/transform.h" |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 child_pass_transform.Translate(9.0, 9.0); | 521 child_pass_transform.Translate(9.0, 9.0); |
| 523 gfx::Rect child_pass_clip_rect(21, 21, 3, 3); | 522 gfx::Rect child_pass_clip_rect(21, 21, 3, 3); |
| 524 bool child_pass_clipped = false; | 523 bool child_pass_clipped = false; |
| 525 | 524 |
| 526 { | 525 { |
| 527 TestRenderPass* pass = AddRenderPass( | 526 TestRenderPass* pass = AddRenderPass( |
| 528 &delegated_render_passes, | 527 &delegated_render_passes, |
| 529 RenderPass::Id(10, 7), | 528 RenderPass::Id(10, 7), |
| 530 child_pass_rect, | 529 child_pass_rect, |
| 531 gfx::Transform()); | 530 gfx::Transform()); |
| 532 MockQuadCuller quad_sink(pass); | 531 SharedQuadState* shared_quad_state = |
| 533 SharedQuadState* shared_quad_state = quad_sink.CreateSharedQuadState(); | 532 pass->CreateAndAppendSharedQuadState(); |
| 534 shared_quad_state->SetAll(child_pass_transform, | 533 shared_quad_state->SetAll(child_pass_transform, |
| 535 child_pass_content_bounds, | 534 child_pass_content_bounds, |
| 536 child_pass_rect, | 535 child_pass_rect, |
| 537 child_pass_clip_rect, | 536 child_pass_clip_rect, |
| 538 child_pass_clipped, | 537 child_pass_clipped, |
| 539 1.f, | 538 1.f, |
| 540 SkXfermode::kSrcOver_Mode); | 539 SkXfermode::kSrcOver_Mode); |
| 541 | 540 |
| 542 scoped_ptr<SolidColorDrawQuad> color_quad; | 541 scoped_ptr<SolidColorDrawQuad> color_quad; |
| 543 color_quad = SolidColorDrawQuad::Create(); | 542 color_quad = SolidColorDrawQuad::Create(); |
| 544 color_quad->SetNew(shared_quad_state, | 543 color_quad->SetNew(shared_quad_state, |
| 545 gfx::Rect(20, 20, 3, 7), | 544 gfx::Rect(20, 20, 3, 7), |
| 546 gfx::Rect(20, 20, 3, 7), | 545 gfx::Rect(20, 20, 3, 7), |
| 547 1u, | 546 1u, |
| 548 false); | 547 false); |
| 549 quad_sink.Append(color_quad.PassAs<DrawQuad>()); | 548 pass->AppendDrawQuad(color_quad.PassAs<DrawQuad>()); |
| 550 | 549 |
| 551 color_quad = SolidColorDrawQuad::Create(); | 550 color_quad = SolidColorDrawQuad::Create(); |
| 552 color_quad->SetNew(shared_quad_state, | 551 color_quad->SetNew(shared_quad_state, |
| 553 gfx::Rect(23, 20, 4, 7), | 552 gfx::Rect(23, 20, 4, 7), |
| 554 gfx::Rect(23, 20, 4, 7), | 553 gfx::Rect(23, 20, 4, 7), |
| 555 1u, | 554 1u, |
| 556 false); | 555 false); |
| 557 quad_sink.Append(color_quad.PassAs<DrawQuad>()); | 556 pass->AppendDrawQuad(color_quad.PassAs<DrawQuad>()); |
| 558 } | 557 } |
| 559 | 558 |
| 560 gfx::Size root_pass_content_bounds(100, 100); | 559 gfx::Size root_pass_content_bounds(100, 100); |
| 561 gfx::Rect root_pass_rect(0, 0, 100, 100); | 560 gfx::Rect root_pass_rect(0, 0, 100, 100); |
| 562 gfx::Transform root_pass_transform; | 561 gfx::Transform root_pass_transform; |
| 563 root_pass_transform.Scale(1.5, 1.5); | 562 root_pass_transform.Scale(1.5, 1.5); |
| 564 root_pass_transform.Translate(7.0, 7.0); | 563 root_pass_transform.Translate(7.0, 7.0); |
| 565 gfx::Rect root_pass_clip_rect(10, 10, 35, 35); | 564 gfx::Rect root_pass_clip_rect(10, 10, 35, 35); |
| 566 bool root_pass_clipped = root_delegated_render_pass_is_clipped_; | 565 bool root_pass_clipped = root_delegated_render_pass_is_clipped_; |
| 567 | 566 |
| 568 TestRenderPass* pass = AddRenderPass( | 567 TestRenderPass* pass = AddRenderPass( |
| 569 &delegated_render_passes, | 568 &delegated_render_passes, |
| 570 RenderPass::Id(9, 6), | 569 RenderPass::Id(9, 6), |
| 571 root_pass_rect, | 570 root_pass_rect, |
| 572 gfx::Transform()); | 571 gfx::Transform()); |
| 573 MockQuadCuller quad_sink(pass); | 572 SharedQuadState* shared_quad_state = pass->CreateAndAppendSharedQuadState(); |
| 574 SharedQuadState* shared_quad_state = quad_sink.CreateSharedQuadState(); | |
| 575 shared_quad_state->SetAll(root_pass_transform, | 573 shared_quad_state->SetAll(root_pass_transform, |
| 576 root_pass_content_bounds, | 574 root_pass_content_bounds, |
| 577 root_pass_rect, | 575 root_pass_rect, |
| 578 root_pass_clip_rect, | 576 root_pass_clip_rect, |
| 579 root_pass_clipped, | 577 root_pass_clipped, |
| 580 1.f, | 578 1.f, |
| 581 SkXfermode::kSrcOver_Mode); | 579 SkXfermode::kSrcOver_Mode); |
| 582 | 580 |
| 583 scoped_ptr<RenderPassDrawQuad> render_pass_quad = | 581 scoped_ptr<RenderPassDrawQuad> render_pass_quad = |
| 584 RenderPassDrawQuad::Create(); | 582 RenderPassDrawQuad::Create(); |
| 585 render_pass_quad->SetNew( | 583 render_pass_quad->SetNew( |
| 586 shared_quad_state, | 584 shared_quad_state, |
| 587 gfx::Rect(5, 5, 7, 7), // quad_rect | 585 gfx::Rect(5, 5, 7, 7), // quad_rect |
| 588 gfx::Rect(5, 5, 7, 7), // visible_rect | 586 gfx::Rect(5, 5, 7, 7), // visible_rect |
| 589 RenderPass::Id(10, 7), // render_pass_id | 587 RenderPass::Id(10, 7), // render_pass_id |
| 590 false, // is_replica | 588 false, // is_replica |
| 591 0, // mask_resource_id | 589 0, // mask_resource_id |
| 592 child_pass_rect, // contents_changed_since_last_frame | 590 child_pass_rect, // contents_changed_since_last_frame |
| 593 gfx::RectF(), // mask_uv_rect | 591 gfx::RectF(), // mask_uv_rect |
| 594 FilterOperations(), // filters | 592 FilterOperations(), // filters |
| 595 FilterOperations()); // background_filters | 593 FilterOperations()); // background_filters |
| 596 quad_sink.Append(render_pass_quad.PassAs<DrawQuad>()); | 594 pass->AppendDrawQuad(render_pass_quad.PassAs<DrawQuad>()); |
| 597 | 595 |
| 598 scoped_ptr<SolidColorDrawQuad> color_quad; | 596 scoped_ptr<SolidColorDrawQuad> color_quad; |
| 599 color_quad = SolidColorDrawQuad::Create(); | 597 color_quad = SolidColorDrawQuad::Create(); |
| 600 color_quad->SetNew(shared_quad_state, | 598 color_quad->SetNew(shared_quad_state, |
| 601 gfx::Rect(0, 0, 10, 10), | 599 gfx::Rect(0, 0, 10, 10), |
| 602 gfx::Rect(0, 0, 10, 10), | 600 gfx::Rect(0, 0, 10, 10), |
| 603 1u, | 601 1u, |
| 604 false); | 602 false); |
| 605 quad_sink.Append(color_quad.PassAs<DrawQuad>()); | 603 pass->AppendDrawQuad(color_quad.PassAs<DrawQuad>()); |
| 606 | 604 |
| 607 color_quad = SolidColorDrawQuad::Create(); | 605 color_quad = SolidColorDrawQuad::Create(); |
| 608 color_quad->SetNew(shared_quad_state, | 606 color_quad->SetNew(shared_quad_state, |
| 609 gfx::Rect(0, 10, 10, 10), | 607 gfx::Rect(0, 10, 10, 10), |
| 610 gfx::Rect(0, 10, 10, 10), | 608 gfx::Rect(0, 10, 10, 10), |
| 611 2u, | 609 2u, |
| 612 false); | 610 false); |
| 613 quad_sink.Append(color_quad.PassAs<DrawQuad>()); | 611 pass->AppendDrawQuad(color_quad.PassAs<DrawQuad>()); |
| 614 | 612 |
| 615 color_quad = SolidColorDrawQuad::Create(); | 613 color_quad = SolidColorDrawQuad::Create(); |
| 616 color_quad->SetNew(shared_quad_state, | 614 color_quad->SetNew(shared_quad_state, |
| 617 gfx::Rect(10, 0, 10, 10), | 615 gfx::Rect(10, 0, 10, 10), |
| 618 gfx::Rect(10, 0, 10, 10), | 616 gfx::Rect(10, 0, 10, 10), |
| 619 3u, | 617 3u, |
| 620 false); | 618 false); |
| 621 quad_sink.Append(color_quad.PassAs<DrawQuad>()); | 619 pass->AppendDrawQuad(color_quad.PassAs<DrawQuad>()); |
| 622 | 620 |
| 623 color_quad = SolidColorDrawQuad::Create(); | 621 color_quad = SolidColorDrawQuad::Create(); |
| 624 color_quad->SetNew(shared_quad_state, | 622 color_quad->SetNew(shared_quad_state, |
| 625 gfx::Rect(10, 10, 10, 10), | 623 gfx::Rect(10, 10, 10, 10), |
| 626 gfx::Rect(10, 10, 10, 10), | 624 gfx::Rect(10, 10, 10, 10), |
| 627 4u, | 625 4u, |
| 628 false); | 626 false); |
| 629 quad_sink.Append(color_quad.PassAs<DrawQuad>()); | 627 pass->AppendDrawQuad(color_quad.PassAs<DrawQuad>()); |
| 630 | 628 |
| 631 delegated_renderer_layer->SetFrameDataForRenderPasses( | 629 delegated_renderer_layer->SetFrameDataForRenderPasses( |
| 632 &delegated_render_passes); | 630 &delegated_render_passes); |
| 633 | 631 |
| 634 // The RenderPasses should be taken by the layer. | 632 // The RenderPasses should be taken by the layer. |
| 635 EXPECT_EQ(0u, delegated_render_passes.size()); | 633 EXPECT_EQ(0u, delegated_render_passes.size()); |
| 636 | 634 |
| 637 root_layer_ = root_layer.get(); | 635 root_layer_ = root_layer.get(); |
| 638 delegated_renderer_layer_ = delegated_renderer_layer.get(); | 636 delegated_renderer_layer_ = delegated_renderer_layer.get(); |
| 639 | 637 |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 947 gfx::Transform child_pass_transform; | 945 gfx::Transform child_pass_transform; |
| 948 gfx::Rect child_pass_clip_rect(21, 21, 3, 3); | 946 gfx::Rect child_pass_clip_rect(21, 21, 3, 3); |
| 949 bool child_pass_clipped = false; | 947 bool child_pass_clipped = false; |
| 950 | 948 |
| 951 { | 949 { |
| 952 TestRenderPass* pass = AddRenderPass( | 950 TestRenderPass* pass = AddRenderPass( |
| 953 &delegated_render_passes, | 951 &delegated_render_passes, |
| 954 RenderPass::Id(10, 7), | 952 RenderPass::Id(10, 7), |
| 955 child_pass_rect, | 953 child_pass_rect, |
| 956 gfx::Transform()); | 954 gfx::Transform()); |
| 957 MockQuadCuller quad_sink(pass); | 955 SharedQuadState* shared_quad_state = |
| 958 SharedQuadState* shared_quad_state = quad_sink.CreateSharedQuadState(); | 956 pass->CreateAndAppendSharedQuadState(); |
| 959 shared_quad_state->SetAll(child_pass_transform, | 957 shared_quad_state->SetAll(child_pass_transform, |
| 960 child_pass_content_bounds, | 958 child_pass_content_bounds, |
| 961 child_pass_rect, | 959 child_pass_rect, |
| 962 child_pass_clip_rect, | 960 child_pass_clip_rect, |
| 963 child_pass_clipped, | 961 child_pass_clipped, |
| 964 1.f, | 962 1.f, |
| 965 SkXfermode::kSrcOver_Mode); | 963 SkXfermode::kSrcOver_Mode); |
| 966 | 964 |
| 967 scoped_ptr<SolidColorDrawQuad> color_quad; | 965 scoped_ptr<SolidColorDrawQuad> color_quad; |
| 968 color_quad = SolidColorDrawQuad::Create(); | 966 color_quad = SolidColorDrawQuad::Create(); |
| 969 color_quad->SetNew(shared_quad_state, | 967 color_quad->SetNew(shared_quad_state, |
| 970 gfx::Rect(20, 20, 3, 7), | 968 gfx::Rect(20, 20, 3, 7), |
| 971 gfx::Rect(20, 20, 3, 7), | 969 gfx::Rect(20, 20, 3, 7), |
| 972 1u, | 970 1u, |
| 973 false); | 971 false); |
| 974 quad_sink.Append(color_quad.PassAs<DrawQuad>()); | 972 pass->AppendDrawQuad(color_quad.PassAs<DrawQuad>()); |
| 975 | 973 |
| 976 color_quad = SolidColorDrawQuad::Create(); | 974 color_quad = SolidColorDrawQuad::Create(); |
| 977 color_quad->SetNew(shared_quad_state, | 975 color_quad->SetNew(shared_quad_state, |
| 978 gfx::Rect(23, 20, 4, 7), | 976 gfx::Rect(23, 20, 4, 7), |
| 979 gfx::Rect(23, 20, 4, 7), | 977 gfx::Rect(23, 20, 4, 7), |
| 980 1u, | 978 1u, |
| 981 false); | 979 false); |
| 982 quad_sink.Append(color_quad.PassAs<DrawQuad>()); | 980 pass->AppendDrawQuad(color_quad.PassAs<DrawQuad>()); |
| 983 } | 981 } |
| 984 | 982 |
| 985 gfx::Size root_pass_content_bounds(50, 50); | 983 gfx::Size root_pass_content_bounds(50, 50); |
| 986 gfx::Rect root_pass_rect(0, 0, 50, 50); | 984 gfx::Rect root_pass_rect(0, 0, 50, 50); |
| 987 gfx::Transform root_pass_transform; | 985 gfx::Transform root_pass_transform; |
| 988 gfx::Rect root_pass_clip_rect(5, 5, 40, 40); | 986 gfx::Rect root_pass_clip_rect(5, 5, 40, 40); |
| 989 bool root_pass_clipped = root_delegated_render_pass_is_clipped_; | 987 bool root_pass_clipped = root_delegated_render_pass_is_clipped_; |
| 990 | 988 |
| 991 TestRenderPass* pass = AddRenderPass( | 989 TestRenderPass* pass = AddRenderPass( |
| 992 &delegated_render_passes, | 990 &delegated_render_passes, |
| 993 RenderPass::Id(9, 6), | 991 RenderPass::Id(9, 6), |
| 994 root_pass_rect, | 992 root_pass_rect, |
| 995 gfx::Transform()); | 993 gfx::Transform()); |
| 996 MockQuadCuller quad_sink(pass); | 994 SharedQuadState* shared_quad_state = pass->CreateAndAppendSharedQuadState(); |
| 997 SharedQuadState* shared_quad_state = quad_sink.CreateSharedQuadState(); | |
| 998 shared_quad_state->SetAll(root_pass_transform, | 995 shared_quad_state->SetAll(root_pass_transform, |
| 999 root_pass_content_bounds, | 996 root_pass_content_bounds, |
| 1000 root_pass_rect, | 997 root_pass_rect, |
| 1001 root_pass_clip_rect, | 998 root_pass_clip_rect, |
| 1002 root_pass_clipped, | 999 root_pass_clipped, |
| 1003 1.f, | 1000 1.f, |
| 1004 SkXfermode::kSrcOver_Mode); | 1001 SkXfermode::kSrcOver_Mode); |
| 1005 | 1002 |
| 1006 scoped_ptr<RenderPassDrawQuad> render_pass_quad = | 1003 scoped_ptr<RenderPassDrawQuad> render_pass_quad = |
| 1007 RenderPassDrawQuad::Create(); | 1004 RenderPassDrawQuad::Create(); |
| 1008 render_pass_quad->SetNew( | 1005 render_pass_quad->SetNew( |
| 1009 shared_quad_state, | 1006 shared_quad_state, |
| 1010 gfx::Rect(5, 5, 7, 7), // quad_rect | 1007 gfx::Rect(5, 5, 7, 7), // quad_rect |
| 1011 gfx::Rect(5, 5, 7, 7), // visible_quad_rect | 1008 gfx::Rect(5, 5, 7, 7), // visible_quad_rect |
| 1012 RenderPass::Id(10, 7), // render_pass_id | 1009 RenderPass::Id(10, 7), // render_pass_id |
| 1013 false, // is_replica | 1010 false, // is_replica |
| 1014 0, // mask_resource_id | 1011 0, // mask_resource_id |
| 1015 child_pass_rect, // contents_changed_since_last_frame | 1012 child_pass_rect, // contents_changed_since_last_frame |
| 1016 gfx::RectF(), // mask_uv_rect | 1013 gfx::RectF(), // mask_uv_rect |
| 1017 FilterOperations(), // filters | 1014 FilterOperations(), // filters |
| 1018 FilterOperations()); // background_filters | 1015 FilterOperations()); // background_filters |
| 1019 quad_sink.Append(render_pass_quad.PassAs<DrawQuad>()); | 1016 pass->AppendDrawQuad(render_pass_quad.PassAs<DrawQuad>()); |
| 1020 | 1017 |
| 1021 scoped_ptr<SolidColorDrawQuad> color_quad; | 1018 scoped_ptr<SolidColorDrawQuad> color_quad; |
| 1022 color_quad = SolidColorDrawQuad::Create(); | 1019 color_quad = SolidColorDrawQuad::Create(); |
| 1023 color_quad->SetNew(shared_quad_state, | 1020 color_quad->SetNew(shared_quad_state, |
| 1024 gfx::Rect(0, 0, 10, 10), | 1021 gfx::Rect(0, 0, 10, 10), |
| 1025 gfx::Rect(0, 0, 10, 10), | 1022 gfx::Rect(0, 0, 10, 10), |
| 1026 1u, | 1023 1u, |
| 1027 false); | 1024 false); |
| 1028 quad_sink.Append(color_quad.PassAs<DrawQuad>()); | 1025 pass->AppendDrawQuad(color_quad.PassAs<DrawQuad>()); |
| 1029 | 1026 |
| 1030 color_quad = SolidColorDrawQuad::Create(); | 1027 color_quad = SolidColorDrawQuad::Create(); |
| 1031 color_quad->SetNew(shared_quad_state, | 1028 color_quad->SetNew(shared_quad_state, |
| 1032 gfx::Rect(0, 10, 10, 10), | 1029 gfx::Rect(0, 10, 10, 10), |
| 1033 gfx::Rect(0, 10, 10, 10), | 1030 gfx::Rect(0, 10, 10, 10), |
| 1034 2u, | 1031 2u, |
| 1035 false); | 1032 false); |
| 1036 quad_sink.Append(color_quad.PassAs<DrawQuad>()); | 1033 pass->AppendDrawQuad(color_quad.PassAs<DrawQuad>()); |
| 1037 | 1034 |
| 1038 color_quad = SolidColorDrawQuad::Create(); | 1035 color_quad = SolidColorDrawQuad::Create(); |
| 1039 color_quad->SetNew(shared_quad_state, | 1036 color_quad->SetNew(shared_quad_state, |
| 1040 gfx::Rect(10, 0, 10, 10), | 1037 gfx::Rect(10, 0, 10, 10), |
| 1041 gfx::Rect(10, 0, 10, 10), | 1038 gfx::Rect(10, 0, 10, 10), |
| 1042 3u, | 1039 3u, |
| 1043 false); | 1040 false); |
| 1044 quad_sink.Append(color_quad.PassAs<DrawQuad>()); | 1041 pass->AppendDrawQuad(color_quad.PassAs<DrawQuad>()); |
| 1045 | 1042 |
| 1046 color_quad = SolidColorDrawQuad::Create(); | 1043 color_quad = SolidColorDrawQuad::Create(); |
| 1047 color_quad->SetNew(shared_quad_state, | 1044 color_quad->SetNew(shared_quad_state, |
| 1048 gfx::Rect(10, 10, 10, 10), | 1045 gfx::Rect(10, 10, 10, 10), |
| 1049 gfx::Rect(10, 10, 10, 10), | 1046 gfx::Rect(10, 10, 10, 10), |
| 1050 4u, | 1047 4u, |
| 1051 false); | 1048 false); |
| 1052 quad_sink.Append(color_quad.PassAs<DrawQuad>()); | 1049 pass->AppendDrawQuad(color_quad.PassAs<DrawQuad>()); |
| 1053 | 1050 |
| 1054 delegated_renderer_layer->SetFrameDataForRenderPasses( | 1051 delegated_renderer_layer->SetFrameDataForRenderPasses( |
| 1055 &delegated_render_passes); | 1052 &delegated_render_passes); |
| 1056 | 1053 |
| 1057 // The RenderPasses should be taken by the layer. | 1054 // The RenderPasses should be taken by the layer. |
| 1058 EXPECT_EQ(0u, delegated_render_passes.size()); | 1055 EXPECT_EQ(0u, delegated_render_passes.size()); |
| 1059 | 1056 |
| 1060 root_layer_ = root_layer.get(); | 1057 root_layer_ = root_layer.get(); |
| 1061 delegated_renderer_layer_ = delegated_renderer_layer.get(); | 1058 delegated_renderer_layer_ = delegated_renderer_layer.get(); |
| 1062 | 1059 |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1506 // The occlusion extends to 500 in the x-axis, pushing the left of the | 1503 // The occlusion extends to 500 in the x-axis, pushing the left of the |
| 1507 // visible part of the quad to 500 - 211 = 300 - 11 inside the quad. | 1504 // visible part of the quad to 500 - 211 = 300 - 11 inside the quad. |
| 1508 EXPECT_EQ(gfx::Rect(300 - 11, 0, 100 + 11, 500).ToString(), | 1505 EXPECT_EQ(gfx::Rect(300 - 11, 0, 100 + 11, 500).ToString(), |
| 1509 impl.quad_list()[0]->visible_rect.ToString()); | 1506 impl.quad_list()[0]->visible_rect.ToString()); |
| 1510 } | 1507 } |
| 1511 } | 1508 } |
| 1512 } | 1509 } |
| 1513 | 1510 |
| 1514 } // namespace | 1511 } // namespace |
| 1515 } // namespace cc | 1512 } // namespace cc |
| OLD | NEW |