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

Side by Side Diff: cc/tiles/picture_layer_tiling_set.cc

Issue 2022613002: cc: Restore the space of interest area padding to be ideal contents space. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | cc/trees/layer_tree_settings.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/tiles/picture_layer_tiling_set.h" 5 #include "cc/tiles/picture_layer_tiling_set.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <set> 10 #include <set>
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 void PictureLayerTilingSet::UpdatePriorityRects( 467 void PictureLayerTilingSet::UpdatePriorityRects(
468 const gfx::Rect& visible_rect_in_layer_space, 468 const gfx::Rect& visible_rect_in_layer_space,
469 double current_frame_time_in_seconds, 469 double current_frame_time_in_seconds,
470 float ideal_contents_scale) { 470 float ideal_contents_scale) {
471 visible_rect_in_layer_space_ = gfx::Rect(); 471 visible_rect_in_layer_space_ = gfx::Rect();
472 eventually_rect_in_layer_space_ = gfx::Rect(); 472 eventually_rect_in_layer_space_ = gfx::Rect();
473 473
474 // We keep things as floats in here. 474 // We keep things as floats in here.
475 if (!visible_rect_in_layer_space.IsEmpty()) { 475 if (!visible_rect_in_layer_space.IsEmpty()) {
476 gfx::RectF eventually_rectf(visible_rect_in_layer_space); 476 gfx::RectF eventually_rectf(visible_rect_in_layer_space);
477 eventually_rectf.Inset(-tiling_interest_area_padding_, 477 eventually_rectf.Inset(
478 -tiling_interest_area_padding_); 478 -tiling_interest_area_padding_ / ideal_contents_scale,
479 -tiling_interest_area_padding_ / ideal_contents_scale);
479 if (eventually_rectf.Intersects( 480 if (eventually_rectf.Intersects(
480 gfx::RectF(gfx::SizeF(raster_source_->GetSize())))) { 481 gfx::RectF(gfx::SizeF(raster_source_->GetSize())))) {
481 visible_rect_in_layer_space_ = visible_rect_in_layer_space; 482 visible_rect_in_layer_space_ = visible_rect_in_layer_space;
482 eventually_rect_in_layer_space_ = gfx::ToEnclosingRect(eventually_rectf); 483 eventually_rect_in_layer_space_ = gfx::ToEnclosingRect(eventually_rectf);
483 } 484 }
484 } 485 }
485 486
486 skewport_in_layer_space_ = 487 skewport_in_layer_space_ =
487 ComputeSkewport(visible_rect_in_layer_space_, 488 ComputeSkewport(visible_rect_in_layer_space_,
488 current_frame_time_in_seconds, ideal_contents_scale); 489 current_frame_time_in_seconds, ideal_contents_scale);
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 case LOWER_THAN_LOW_RES: 748 case LOWER_THAN_LOW_RES:
748 range = TilingRange(low_res_range.end, tilings_size); 749 range = TilingRange(low_res_range.end, tilings_size);
749 break; 750 break;
750 } 751 }
751 752
752 DCHECK_LE(range.start, range.end); 753 DCHECK_LE(range.start, range.end);
753 return range; 754 return range;
754 } 755 }
755 756
756 } // namespace cc 757 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698