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

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

Issue 12194015: cc: Rasterize cheap tiles immediately (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 7 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 | Annotate | Revision Log
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 FakePictureLayerTilingClient::FakePictureLayerTilingClient() 9 FakePictureLayerTilingClient::FakePictureLayerTilingClient()
10 : tile_manager_(&tile_manager_client_, NULL, 1, false), 10 : tile_manager_(&tile_manager_client_, NULL, 1, false, false),
11 pile_(PicturePileImpl::Create()) { 11 pile_(PicturePileImpl::Create()) {
12 } 12 }
13 13
14 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() { 14 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() {
15 } 15 }
16 16
17 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile( 17 scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile(
18 PictureLayerTiling*, 18 PictureLayerTiling*,
19 gfx::Rect rect) { 19 gfx::Rect rect) {
20 return make_scoped_refptr(new Tile(&tile_manager_, 20 return make_scoped_refptr(new Tile(&tile_manager_,
21 pile_.get(), 21 pile_.get(),
22 tile_size_, 22 tile_size_,
23 GL_RGBA, 23 GL_RGBA,
24 rect, 24 rect,
25 1)); 25 1));
26 } 26 }
27 27
28 void FakePictureLayerTilingClient::SetTileSize(gfx::Size tile_size) { 28 void FakePictureLayerTilingClient::SetTileSize(gfx::Size tile_size) {
29 tile_size_ = tile_size; 29 tile_size_ = tile_size;
30 } 30 }
31 31
32 gfx::Size FakePictureLayerTilingClient::CalculateTileSize( 32 gfx::Size FakePictureLayerTilingClient::CalculateTileSize(
33 gfx::Size /* current_tile_size */, 33 gfx::Size /* current_tile_size */,
34 gfx::Size /* content_bounds */) { 34 gfx::Size /* content_bounds */) {
35 return tile_size_; 35 return tile_size_;
36 } 36 }
37 37
38 } // namespace cc 38 } // namespace cc
OLDNEW
« no previous file with comments | « cc/picture_pile_impl.cc ('k') | cc/tile_manager.h » ('j') | cc/tile_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698