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

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

Issue 12316084: cc: Consolidate the analysis_canvas operations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win warning fix Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « cc/switches.cc ('k') | cc/tile.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 namespace cc { 7 namespace cc {
8 8
9 class FakeInfinitePicturePileImpl : public PicturePileImpl 9 class FakeInfinitePicturePileImpl : public PicturePileImpl
10 { 10 {
11 public: 11 public:
12 FakeInfinitePicturePileImpl() { 12 FakeInfinitePicturePileImpl() {
13 gfx::Size size(std::numeric_limits<int>::max(), 13 gfx::Size size(std::numeric_limits<int>::max(),
14 std::numeric_limits<int>::max()); 14 std::numeric_limits<int>::max());
15 Resize(size); 15 Resize(size);
16 recorded_region_ = Region(gfx::Rect(size)); 16 recorded_region_ = Region(gfx::Rect(size));
17 } 17 }
18 18
19 protected: 19 protected:
20 ~FakeInfinitePicturePileImpl() {} 20 ~FakeInfinitePicturePileImpl() {}
21 }; 21 };
22 22
23 FakePictureLayerTilingClient::FakePictureLayerTilingClient() 23 FakePictureLayerTilingClient::FakePictureLayerTilingClient()
24 : tile_manager_(&tile_manager_client_, NULL, 1, false), 24 : tile_manager_(&tile_manager_client_, NULL, 1, false, false, false),
25 pile_(new FakeInfinitePicturePileImpl()) { 25 pile_(new FakeInfinitePicturePileImpl()) {
26 } 26 }
27 27
28 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() { 28 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() {
29 } 29 }
30 30
31 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile( 31 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile(
32 PictureLayerTiling*, 32 PictureLayerTiling*,
33 gfx::Rect rect) { 33 gfx::Rect rect) {
34 return make_scoped_refptr(new Tile(&tile_manager_, 34 return make_scoped_refptr(new Tile(&tile_manager_,
(...skipping 10 matching lines...) Expand all
45 tile_size_ = tile_size; 45 tile_size_ = tile_size;
46 } 46 }
47 47
48 gfx::Size FakePictureLayerTilingClient::CalculateTileSize( 48 gfx::Size FakePictureLayerTilingClient::CalculateTileSize(
49 gfx::Size /* current_tile_size */, 49 gfx::Size /* current_tile_size */,
50 gfx::Size /* content_bounds */) { 50 gfx::Size /* content_bounds */) {
51 return tile_size_; 51 return tile_size_;
52 } 52 }
53 53
54 } // namespace cc 54 } // namespace cc
OLDNEW
« no previous file with comments | « cc/switches.cc ('k') | cc/tile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698