OLD | NEW |
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_LAYERS_PICTURE_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 virtual void CalculateContentsScale(float ideal_contents_scale, | 46 virtual void CalculateContentsScale(float ideal_contents_scale, |
47 float device_scale_factor, | 47 float device_scale_factor, |
48 float page_scale_factor, | 48 float page_scale_factor, |
49 bool animating_transform_to_screen, | 49 bool animating_transform_to_screen, |
50 float* contents_scale_x, | 50 float* contents_scale_x, |
51 float* contents_scale_y, | 51 float* contents_scale_y, |
52 gfx::Size* content_bounds) OVERRIDE; | 52 gfx::Size* content_bounds) OVERRIDE; |
53 virtual skia::RefPtr<SkPicture> GetPicture() OVERRIDE; | 53 virtual skia::RefPtr<SkPicture> GetPicture() OVERRIDE; |
54 | 54 |
55 // PictureLayerTilingClient overrides. | 55 // PictureLayerTilingClient overrides. |
56 virtual scoped_refptr<Tile> CreateTile(PictureLayerTiling* tiling, | 56 virtual scoped_refptr<Tile> CreateTile( |
57 gfx::Rect content_rect) OVERRIDE; | 57 PictureLayerTiling* tiling, |
| 58 const gfx::Rect& content_rect) OVERRIDE; |
58 virtual void UpdatePile(Tile* tile) OVERRIDE; | 59 virtual void UpdatePile(Tile* tile) OVERRIDE; |
59 virtual gfx::Size CalculateTileSize( | 60 virtual gfx::Size CalculateTileSize( |
60 gfx::Size content_bounds) const OVERRIDE; | 61 gfx::Size content_bounds) const OVERRIDE; |
61 virtual const Region* GetInvalidation() OVERRIDE; | 62 virtual const Region* GetInvalidation() OVERRIDE; |
62 virtual const PictureLayerTiling* GetTwinTiling( | 63 virtual const PictureLayerTiling* GetTwinTiling( |
63 const PictureLayerTiling* tiling) const OVERRIDE; | 64 const PictureLayerTiling* tiling) const OVERRIDE; |
64 | 65 |
65 // PushPropertiesTo active tree => pending tree. | 66 // PushPropertiesTo active tree => pending tree. |
66 void SyncTiling(const PictureLayerTiling* tiling); | 67 void SyncTiling(const PictureLayerTiling* tiling); |
67 | 68 |
(...skipping 25 matching lines...) Expand all Loading... |
93 std::vector<PictureLayerTiling*> used_tilings); | 94 std::vector<PictureLayerTiling*> used_tilings); |
94 float MinimumContentsScale() const; | 95 float MinimumContentsScale() const; |
95 float SnappedContentsScale(float new_contents_scale); | 96 float SnappedContentsScale(float new_contents_scale); |
96 void UpdateLCDTextStatus(bool new_status); | 97 void UpdateLCDTextStatus(bool new_status); |
97 void ResetRasterScale(); | 98 void ResetRasterScale(); |
98 void MarkVisibleResourcesAsRequired() const; | 99 void MarkVisibleResourcesAsRequired() const; |
99 bool MarkVisibleTilesAsRequired( | 100 bool MarkVisibleTilesAsRequired( |
100 PictureLayerTiling* tiling, | 101 PictureLayerTiling* tiling, |
101 const PictureLayerTiling* optional_twin_tiling, | 102 const PictureLayerTiling* optional_twin_tiling, |
102 float contents_scale, | 103 float contents_scale, |
103 gfx::Rect rect, | 104 const gfx::Rect& rect, |
104 const Region& missing_region) const; | 105 const Region& missing_region) const; |
105 | 106 |
106 void DoPostCommitInitializationIfNeeded() { | 107 void DoPostCommitInitializationIfNeeded() { |
107 if (needs_post_commit_initialization_) | 108 if (needs_post_commit_initialization_) |
108 DoPostCommitInitialization(); | 109 DoPostCommitInitialization(); |
109 } | 110 } |
110 void DoPostCommitInitialization(); | 111 void DoPostCommitInitialization(); |
111 | 112 |
112 bool CanHaveTilings() const; | 113 bool CanHaveTilings() const; |
113 bool CanHaveTilingWithScale(float contents_scale) const; | 114 bool CanHaveTilingWithScale(float contents_scale) const; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 bool should_update_tile_priorities_; | 148 bool should_update_tile_priorities_; |
148 bool should_use_gpu_rasterization_; | 149 bool should_use_gpu_rasterization_; |
149 | 150 |
150 friend class PictureLayer; | 151 friend class PictureLayer; |
151 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 152 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
152 }; | 153 }; |
153 | 154 |
154 } // namespace cc | 155 } // namespace cc |
155 | 156 |
156 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 157 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |