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

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

Issue 235753002: cc: Give TilingData a Rect instead of a Size (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Git cl format Created 6 years, 8 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_impl_unittest.cc ('k') | no next file » | 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 27 matching lines...) Expand all
38 const gfx::Transform& draw_transform, 38 const gfx::Transform& draw_transform,
39 const gfx::Rect& layer_rect, 39 const gfx::Rect& layer_rect,
40 float opacity, 40 float opacity,
41 bool opaque, 41 bool opaque,
42 const gfx::Rect& layer_opaque_rect, 42 const gfx::Rect& layer_opaque_rect,
43 LayerImplList& surface_layer_list) { 43 LayerImplList& surface_layer_list) {
44 scoped_ptr<TiledLayerImpl> layer = 44 scoped_ptr<TiledLayerImpl> layer =
45 TiledLayerImpl::Create(host_impl_.active_tree(), layer_id_++); 45 TiledLayerImpl::Create(host_impl_.active_tree(), layer_id_++);
46 scoped_ptr<LayerTilingData> tiler = LayerTilingData::Create( 46 scoped_ptr<LayerTilingData> tiler = LayerTilingData::Create(
47 gfx::Size(100, 100), LayerTilingData::NO_BORDER_TEXELS); 47 gfx::Size(100, 100), LayerTilingData::NO_BORDER_TEXELS);
48 tiler->SetBounds(layer_rect.size()); 48 tiler->SetTilingRect(layer_rect);
49 layer->SetTilingData(*tiler); 49 layer->SetTilingData(*tiler);
50 layer->set_skips_draw(false); 50 layer->set_skips_draw(false);
51 layer->SetDrawsContent(true); 51 layer->SetDrawsContent(true);
52 layer->draw_properties().target_space_transform = draw_transform; 52 layer->draw_properties().target_space_transform = draw_transform;
53 layer->draw_properties().screen_space_transform = draw_transform; 53 layer->draw_properties().screen_space_transform = draw_transform;
54 layer->draw_properties().visible_content_rect = layer_rect; 54 layer->draw_properties().visible_content_rect = layer_rect;
55 layer->draw_properties().opacity = opacity; 55 layer->draw_properties().opacity = opacity;
56 layer->SetContentsOpaque(opaque); 56 layer->SetContentsOpaque(opaque);
57 layer->SetBounds(layer_rect.size()); 57 layer->SetBounds(layer_rect.size());
58 layer->SetContentBounds(layer_rect.size()); 58 layer->SetContentBounds(layer_rect.size());
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 EXPECT_EQ(gfx::Rect(15, 10, 5, 11).ToString(), 776 EXPECT_EQ(gfx::Rect(15, 10, 5, 11).ToString(),
777 quad_list[0]->visible_rect.ToString()); 777 quad_list[0]->visible_rect.ToString());
778 EXPECT_EQ(gfx::Rect(15, 20, 8, 14).ToString(), 778 EXPECT_EQ(gfx::Rect(15, 20, 8, 14).ToString(),
779 quad_list[1]->visible_rect.ToString()); 779 quad_list[1]->visible_rect.ToString());
780 EXPECT_EQ(gfx::Rect(15, 30, 10, 16).ToString(), 780 EXPECT_EQ(gfx::Rect(15, 30, 10, 16).ToString(),
781 quad_list[2]->visible_rect.ToString()); 781 quad_list[2]->visible_rect.ToString());
782 } 782 }
783 783
784 } // namespace 784 } // namespace
785 } // namespace cc 785 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698