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
3 // found in the LICENSE file.
5 #include "cc/test/fake_picture_layer_tiling_client.h"
9 class FakeInfinitePicturePileImpl
: public PicturePileImpl
12 FakeInfinitePicturePileImpl() {
13 gfx::Size
size(std::numeric_limits
<int>::max(),
14 std::numeric_limits
<int>::max());
16 recorded_region_
= Region(gfx::Rect(size
));
20 ~FakeInfinitePicturePileImpl() {}
23 FakePictureLayerTilingClient::FakePictureLayerTilingClient()
24 : tile_manager_(&tile_manager_client_
, NULL
, 1, false),
25 pile_(new FakeInfinitePicturePileImpl()) {
28 FakePictureLayerTilingClient::~FakePictureLayerTilingClient() {
31 scoped_refptr
<Tile
> FakePictureLayerTilingClient::CreateTile(
34 return make_scoped_refptr(new Tile(&tile_manager_
,
44 void FakePictureLayerTilingClient::SetTileSize(gfx::Size tile_size
) {
45 tile_size_
= tile_size
;
48 gfx::Size
FakePictureLayerTilingClient::CalculateTileSize(
49 gfx::Size
/* current_tile_size */,
50 gfx::Size
/* content_bounds */) {