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

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

Issue 1126793002: cc: Make tiling interest rect calc based on viewport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/resources/picture_layer_tiling.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/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 #include <set> 10 #include <set>
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 1149
1150 float PictureLayerImpl::MaximumTilingContentsScale() const { 1150 float PictureLayerImpl::MaximumTilingContentsScale() const {
1151 float max_contents_scale = tilings_->GetMaximumContentsScale(); 1151 float max_contents_scale = tilings_->GetMaximumContentsScale();
1152 return std::max(max_contents_scale, MinimumContentsScale()); 1152 return std::max(max_contents_scale, MinimumContentsScale());
1153 } 1153 }
1154 1154
1155 scoped_ptr<PictureLayerTilingSet> 1155 scoped_ptr<PictureLayerTilingSet>
1156 PictureLayerImpl::CreatePictureLayerTilingSet() { 1156 PictureLayerImpl::CreatePictureLayerTilingSet() {
1157 const LayerTreeSettings& settings = layer_tree_impl()->settings(); 1157 const LayerTreeSettings& settings = layer_tree_impl()->settings();
1158 return PictureLayerTilingSet::Create( 1158 return PictureLayerTilingSet::Create(
1159 this, settings.max_tiles_for_interest_area, 1159 this, 4 * layer_tree_impl()->device_viewport_size().GetArea(),
sohanjg 2015/05/05 12:59:20 instead of sending viewport area/tile area and the
vmpstr 2015/05/05 20:48:11 Having a viewport distance in all directions would
sohanjg 2015/05/06 15:01:59 Yeah right (* 9) , i somehow forgot its an area. M
1160 layer_tree_impl()->use_gpu_rasterization() 1160 layer_tree_impl()->use_gpu_rasterization()
1161 ? settings.gpu_rasterization_skewport_target_time_in_seconds 1161 ? settings.gpu_rasterization_skewport_target_time_in_seconds
1162 : settings.skewport_target_time_in_seconds, 1162 : settings.skewport_target_time_in_seconds,
1163 settings.skewport_extrapolation_limit_in_content_pixels); 1163 settings.skewport_extrapolation_limit_in_content_pixels);
1164 } 1164 }
1165 1165
1166 void PictureLayerImpl::UpdateIdealScales() { 1166 void PictureLayerImpl::UpdateIdealScales() {
1167 DCHECK(CanHaveTilings()); 1167 DCHECK(CanHaveTilings());
1168 1168
1169 float min_contents_scale = MinimumContentsScale(); 1169 float min_contents_scale = MinimumContentsScale();
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 1252
1253 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1253 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1254 return !layer_tree_impl()->IsRecycleTree(); 1254 return !layer_tree_impl()->IsRecycleTree();
1255 } 1255 }
1256 1256
1257 bool PictureLayerImpl::HasValidTilePriorities() const { 1257 bool PictureLayerImpl::HasValidTilePriorities() const {
1258 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); 1258 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
1259 } 1259 }
1260 1260
1261 } // namespace cc 1261 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698