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/test/fake_picture_layer_impl.cc

Issue 1180073015: cc: Remove LayerImpl::SetContentBounds() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rm-setcontentbounds: . Created 5 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 | « cc/layers/video_layer_impl_unittest.cc ('k') | cc/test/layer_tree_host_common_test.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 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/tiles/tile.h" 8 #include "cc/tiles/tile.h"
9 #include "cc/trees/layer_tree_impl.h" 9 #include "cc/trees/layer_tree_impl.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 FakePictureLayerImpl::FakePictureLayerImpl( 13 FakePictureLayerImpl::FakePictureLayerImpl(
14 LayerTreeImpl* tree_impl, 14 LayerTreeImpl* tree_impl,
15 int id, 15 int id,
16 scoped_refptr<RasterSource> raster_source, 16 scoped_refptr<RasterSource> raster_source,
17 bool is_mask) 17 bool is_mask)
18 : PictureLayerImpl(tree_impl, 18 : PictureLayerImpl(tree_impl,
19 id, 19 id,
20 is_mask, 20 is_mask,
21 new LayerImpl::SyncedScrollOffset), 21 new LayerImpl::SyncedScrollOffset),
22 append_quads_count_(0), 22 append_quads_count_(0),
23 did_become_active_call_count_(0), 23 did_become_active_call_count_(0),
24 has_valid_tile_priorities_(false), 24 has_valid_tile_priorities_(false),
25 use_set_valid_tile_priorities_flag_(false), 25 use_set_valid_tile_priorities_flag_(false),
26 release_resources_count_(0) { 26 release_resources_count_(0) {
27 SetBounds(raster_source->GetSize()); 27 SetBounds(raster_source->GetSize());
28 SetContentBounds(raster_source->GetSize());
29 SetRasterSourceOnPending(raster_source, Region()); 28 SetRasterSourceOnPending(raster_source, Region());
30 } 29 }
31 30
32 FakePictureLayerImpl::FakePictureLayerImpl( 31 FakePictureLayerImpl::FakePictureLayerImpl(
33 LayerTreeImpl* tree_impl, 32 LayerTreeImpl* tree_impl,
34 int id, 33 int id,
35 scoped_refptr<RasterSource> raster_source, 34 scoped_refptr<RasterSource> raster_source,
36 bool is_mask, 35 bool is_mask,
37 const gfx::Size& layer_bounds) 36 const gfx::Size& layer_bounds)
38 : PictureLayerImpl(tree_impl, 37 : PictureLayerImpl(tree_impl,
39 id, 38 id,
40 is_mask, 39 is_mask,
41 new LayerImpl::SyncedScrollOffset), 40 new LayerImpl::SyncedScrollOffset),
42 append_quads_count_(0), 41 append_quads_count_(0),
43 did_become_active_call_count_(0), 42 did_become_active_call_count_(0),
44 has_valid_tile_priorities_(false), 43 has_valid_tile_priorities_(false),
45 use_set_valid_tile_priorities_flag_(false), 44 use_set_valid_tile_priorities_flag_(false),
46 release_resources_count_(0) { 45 release_resources_count_(0) {
47 SetBounds(layer_bounds); 46 SetBounds(layer_bounds);
48 SetContentBounds(layer_bounds);
49 SetRasterSourceOnPending(raster_source, Region()); 47 SetRasterSourceOnPending(raster_source, Region());
50 } 48 }
51 49
52 FakePictureLayerImpl::FakePictureLayerImpl(LayerTreeImpl* tree_impl, 50 FakePictureLayerImpl::FakePictureLayerImpl(LayerTreeImpl* tree_impl,
53 int id, 51 int id,
54 bool is_mask) 52 bool is_mask)
55 : FakePictureLayerImpl(tree_impl, 53 : FakePictureLayerImpl(tree_impl,
56 id, 54 id,
57 is_mask, 55 is_mask,
58 new LayerImpl::SyncedScrollOffset) { 56 new LayerImpl::SyncedScrollOffset) {
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 235
238 return CountTilesRequired(&PictureLayerTiling::IsTileRequiredForDraw); 236 return CountTilesRequired(&PictureLayerTiling::IsTileRequiredForDraw);
239 } 237 }
240 238
241 void FakePictureLayerImpl::ReleaseResources() { 239 void FakePictureLayerImpl::ReleaseResources() {
242 PictureLayerImpl::ReleaseResources(); 240 PictureLayerImpl::ReleaseResources();
243 ++release_resources_count_; 241 ++release_resources_count_;
244 } 242 }
245 243
246 } // namespace cc 244 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/video_layer_impl_unittest.cc ('k') | cc/test/layer_tree_host_common_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698