diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-21 19:15:27 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-21 19:15:27 +0000 |
commit | cd696271b3c491f2de0109e4dc6d991884f89540 (patch) | |
tree | 9425a004275595dd0d354b730cf47d58e24d6b93 /cc/test/fake_picture_layer_tiling_client.h | |
parent | 6c99c7bc949fc15b559793467fc1e1a6df857372 (diff) | |
download | chromium_src-cd696271b3c491f2de0109e4dc6d991884f89540.zip chromium_src-cd696271b3c491f2de0109e4dc6d991884f89540.tar.gz chromium_src-cd696271b3c491f2de0109e4dc6d991884f89540.tar.bz2 |
cc: Add PictureLayerTilingSet to manage PictureLayerTiling
PictureLayerTilingSet has multiple tilings at different content scales.
This should abstract managing the tilings from PictureLayerImpl. The
layer can then ask the set to fill in a given (integer) rect at a given
content scale and then get back the set of tiles/rects/texture
coordinates to generate that set. Using an integer rect allows textures
at different contents scales to fill a piece of geometry without cracks.
R=nduca@chromium.org
BUG=155209
Review URL: https://chromiumcodereview.appspot.com/11417111
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169083 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_picture_layer_tiling_client.h')
-rw-r--r-- | cc/test/fake_picture_layer_tiling_client.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/cc/test/fake_picture_layer_tiling_client.h b/cc/test/fake_picture_layer_tiling_client.h new file mode 100644 index 0000000..ecadac0 --- /dev/null +++ b/cc/test/fake_picture_layer_tiling_client.h @@ -0,0 +1,38 @@ +// Copyright 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ +#define CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ + +#include "cc/picture_layer_tiling.h" +#include "cc/picture_pile.h" +#include "cc/test/fake_tile_manager_client.h" +#include "cc/tile.h" +#include "cc/tile_manager.h" +#include "ui/gfx/rect.h" + +namespace cc { + +class FakePictureLayerTilingClient : public PictureLayerTilingClient { + public: + FakePictureLayerTilingClient(); + virtual ~FakePictureLayerTilingClient(); + + // PictureLayerTilingClient implementation. + virtual scoped_refptr<Tile> CreateTile( + PictureLayerTiling* tiling, gfx::Rect rect) OVERRIDE; + + void SetTileSize(gfx::Size tile_size); + gfx::Size TileSize() const { return tile_size_; } + + protected: + FakeTileManagerClient tile_manager_client_; + TileManager tile_manager_; + PicturePile pile_; + gfx::Size tile_size_; +}; + +} // namespace cc + +#endif // CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ |