| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_RESOURCES_MANAGED_TILE_STATE_H_ | 5 #ifndef CC_RESOURCES_MANAGED_TILE_STATE_H_ |
| 6 #define CC_RESOURCES_MANAGED_TILE_STATE_H_ | 6 #define CC_RESOURCES_MANAGED_TILE_STATE_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/resources/platform_color.h" | 9 #include "cc/resources/platform_color.h" |
| 10 #include "cc/resources/raster_worker_pool.h" | 10 #include "cc/resources/raster_worker_pool.h" |
| 11 #include "cc/resources/resource_pool.h" | 11 #include "cc/resources/resource_pool.h" |
| 12 #include "cc/resources/resource_provider.h" | 12 #include "cc/resources/resource_provider.h" |
| 13 #include "cc/resources/tile_manager.h" | 13 #include "cc/resources/tile_manager.h" |
| 14 | 14 |
| 15 namespace cc { | 15 namespace cc { |
| 16 | 16 |
| 17 enum TileRasterFlags { |
| 18 USE_LCD_TEXT = 1 << 0, |
| 19 USE_HIGH_QUALITY = 1 << 1 |
| 20 }; |
| 21 |
| 17 // This is state that is specific to a tile that is | 22 // This is state that is specific to a tile that is |
| 18 // managed by the TileManager. | 23 // managed by the TileManager. |
| 19 class CC_EXPORT ManagedTileState { | 24 class CC_EXPORT ManagedTileState { |
| 20 public: | 25 public: |
| 21 class CC_EXPORT TileVersion { | 26 class CC_EXPORT TileVersion { |
| 22 public: | 27 public: |
| 23 enum Mode { | 28 enum Mode { |
| 24 RESOURCE_MODE, | 29 RESOURCE_MODE, |
| 25 SOLID_COLOR_MODE, | 30 SOLID_COLOR_MODE, |
| 26 PICTURE_PILE_MODE, | 31 PICTURE_PILE_MODE, |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 Mode mode_; | 103 Mode mode_; |
| 99 SkColor solid_color_; | 104 SkColor solid_color_; |
| 100 | 105 |
| 101 // TODO(reveman): Eliminate the need for both |resource_id_| | 106 // TODO(reveman): Eliminate the need for both |resource_id_| |
| 102 // and |resource| by re-factoring the "force upload" | 107 // and |resource| by re-factoring the "force upload" |
| 103 // mechanism. crbug.com/245767 | 108 // mechanism. crbug.com/245767 |
| 104 ResourceProvider::ResourceId resource_id_; | 109 ResourceProvider::ResourceId resource_id_; |
| 105 scoped_ptr<ResourcePool::Resource> resource_; | 110 scoped_ptr<ResourcePool::Resource> resource_; |
| 106 GLenum resource_format_; | 111 GLenum resource_format_; |
| 107 bool forced_upload_; | 112 bool forced_upload_; |
| 113 unsigned raster_flags_; |
| 108 }; | 114 }; |
| 109 | 115 |
| 110 | 116 |
| 111 ManagedTileState(); | 117 ManagedTileState(); |
| 112 ~ManagedTileState(); | 118 ~ManagedTileState(); |
| 113 | 119 |
| 114 scoped_ptr<base::Value> AsValue() const; | 120 scoped_ptr<base::Value> AsValue() const; |
| 115 | 121 |
| 116 // Persisted state: valid all the time. | 122 // Persisted state: valid all the time. |
| 117 TileVersion tile_version; | 123 TileVersion tile_version; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 138 TileManagerBin gpu_memmgr_stats_bin; | 144 TileManagerBin gpu_memmgr_stats_bin; |
| 139 TileResolution resolution; | 145 TileResolution resolution; |
| 140 bool required_for_activation; | 146 bool required_for_activation; |
| 141 float time_to_needed_in_seconds; | 147 float time_to_needed_in_seconds; |
| 142 float distance_to_visible_in_pixels; | 148 float distance_to_visible_in_pixels; |
| 143 }; | 149 }; |
| 144 | 150 |
| 145 } // namespace cc | 151 } // namespace cc |
| 146 | 152 |
| 147 #endif // CC_RESOURCES_MANAGED_TILE_STATE_H_ | 153 #endif // CC_RESOURCES_MANAGED_TILE_STATE_H_ |
| OLD | NEW |