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

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

Issue 1127253002: Revert "cc: Remove Tile refcounting and RefCountedManaged." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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_tiling_client.h ('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/test/fake_picture_layer_tiling_client.h" 5 #include "cc/test/fake_picture_layer_tiling_client.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "cc/test/fake_picture_pile_impl.h" 9 #include "cc/test/fake_picture_pile_impl.h"
10 #include "cc/test/fake_tile_manager.h" 10 #include "cc/test/fake_tile_manager.h"
(...skipping 15 matching lines...) Expand all
26 new FakeTileManager(&tile_manager_client_, resource_pool_.get())), 26 new FakeTileManager(&tile_manager_client_, resource_pool_.get())),
27 pile_(FakePicturePileImpl::CreateInfiniteFilledPile()), 27 pile_(FakePicturePileImpl::CreateInfiniteFilledPile()),
28 twin_set_(nullptr), 28 twin_set_(nullptr),
29 twin_tiling_(nullptr), 29 twin_tiling_(nullptr),
30 max_tile_priority_bin_(TilePriority::NOW) { 30 max_tile_priority_bin_(TilePriority::NOW) {
31 } 31 }
32 32
33 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() { 33 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() {
34 } 34 }
35 35
36 ScopedTilePtr FakePictureLayerTilingClient::CreateTile(float content_scale, 36 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile(
37 const gfx::Rect& rect) { 37 float content_scale,
38 const gfx::Rect& rect) {
38 return tile_manager_->CreateTile(pile_.get(), tile_size_, rect, 1, 0, 0, 0); 39 return tile_manager_->CreateTile(pile_.get(), tile_size_, rect, 1, 0, 0, 0);
39 } 40 }
40 41
41 void FakePictureLayerTilingClient::SetTileSize(const gfx::Size& tile_size) { 42 void FakePictureLayerTilingClient::SetTileSize(const gfx::Size& tile_size) {
42 tile_size_ = tile_size; 43 tile_size_ = tile_size;
43 } 44 }
44 45
45 gfx::Size FakePictureLayerTilingClient::CalculateTileSize( 46 gfx::Size FakePictureLayerTilingClient::CalculateTileSize(
46 const gfx::Size& /* content_bounds */) const { 47 const gfx::Size& /* content_bounds */) const {
47 return tile_size_; 48 return tile_size_;
(...skipping 18 matching lines...) Expand all
66 return twin_set_->tiling_at(i); 67 return twin_set_->tiling_at(i);
67 } 68 }
68 return nullptr; 69 return nullptr;
69 } 70 }
70 71
71 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const { 72 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const {
72 return false; 73 return false;
73 } 74 }
74 75
75 } // namespace cc 76 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_picture_layer_tiling_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698