Chromium Code Reviews| 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" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 } | 88 } |
| 89 | 89 |
| 90 void set_has_text(bool has_text) { has_text_ = has_text; } | 90 void set_has_text(bool has_text) { has_text_ = has_text; } |
| 91 | 91 |
| 92 void set_rasterize_on_demand() { mode_ = PICTURE_PILE_MODE; } | 92 void set_rasterize_on_demand() { mode_ = PICTURE_PILE_MODE; } |
| 93 | 93 |
| 94 Mode mode_; | 94 Mode mode_; |
| 95 SkColor solid_color_; | 95 SkColor solid_color_; |
| 96 bool has_text_; | 96 bool has_text_; |
| 97 scoped_ptr<ScopedResource> resource_; | 97 scoped_ptr<ScopedResource> resource_; |
| 98 RasterWorkerPool::RasterTask raster_task_; | 98 scoped_refptr<internal::RasterWorkerPoolTask> raster_task_; |
|
alokp
2014/02/14 18:50:59
can it be done in a separate patch?
reveman
2014/02/14 23:30:52
Done.
| |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 ManagedTileState(); | 101 ManagedTileState(); |
| 102 ~ManagedTileState(); | 102 ~ManagedTileState(); |
| 103 | 103 |
| 104 scoped_ptr<base::Value> AsValue() const; | 104 scoped_ptr<base::Value> AsValue() const; |
| 105 | 105 |
| 106 // Persisted state: valid all the time. | 106 // Persisted state: valid all the time. |
| 107 TileVersion tile_versions[NUM_RASTER_MODES]; | 107 TileVersion tile_versions[NUM_RASTER_MODES]; |
| 108 RasterMode raster_mode; | 108 RasterMode raster_mode; |
| 109 | 109 |
| 110 ManagedTileBin bin; | 110 ManagedTileBin bin; |
| 111 | 111 |
| 112 TileResolution resolution; | 112 TileResolution resolution; |
| 113 bool required_for_activation; | 113 bool required_for_activation; |
| 114 TilePriority::PriorityBin priority_bin; | 114 TilePriority::PriorityBin priority_bin; |
| 115 float distance_to_visible; | 115 float distance_to_visible; |
| 116 bool visible_and_ready_to_draw; | 116 bool visible_and_ready_to_draw; |
| 117 | 117 |
| 118 // Priority for this state from the last time we assigned memory. | 118 // Priority for this state from the last time we assigned memory. |
| 119 unsigned scheduled_priority; | 119 unsigned scheduled_priority; |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 } // namespace cc | 122 } // namespace cc |
| 123 | 123 |
| 124 #endif // CC_RESOURCES_MANAGED_TILE_STATE_H_ | 124 #endif // CC_RESOURCES_MANAGED_TILE_STATE_H_ |
| OLD | NEW |