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

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

Issue 367833003: cc: Start using raster/eviction iterators. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: perf test fix Created 6 years, 5 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 #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"
(...skipping 11 matching lines...) Expand all
22 22
23 // PictureLayerTilingClient implementation. 23 // PictureLayerTilingClient implementation.
24 virtual scoped_refptr<Tile> CreateTile( 24 virtual scoped_refptr<Tile> CreateTile(
25 PictureLayerTiling* tiling, const gfx::Rect& rect) OVERRIDE; 25 PictureLayerTiling* tiling, const gfx::Rect& rect) OVERRIDE;
26 virtual PicturePileImpl* GetPile() OVERRIDE; 26 virtual PicturePileImpl* GetPile() OVERRIDE;
27 virtual gfx::Size CalculateTileSize( 27 virtual gfx::Size CalculateTileSize(
28 const gfx::Size& content_bounds) const OVERRIDE; 28 const gfx::Size& content_bounds) const OVERRIDE;
29 virtual size_t GetMaxTilesForInterestArea() const OVERRIDE; 29 virtual size_t GetMaxTilesForInterestArea() const OVERRIDE;
30 virtual float GetSkewportTargetTimeInSeconds() const OVERRIDE; 30 virtual float GetSkewportTargetTimeInSeconds() const OVERRIDE;
31 virtual int GetSkewportExtrapolationLimitInContentPixels() const OVERRIDE; 31 virtual int GetSkewportExtrapolationLimitInContentPixels() const OVERRIDE;
32 virtual WhichTree GetTree() const OVERRIDE;
33 virtual bool RequiresHighResToDraw() const OVERRIDE;
32 34
33 void SetTileSize(const gfx::Size& tile_size); 35 void SetTileSize(const gfx::Size& tile_size);
34 gfx::Size TileSize() const { return tile_size_; } 36 gfx::Size TileSize() const { return tile_size_; }
35 37
36 virtual const Region* GetInvalidation() OVERRIDE; 38 virtual const Region* GetInvalidation() OVERRIDE;
37 virtual const PictureLayerTiling* GetTwinTiling( 39 virtual const PictureLayerTiling* GetTwinTiling(
38 const PictureLayerTiling* tiling) const OVERRIDE; 40 const PictureLayerTiling* tiling) const OVERRIDE;
39 41
40 void set_twin_tiling(PictureLayerTiling* tiling) { twin_tiling_ = tiling; } 42 void set_twin_tiling(PictureLayerTiling* tiling) { twin_tiling_ = tiling; }
41 void set_text_rect(const gfx::Rect& rect) { text_rect_ = rect; } 43 void set_text_rect(const gfx::Rect& rect) { text_rect_ = rect; }
42 void set_allow_create_tile(bool allow) { allow_create_tile_ = allow; } 44 void set_allow_create_tile(bool allow) { allow_create_tile_ = allow; }
43 void set_invalidation(const Region& region) { invalidation_ = region; } 45 void set_invalidation(const Region& region) { invalidation_ = region; }
44 void set_max_tiles_for_interest_area(size_t area) { 46 void set_max_tiles_for_interest_area(size_t area) {
45 max_tiles_for_interest_area_ = area; 47 max_tiles_for_interest_area_ = area;
46 } 48 }
49 void set_tree(WhichTree tree) { tree_ = tree; }
47 void set_skewport_target_time_in_seconds(float time) { 50 void set_skewport_target_time_in_seconds(float time) {
48 skewport_target_time_in_seconds_ = time; 51 skewport_target_time_in_seconds_ = time;
49 } 52 }
50 void set_skewport_extrapolation_limit_in_content_pixels(int limit) { 53 void set_skewport_extrapolation_limit_in_content_pixels(int limit) {
51 skewport_extrapolation_limit_in_content_pixels_ = limit; 54 skewport_extrapolation_limit_in_content_pixels_ = limit;
52 } 55 }
53 56
54 TileManager* tile_manager() const { 57 TileManager* tile_manager() const {
55 return tile_manager_.get(); 58 return tile_manager_.get();
56 } 59 }
57 60
58 protected: 61 protected:
59 FakeTileManagerClient tile_manager_client_; 62 FakeTileManagerClient tile_manager_client_;
60 scoped_ptr<ResourcePool> resource_pool_; 63 scoped_ptr<ResourcePool> resource_pool_;
61 scoped_ptr<TileManager> tile_manager_; 64 scoped_ptr<TileManager> tile_manager_;
62 scoped_refptr<PicturePileImpl> pile_; 65 scoped_refptr<PicturePileImpl> pile_;
63 gfx::Size tile_size_; 66 gfx::Size tile_size_;
64 PictureLayerTiling* twin_tiling_; 67 PictureLayerTiling* twin_tiling_;
65 gfx::Rect text_rect_; 68 gfx::Rect text_rect_;
66 bool allow_create_tile_; 69 bool allow_create_tile_;
67 Region invalidation_; 70 Region invalidation_;
68 size_t max_tiles_for_interest_area_; 71 size_t max_tiles_for_interest_area_;
69 float skewport_target_time_in_seconds_; 72 float skewport_target_time_in_seconds_;
70 int skewport_extrapolation_limit_in_content_pixels_; 73 int skewport_extrapolation_limit_in_content_pixels_;
74 WhichTree tree_;
71 }; 75 };
72 76
73 } // namespace cc 77 } // namespace cc
74 78
75 #endif // CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ 79 #endif // CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698