| 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_RESOURCES_TILE_H_ | 5 #ifndef CC_RESOURCES_TILE_H_ |
| 6 #define CC_RESOURCES_TILE_H_ | 6 #define CC_RESOURCES_TILE_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "cc/base/ref_counted_managed.h" | 9 #include "cc/base/ref_counted_managed.h" |
| 10 #include "cc/resources/raster_source.h" | 10 #include "cc/resources/raster_source.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 void set_required_for_draw(bool is_required) { | 81 void set_required_for_draw(bool is_required) { |
| 82 required_for_draw_ = is_required; | 82 required_for_draw_ = is_required; |
| 83 } | 83 } |
| 84 | 84 |
| 85 bool use_picture_analysis() const { | 85 bool use_picture_analysis() const { |
| 86 return !!(flags_ & USE_PICTURE_ANALYSIS); | 86 return !!(flags_ & USE_PICTURE_ANALYSIS); |
| 87 } | 87 } |
| 88 | 88 |
| 89 bool HasResource() const { return draw_info_.has_resource(); } | 89 bool HasResource() const { return draw_info_.has_resource(); } |
| 90 bool NeedsRaster() const { | 90 bool NeedsRaster() const { |
| 91 return draw_info_.mode() == TileDrawInfo::PICTURE_PILE_MODE || | 91 return draw_info_.mode() == TileDrawInfo::OOM_MODE || |
| 92 !draw_info_.IsReadyToDraw(); | 92 !draw_info_.IsReadyToDraw(); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void AsValueInto(base::trace_event::TracedValue* dict) const; | 95 void AsValueInto(base::trace_event::TracedValue* dict) const; |
| 96 | 96 |
| 97 inline bool IsReadyToDraw() const { return draw_info_.IsReadyToDraw(); } | 97 inline bool IsReadyToDraw() const { return draw_info_.IsReadyToDraw(); } |
| 98 | 98 |
| 99 const TileDrawInfo& draw_info() const { return draw_info_; } | 99 const TileDrawInfo& draw_info() const { return draw_info_; } |
| 100 | 100 |
| 101 TileDrawInfo& draw_info() { return draw_info_; } | 101 TileDrawInfo& draw_info() { return draw_info_; } |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 unsigned scheduled_priority_; | 170 unsigned scheduled_priority_; |
| 171 | 171 |
| 172 scoped_refptr<RasterTask> raster_task_; | 172 scoped_refptr<RasterTask> raster_task_; |
| 173 | 173 |
| 174 DISALLOW_COPY_AND_ASSIGN(Tile); | 174 DISALLOW_COPY_AND_ASSIGN(Tile); |
| 175 }; | 175 }; |
| 176 | 176 |
| 177 } // namespace cc | 177 } // namespace cc |
| 178 | 178 |
| 179 #endif // CC_RESOURCES_TILE_H_ | 179 #endif // CC_RESOURCES_TILE_H_ |
| OLD | NEW |