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

Side by Side Diff: cc/layers/picture_layer_impl.cc

Issue 505723002: Revert of cc: Don't consider tiles at the layers raster_contents_scale incomplete (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl_unittest.cc » ('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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/debug/trace_event_argument.h" 10 #include "base/debug/trace_event_argument.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 bool has_draw_quad = false; 291 bool has_draw_quad = false;
292 if (*iter && iter->IsReadyToDraw()) { 292 if (*iter && iter->IsReadyToDraw()) {
293 const ManagedTileState::TileVersion& tile_version = 293 const ManagedTileState::TileVersion& tile_version =
294 iter->GetTileVersionForDrawing(); 294 iter->GetTileVersionForDrawing();
295 switch (tile_version.mode()) { 295 switch (tile_version.mode()) {
296 case ManagedTileState::TileVersion::RESOURCE_MODE: { 296 case ManagedTileState::TileVersion::RESOURCE_MODE: {
297 gfx::RectF texture_rect = iter.texture_rect(); 297 gfx::RectF texture_rect = iter.texture_rect();
298 gfx::Rect opaque_rect = iter->opaque_rect(); 298 gfx::Rect opaque_rect = iter->opaque_rect();
299 opaque_rect.Intersect(geometry_rect); 299 opaque_rect.Intersect(geometry_rect);
300 300
301 // The raster_contents_scale_ is the best scale that the layer is 301 if (iter->contents_scale() != ideal_contents_scale_ &&
302 // trying to produce, even though it may not be ideal. Since that's
303 // the best the layer can promise in the future, consider those as
304 // complete. But if a tile is ideal scale, we don't want to consider
305 // it incomplete and trying to replace it with a tile at a worse
306 // scale.
307 if (iter->contents_scale() != raster_contents_scale_ &&
308 iter->contents_scale() != ideal_contents_scale_ &&
309 geometry_rect.Intersects(scaled_viewport_for_tile_priority)) { 302 geometry_rect.Intersects(scaled_viewport_for_tile_priority)) {
310 append_quads_data->num_incomplete_tiles++; 303 append_quads_data->num_incomplete_tiles++;
311 } 304 }
312 305
313 TileDrawQuad* quad = 306 TileDrawQuad* quad =
314 render_pass->CreateAndAppendDrawQuad<TileDrawQuad>(); 307 render_pass->CreateAndAppendDrawQuad<TileDrawQuad>();
315 quad->SetNew(shared_quad_state, 308 quad->SetNew(shared_quad_state,
316 geometry_rect, 309 geometry_rect,
317 opaque_rect, 310 opaque_rect,
318 visible_geometry_rect, 311 visible_geometry_rect,
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1755 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); 1748 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange();
1756 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; 1749 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start;
1757 return tiling_range.end - 1 - current_tiling_range_offset; 1750 return tiling_range.end - 1 - current_tiling_range_offset;
1758 } 1751 }
1759 } 1752 }
1760 NOTREACHED(); 1753 NOTREACHED();
1761 return 0; 1754 return 0;
1762 } 1755 }
1763 1756
1764 } // namespace cc 1757 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698