Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: cc/resources/tile.cc

Issue 366113002: cc: Do not cleanup tiles with raster tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits updated. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/resources/tile.h ('k') | cc/resources/tile_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/debug/traced_value.h" 10 #include "cc/debug/traced_value.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 RasterMode Tile::DetermineRasterModeForResolution( 95 RasterMode Tile::DetermineRasterModeForResolution(
96 TileResolution resolution) const { 96 TileResolution resolution) const {
97 RasterMode current_mode = managed_state_.raster_mode; 97 RasterMode current_mode = managed_state_.raster_mode;
98 RasterMode raster_mode = resolution == LOW_RESOLUTION 98 RasterMode raster_mode = resolution == LOW_RESOLUTION
99 ? LOW_QUALITY_RASTER_MODE 99 ? LOW_QUALITY_RASTER_MODE
100 : HIGH_QUALITY_RASTER_MODE; 100 : HIGH_QUALITY_RASTER_MODE;
101 return std::min(raster_mode, current_mode); 101 return std::min(raster_mode, current_mode);
102 } 102 }
103 103
104 bool Tile::HasRasterTask() const {
105 for (int mode = 0; mode < NUM_RASTER_MODES; ++mode) {
106 if (managed_state_.tile_versions[mode].raster_task_)
107 return true;
108 }
109 return false;
110 }
111
104 } // namespace cc 112 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/tile.h ('k') | cc/resources/tile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698