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

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

Issue 732423002: Update from chromium https://crrev.com/304586 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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') | cc/test/fake_picture_pile.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 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile( 44 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile(
45 PictureLayerTiling*, 45 PictureLayerTiling*,
46 const gfx::Rect& rect) { 46 const gfx::Rect& rect) {
47 if (!allow_create_tile_) 47 if (!allow_create_tile_)
48 return scoped_refptr<Tile>(); 48 return scoped_refptr<Tile>();
49 return tile_manager_->CreateTile(pile_.get(), tile_size_, rect, 1, 0, 0, 0); 49 return tile_manager_->CreateTile(pile_.get(), tile_size_, rect, 1, 0, 0, 0);
50 } 50 }
51 51
52 RasterSource* FakePictureLayerTilingClient::GetRasterSource() {
53 return pile_.get();
54 }
55
56 void FakePictureLayerTilingClient::SetTileSize(const gfx::Size& tile_size) { 52 void FakePictureLayerTilingClient::SetTileSize(const gfx::Size& tile_size) {
57 tile_size_ = tile_size; 53 tile_size_ = tile_size;
58 } 54 }
59 55
60 gfx::Size FakePictureLayerTilingClient::CalculateTileSize( 56 gfx::Size FakePictureLayerTilingClient::CalculateTileSize(
61 const gfx::Size& /* content_bounds */) const { 57 const gfx::Size& /* content_bounds */) const {
62 return tile_size_; 58 return tile_size_;
63 } 59 }
64 60
65 TilePriority::PriorityBin FakePictureLayerTilingClient::GetMaxTilePriorityBin() 61 TilePriority::PriorityBin FakePictureLayerTilingClient::GetMaxTilePriorityBin()
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 93
98 WhichTree FakePictureLayerTilingClient::GetTree() const { 94 WhichTree FakePictureLayerTilingClient::GetTree() const {
99 return tree_; 95 return tree_;
100 } 96 }
101 97
102 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const { 98 bool FakePictureLayerTilingClient::RequiresHighResToDraw() const {
103 return false; 99 return false;
104 } 100 }
105 101
106 } // namespace cc 102 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_picture_layer_tiling_client.h ('k') | cc/test/fake_picture_pile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698