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

Side by Side Diff: cc/test/fake_picture_layer_impl.cc

Issue 145313006: [#7] Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 10 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/test/fake_picture_layer_impl.h ('k') | cc/test/fake_picture_layer_tiling_client.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test/fake_picture_layer_impl.h" 5 #include "cc/test/fake_picture_layer_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 #include "cc/resources/tile.h" 8 #include "cc/resources/tile.h"
9 #include "cc/trees/layer_tree_impl.h" 9 #include "cc/trees/layer_tree_impl.h"
10 10
(...skipping 18 matching lines...) Expand all
29 new FakePictureLayerImpl(tree_impl, id())).PassAs<LayerImpl>(); 29 new FakePictureLayerImpl(tree_impl, id())).PassAs<LayerImpl>();
30 } 30 }
31 31
32 void FakePictureLayerImpl::AppendQuads(QuadSink* quad_sink, 32 void FakePictureLayerImpl::AppendQuads(QuadSink* quad_sink,
33 AppendQuadsData* append_quads_data) { 33 AppendQuadsData* append_quads_data) {
34 PictureLayerImpl::AppendQuads(quad_sink, append_quads_data); 34 PictureLayerImpl::AppendQuads(quad_sink, append_quads_data);
35 ++append_quads_count_; 35 ++append_quads_count_;
36 } 36 }
37 37
38 gfx::Size FakePictureLayerImpl::CalculateTileSize( 38 gfx::Size FakePictureLayerImpl::CalculateTileSize(
39 gfx::Size content_bounds) const { 39 const gfx::Size& content_bounds) const {
40 if (fixed_tile_size_.IsEmpty()) { 40 if (fixed_tile_size_.IsEmpty()) {
41 return PictureLayerImpl::CalculateTileSize(content_bounds); 41 return PictureLayerImpl::CalculateTileSize(content_bounds);
42 } 42 }
43 43
44 return fixed_tile_size_; 44 return fixed_tile_size_;
45 } 45 }
46 46
47 PictureLayerTiling* FakePictureLayerImpl::HighResTiling() const { 47 PictureLayerTiling* FakePictureLayerImpl::HighResTiling() const {
48 PictureLayerTiling* result = NULL; 48 PictureLayerTiling* result = NULL;
49 for (size_t i = 0; i < tilings_->num_tilings(); ++i) { 49 for (size_t i = 0; i < tilings_->num_tilings(); ++i) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 DCHECK_EQ(tilings()->tiling_at(0)->resolution(), HIGH_RESOLUTION); 117 DCHECK_EQ(tilings()->tiling_at(0)->resolution(), HIGH_RESOLUTION);
118 DCHECK_EQ(tilings()->tiling_at(1)->resolution(), LOW_RESOLUTION); 118 DCHECK_EQ(tilings()->tiling_at(1)->resolution(), LOW_RESOLUTION);
119 HighResTiling()->CreateAllTilesForTesting(); 119 HighResTiling()->CreateAllTilesForTesting();
120 LowResTiling()->CreateAllTilesForTesting(); 120 LowResTiling()->CreateAllTilesForTesting();
121 } else { 121 } else {
122 DCHECK_EQ(tilings()->num_tilings(), 0u); 122 DCHECK_EQ(tilings()->num_tilings(), 0u);
123 } 123 }
124 } 124 }
125 125
126 } // namespace cc 126 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_picture_layer_impl.h ('k') | cc/test/fake_picture_layer_tiling_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698