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

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

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 years, 11 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 | « cc/layers/tiled_layer_impl.cc ('k') | cc/layers/tiled_layer_unittest.cc » ('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/layers/tiled_layer_impl.h" 5 #include "cc/layers/tiled_layer_impl.h"
6 6
7 #include "cc/layers/append_quads_data.h" 7 #include "cc/layers/append_quads_data.h"
8 #include "cc/quads/tile_draw_quad.h" 8 #include "cc/quads/tile_draw_quad.h"
9 #include "cc/resources/layer_tiling_data.h" 9 #include "cc/resources/layer_tiling_data.h"
10 #include "cc/test/fake_impl_proxy.h" 10 #include "cc/test/fake_impl_proxy.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 66
67 return layer.Pass(); 67 return layer.Pass();
68 } 68 }
69 69
70 void GetQuads(QuadList* quads, 70 void GetQuads(QuadList* quads,
71 SharedQuadStateList* shared_states, 71 SharedQuadStateList* shared_states,
72 gfx::Size tile_size, 72 gfx::Size tile_size,
73 gfx::Size layer_size, 73 gfx::Size layer_size,
74 LayerTilingData::BorderTexelOption border_texel_option, 74 LayerTilingData::BorderTexelOption border_texel_option,
75 gfx::Rect visible_content_rect) { 75 const gfx::Rect& visible_content_rect) {
76 scoped_ptr<TiledLayerImpl> layer = 76 scoped_ptr<TiledLayerImpl> layer =
77 CreateLayer(tile_size, layer_size, border_texel_option); 77 CreateLayer(tile_size, layer_size, border_texel_option);
78 layer->draw_properties().visible_content_rect = visible_content_rect; 78 layer->draw_properties().visible_content_rect = visible_content_rect;
79 layer->SetBounds(layer_size); 79 layer->SetBounds(layer_size);
80 80
81 MockQuadCuller quad_culler(quads, shared_states); 81 MockQuadCuller quad_culler(quads, shared_states);
82 AppendQuadsData data; 82 AppendQuadsData data;
83 layer->AppendQuads(&quad_culler, &data); 83 layer->AppendQuads(&quad_culler, &data);
84 } 84 }
85 85
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 ResourceProvider::ResourceId empty_resource(0); 299 ResourceProvider::ResourceId empty_resource(0);
300 layer->PushTileProperties(0, 1, empty_resource, gfx::Rect(0, 0, 1, 1), false); 300 layer->PushTileProperties(0, 1, empty_resource, gfx::Rect(0, 0, 1, 1), false);
301 layer->PushTileProperties(2, 3, empty_resource, gfx::Rect(0, 0, 1, 1), false); 301 layer->PushTileProperties(2, 3, empty_resource, gfx::Rect(0, 0, 1, 1), false);
302 layer->PushTileProperties(2, 0, empty_resource, gfx::Rect(0, 0, 1, 1), false); 302 layer->PushTileProperties(2, 0, empty_resource, gfx::Rect(0, 0, 1, 1), false);
303 303
304 EXPECT_EQ(layer->GPUMemoryUsageInBytes(), 0u); 304 EXPECT_EQ(layer->GPUMemoryUsageInBytes(), 0u);
305 } 305 }
306 306
307 } // namespace 307 } // namespace
308 } // namespace cc 308 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer_impl.cc ('k') | cc/layers/tiled_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698