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 #include "cc/resources/tile.h" | 5 #include "cc/resources/tile.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/debug/trace_event_argument.h" | 9 #include "base/debug/trace_event_argument.h" |
10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 TileResolution resolution) const { | 111 TileResolution resolution) const { |
112 RasterMode current_mode = managed_state_.raster_mode; | 112 RasterMode current_mode = managed_state_.raster_mode; |
113 RasterMode raster_mode = resolution == LOW_RESOLUTION | 113 RasterMode raster_mode = resolution == LOW_RESOLUTION |
114 ? LOW_QUALITY_RASTER_MODE | 114 ? LOW_QUALITY_RASTER_MODE |
115 : HIGH_QUALITY_RASTER_MODE; | 115 : HIGH_QUALITY_RASTER_MODE; |
116 return std::min(raster_mode, current_mode); | 116 return std::min(raster_mode, current_mode); |
117 } | 117 } |
118 | 118 |
119 bool Tile::HasRasterTask() const { | 119 bool Tile::HasRasterTask() const { |
120 for (int mode = 0; mode < NUM_RASTER_MODES; ++mode) { | 120 for (int mode = 0; mode < NUM_RASTER_MODES; ++mode) { |
121 if (managed_state_.tile_versions[mode].raster_task_) | 121 if (managed_state_.tile_versions[mode].raster_task_.get()) |
122 return true; | 122 return true; |
123 } | 123 } |
124 return false; | 124 return false; |
125 } | 125 } |
126 | 126 |
127 } // namespace cc | 127 } // namespace cc |
OLD | NEW |