Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: cc/layers/delegated_renderer_layer_impl_unittest.cc

Issue 332873005: Rendering context information added to SharedQuadState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed RenderingContextId to 3dSortingContextId for clarity. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/layers/layer.h » ('j') | cc/layers/layer.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 child_pass_rect, 523 child_pass_rect,
524 gfx::Transform()); 524 gfx::Transform());
525 SharedQuadState* shared_quad_state = 525 SharedQuadState* shared_quad_state =
526 pass->CreateAndAppendSharedQuadState(); 526 pass->CreateAndAppendSharedQuadState();
527 shared_quad_state->SetAll(child_pass_transform, 527 shared_quad_state->SetAll(child_pass_transform,
528 child_pass_content_bounds, 528 child_pass_content_bounds,
529 child_pass_rect, 529 child_pass_rect,
530 child_pass_clip_rect, 530 child_pass_clip_rect,
531 child_pass_clipped, 531 child_pass_clipped,
532 1.f, 532 1.f,
533 SkXfermode::kSrcOver_Mode); 533 SkXfermode::kSrcOver_Mode,
534 0);
534 535
535 scoped_ptr<SolidColorDrawQuad> color_quad; 536 scoped_ptr<SolidColorDrawQuad> color_quad;
536 color_quad = SolidColorDrawQuad::Create(); 537 color_quad = SolidColorDrawQuad::Create();
537 color_quad->SetNew(shared_quad_state, 538 color_quad->SetNew(shared_quad_state,
538 gfx::Rect(20, 20, 3, 7), 539 gfx::Rect(20, 20, 3, 7),
539 gfx::Rect(20, 20, 3, 7), 540 gfx::Rect(20, 20, 3, 7),
540 1u, 541 1u,
541 false); 542 false);
542 pass->AppendDrawQuad(color_quad.PassAs<DrawQuad>()); 543 pass->AppendDrawQuad(color_quad.PassAs<DrawQuad>());
543 544
(...skipping 19 matching lines...) Expand all
563 RenderPass::Id(9, 6), 564 RenderPass::Id(9, 6),
564 root_pass_rect, 565 root_pass_rect,
565 gfx::Transform()); 566 gfx::Transform());
566 SharedQuadState* shared_quad_state = pass->CreateAndAppendSharedQuadState(); 567 SharedQuadState* shared_quad_state = pass->CreateAndAppendSharedQuadState();
567 shared_quad_state->SetAll(root_pass_transform, 568 shared_quad_state->SetAll(root_pass_transform,
568 root_pass_content_bounds, 569 root_pass_content_bounds,
569 root_pass_rect, 570 root_pass_rect,
570 root_pass_clip_rect, 571 root_pass_clip_rect,
571 root_pass_clipped, 572 root_pass_clipped,
572 1.f, 573 1.f,
573 SkXfermode::kSrcOver_Mode); 574 SkXfermode::kSrcOver_Mode,
575 0);
574 576
575 scoped_ptr<RenderPassDrawQuad> render_pass_quad = 577 scoped_ptr<RenderPassDrawQuad> render_pass_quad =
576 RenderPassDrawQuad::Create(); 578 RenderPassDrawQuad::Create();
577 render_pass_quad->SetNew( 579 render_pass_quad->SetNew(
578 shared_quad_state, 580 shared_quad_state,
579 gfx::Rect(5, 5, 7, 7), // quad_rect 581 gfx::Rect(5, 5, 7, 7), // quad_rect
580 gfx::Rect(5, 5, 7, 7), // visible_rect 582 gfx::Rect(5, 5, 7, 7), // visible_rect
581 RenderPass::Id(10, 7), // render_pass_id 583 RenderPass::Id(10, 7), // render_pass_id
582 false, // is_replica 584 false, // is_replica
583 0, // mask_resource_id 585 0, // mask_resource_id
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 child_pass_rect, 968 child_pass_rect,
967 gfx::Transform()); 969 gfx::Transform());
968 SharedQuadState* shared_quad_state = 970 SharedQuadState* shared_quad_state =
969 pass->CreateAndAppendSharedQuadState(); 971 pass->CreateAndAppendSharedQuadState();
970 shared_quad_state->SetAll(child_pass_transform, 972 shared_quad_state->SetAll(child_pass_transform,
971 child_pass_content_bounds, 973 child_pass_content_bounds,
972 child_pass_rect, 974 child_pass_rect,
973 child_pass_clip_rect, 975 child_pass_clip_rect,
974 child_pass_clipped, 976 child_pass_clipped,
975 1.f, 977 1.f,
976 SkXfermode::kSrcOver_Mode); 978 SkXfermode::kSrcOver_Mode,
979 0);
977 980
978 scoped_ptr<SolidColorDrawQuad> color_quad; 981 scoped_ptr<SolidColorDrawQuad> color_quad;
979 color_quad = SolidColorDrawQuad::Create(); 982 color_quad = SolidColorDrawQuad::Create();
980 color_quad->SetNew(shared_quad_state, 983 color_quad->SetNew(shared_quad_state,
981 gfx::Rect(20, 20, 3, 7), 984 gfx::Rect(20, 20, 3, 7),
982 gfx::Rect(20, 20, 3, 7), 985 gfx::Rect(20, 20, 3, 7),
983 1u, 986 1u,
984 false); 987 false);
985 pass->AppendDrawQuad(color_quad.PassAs<DrawQuad>()); 988 pass->AppendDrawQuad(color_quad.PassAs<DrawQuad>());
986 989
(...skipping 17 matching lines...) Expand all
1004 RenderPass::Id(9, 6), 1007 RenderPass::Id(9, 6),
1005 root_pass_rect, 1008 root_pass_rect,
1006 gfx::Transform()); 1009 gfx::Transform());
1007 SharedQuadState* shared_quad_state = pass->CreateAndAppendSharedQuadState(); 1010 SharedQuadState* shared_quad_state = pass->CreateAndAppendSharedQuadState();
1008 shared_quad_state->SetAll(root_pass_transform, 1011 shared_quad_state->SetAll(root_pass_transform,
1009 root_pass_content_bounds, 1012 root_pass_content_bounds,
1010 root_pass_rect, 1013 root_pass_rect,
1011 root_pass_clip_rect, 1014 root_pass_clip_rect,
1012 root_pass_clipped, 1015 root_pass_clipped,
1013 1.f, 1016 1.f,
1014 SkXfermode::kSrcOver_Mode); 1017 SkXfermode::kSrcOver_Mode,
1018 0);
1015 1019
1016 scoped_ptr<RenderPassDrawQuad> render_pass_quad = 1020 scoped_ptr<RenderPassDrawQuad> render_pass_quad =
1017 RenderPassDrawQuad::Create(); 1021 RenderPassDrawQuad::Create();
1018 render_pass_quad->SetNew( 1022 render_pass_quad->SetNew(
1019 shared_quad_state, 1023 shared_quad_state,
1020 gfx::Rect(5, 5, 7, 7), // quad_rect 1024 gfx::Rect(5, 5, 7, 7), // quad_rect
1021 gfx::Rect(5, 5, 7, 7), // visible_quad_rect 1025 gfx::Rect(5, 5, 7, 7), // visible_quad_rect
1022 RenderPass::Id(10, 7), // render_pass_id 1026 RenderPass::Id(10, 7), // render_pass_id
1023 false, // is_replica 1027 false, // is_replica
1024 0, // mask_resource_id 1028 0, // mask_resource_id
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 // The occlusion extends to 500 in the x-axis, pushing the left of the 1519 // The occlusion extends to 500 in the x-axis, pushing the left of the
1516 // visible part of the quad to 500 - 211 = 300 - 11 inside the quad. 1520 // visible part of the quad to 500 - 211 = 300 - 11 inside the quad.
1517 EXPECT_EQ(gfx::Rect(300 - 11, 0, 100 + 11, 500).ToString(), 1521 EXPECT_EQ(gfx::Rect(300 - 11, 0, 100 + 11, 500).ToString(),
1518 impl.quad_list()[0]->visible_rect.ToString()); 1522 impl.quad_list()[0]->visible_rect.ToString());
1519 } 1523 }
1520 } 1524 }
1521 } 1525 }
1522 1526
1523 } // namespace 1527 } // namespace
1524 } // namespace cc 1528 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer.h » ('j') | cc/layers/layer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698