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

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

Issue 12865017: Makes tile-creation lazy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing last round of feedback Created 7 years, 8 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/resources/picture_pile_base.h ('k') | cc/test/fake_picture_layer_tiling_client.cc » ('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 #ifndef CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ 5 #ifndef CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_
6 #define CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ 6 #define CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_
7 7
8 #include "cc/resources/picture_layer_tiling.h" 8 #include "cc/resources/picture_layer_tiling.h"
9 #include "cc/resources/picture_pile_impl.h" 9 #include "cc/resources/picture_pile_impl.h"
10 #include "cc/resources/tile.h" 10 #include "cc/resources/tile.h"
11 #include "cc/resources/tile_manager.h" 11 #include "cc/resources/tile_manager.h"
12 #include "cc/test/fake_rendering_stats_instrumentation.h" 12 #include "cc/test/fake_rendering_stats_instrumentation.h"
13 #include "cc/test/fake_tile_manager_client.h" 13 #include "cc/test/fake_tile_manager_client.h"
14 #include "ui/gfx/rect.h" 14 #include "ui/gfx/rect.h"
15 15
16 namespace cc { 16 namespace cc {
17 17
18 class FakePictureLayerTilingClient : public PictureLayerTilingClient { 18 class FakePictureLayerTilingClient : public PictureLayerTilingClient {
19 public: 19 public:
20 FakePictureLayerTilingClient(); 20 FakePictureLayerTilingClient();
21 virtual ~FakePictureLayerTilingClient(); 21 virtual ~FakePictureLayerTilingClient();
22 22
23 // PictureLayerTilingClient implementation. 23 // PictureLayerTilingClient implementation.
24 virtual scoped_refptr<Tile> CreateTile( 24 virtual scoped_refptr<Tile> CreateTile(
25 PictureLayerTiling* tiling, gfx::Rect rect) OVERRIDE; 25 PictureLayerTiling* tiling, gfx::Rect rect) OVERRIDE;
26 virtual void UpdatePile(Tile* tile) OVERRIDE {} 26 virtual void UpdatePile(Tile* tile) OVERRIDE {}
27 virtual gfx::Size CalculateTileSize( 27 virtual gfx::Size CalculateTileSize(
28 gfx::Size current_tile_size,
29 gfx::Size content_bounds) OVERRIDE; 28 gfx::Size content_bounds) OVERRIDE;
30 29
31 void SetTileSize(gfx::Size tile_size); 30 void SetTileSize(gfx::Size tile_size);
32 gfx::Size TileSize() const { return tile_size_; } 31 gfx::Size TileSize() const { return tile_size_; }
33 scoped_refptr<PicturePileImpl> pile() { return pile_; } 32 scoped_refptr<PicturePileImpl> pile() { return pile_; }
34 33
34 virtual const Region* GetInvalidation() OVERRIDE;
35 virtual const PictureLayerTiling* GetTwinTiling(
36 const PictureLayerTiling* tiling) OVERRIDE;
37
35 protected: 38 protected:
36 FakeTileManagerClient tile_manager_client_; 39 FakeTileManagerClient tile_manager_client_;
37 FakeRenderingStatsInstrumentation stats_instrumentation_; 40 FakeRenderingStatsInstrumentation stats_instrumentation_;
38 TileManager tile_manager_; 41 TileManager tile_manager_;
39 scoped_refptr<PicturePileImpl> pile_; 42 scoped_refptr<PicturePileImpl> pile_;
40 gfx::Size tile_size_; 43 gfx::Size tile_size_;
41 }; 44 };
42 45
43 } // namespace cc 46 } // namespace cc
44 47
45 #endif // CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ 48 #endif // CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_
OLDNEW
« no previous file with comments | « cc/resources/picture_pile_base.h ('k') | cc/test/fake_picture_layer_tiling_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698