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

Side by Side Diff: cc/trees/quad_culler_unittest.cc

Issue 191123002: Implement hidpi and pinch-zoom scaling of filter params in cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove TODO Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_unittest_delegated.cc ('k') | content/common/cc_messages.h » ('j') | no next file with comments »
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/trees/quad_culler.h" 5 #include "cc/trees/quad_culler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/layers/append_quads_data.h" 10 #include "cc/layers/append_quads_data.h"
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 scoped_ptr<RenderPassDrawQuad> pass_quad = RenderPassDrawQuad::Create(); 657 scoped_ptr<RenderPassDrawQuad> pass_quad = RenderPassDrawQuad::Create();
658 pass_quad->SetNew(sqs, 658 pass_quad->SetNew(sqs,
659 gfx::Rect(100, 100), 659 gfx::Rect(100, 100),
660 gfx::Rect(100, 100), 660 gfx::Rect(100, 100),
661 RenderPass::Id(10, 10), 661 RenderPass::Id(10, 10),
662 false, 662 false,
663 0, 663 0,
664 gfx::Rect(), 664 gfx::Rect(),
665 gfx::RectF(), 665 gfx::RectF(),
666 FilterOperations(), 666 FilterOperations(),
667 gfx::Vector2dF(),
667 FilterOperations()); 668 FilterOperations());
668 669
669 scoped_ptr<RenderPassDrawQuad> replica_quad = RenderPassDrawQuad::Create(); 670 scoped_ptr<RenderPassDrawQuad> replica_quad = RenderPassDrawQuad::Create();
670 replica_quad->SetNew(sqs, 671 replica_quad->SetNew(sqs,
671 gfx::Rect(100, 100), 672 gfx::Rect(100, 100),
672 gfx::Rect(100, 100), 673 gfx::Rect(100, 100),
673 RenderPass::Id(10, 10), 674 RenderPass::Id(10, 10),
674 true, 675 true,
675 0, 676 0,
676 gfx::Rect(), 677 gfx::Rect(),
677 gfx::RectF(), 678 gfx::RectF(),
678 FilterOperations(), 679 FilterOperations(),
680 gfx::Vector2dF(),
679 FilterOperations()); 681 FilterOperations());
680 682
681 // Set a visible rect on the quads. 683 // Set a visible rect on the quads.
682 color_quad->visible_rect = gfx::Rect(20, 30, 10, 11); 684 color_quad->visible_rect = gfx::Rect(20, 30, 10, 11);
683 pass_quad->visible_rect = gfx::Rect(50, 60, 13, 14); 685 pass_quad->visible_rect = gfx::Rect(50, 60, 13, 14);
684 replica_quad->visible_rect = gfx::Rect(30, 40, 15, 16); 686 replica_quad->visible_rect = gfx::Rect(30, 40, 15, 16);
685 687
686 // Nothing is occluding. 688 // Nothing is occluding.
687 occlusion_tracker.EnterLayer(it); 689 occlusion_tracker.EnterLayer(it);
688 690
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 scoped_ptr<RenderPassDrawQuad> pass_quad = RenderPassDrawQuad::Create(); 734 scoped_ptr<RenderPassDrawQuad> pass_quad = RenderPassDrawQuad::Create();
733 pass_quad->SetNew(sqs, 735 pass_quad->SetNew(sqs,
734 gfx::Rect(100, 100), 736 gfx::Rect(100, 100),
735 gfx::Rect(100, 100), 737 gfx::Rect(100, 100),
736 RenderPass::Id(10, 10), 738 RenderPass::Id(10, 10),
737 false, 739 false,
738 0, 740 0,
739 gfx::Rect(), 741 gfx::Rect(),
740 gfx::RectF(), 742 gfx::RectF(),
741 FilterOperations(), 743 FilterOperations(),
744 gfx::Vector2dF(),
742 FilterOperations()); 745 FilterOperations());
743 746
744 scoped_ptr<RenderPassDrawQuad> replica_quad = RenderPassDrawQuad::Create(); 747 scoped_ptr<RenderPassDrawQuad> replica_quad = RenderPassDrawQuad::Create();
745 replica_quad->SetNew(sqs, 748 replica_quad->SetNew(sqs,
746 gfx::Rect(100, 100), 749 gfx::Rect(100, 100),
747 gfx::Rect(100, 100), 750 gfx::Rect(100, 100),
748 RenderPass::Id(10, 10), 751 RenderPass::Id(10, 10),
749 true, 752 true,
750 0, 753 0,
751 gfx::Rect(), 754 gfx::Rect(),
752 gfx::RectF(), 755 gfx::RectF(),
753 FilterOperations(), 756 FilterOperations(),
757 gfx::Vector2dF(),
754 FilterOperations()); 758 FilterOperations());
755 759
756 // Set a visible rect on the quads. 760 // Set a visible rect on the quads.
757 color_quad->visible_rect = gfx::Rect(10, 10, 10, 11); 761 color_quad->visible_rect = gfx::Rect(10, 10, 10, 11);
758 pass_quad->visible_rect = gfx::Rect(10, 20, 13, 14); 762 pass_quad->visible_rect = gfx::Rect(10, 20, 13, 14);
759 replica_quad->visible_rect = gfx::Rect(10, 30, 15, 16); 763 replica_quad->visible_rect = gfx::Rect(10, 30, 15, 16);
760 764
761 // Occlude the left part of the visible rects. 765 // Occlude the left part of the visible rects.
762 occlusion_tracker.EnterLayer(it); 766 occlusion_tracker.EnterLayer(it);
763 occlusion_tracker.set_occlusion_from_outside_target(gfx::Rect(0, 0, 15, 100)); 767 occlusion_tracker.set_occlusion_from_outside_target(gfx::Rect(0, 0, 15, 100));
(...skipping 11 matching lines...) Expand all
775 EXPECT_EQ(gfx::Rect(15, 10, 5, 11).ToString(), 779 EXPECT_EQ(gfx::Rect(15, 10, 5, 11).ToString(),
776 quad_list[0]->visible_rect.ToString()); 780 quad_list[0]->visible_rect.ToString());
777 EXPECT_EQ(gfx::Rect(15, 20, 8, 14).ToString(), 781 EXPECT_EQ(gfx::Rect(15, 20, 8, 14).ToString(),
778 quad_list[1]->visible_rect.ToString()); 782 quad_list[1]->visible_rect.ToString());
779 EXPECT_EQ(gfx::Rect(15, 30, 10, 16).ToString(), 783 EXPECT_EQ(gfx::Rect(15, 30, 10, 16).ToString(),
780 quad_list[2]->visible_rect.ToString()); 784 quad_list[2]->visible_rect.ToString());
781 } 785 }
782 786
783 } // namespace 787 } // namespace
784 } // namespace cc 788 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_delegated.cc ('k') | content/common/cc_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698