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

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

Issue 2417783005: [Master/Overview CL] Make PageScaleFactor work for oopif subframe.
Patch Set: Created 4 years, 2 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/layers/layer_impl.cc ('k') | content/browser/renderer_host/render_widget_host_delegate.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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 settings.skewport_extrapolation_limit_in_screen_pixels, 1242 settings.skewport_extrapolation_limit_in_screen_pixels,
1243 settings.max_preraster_distance_in_screen_pixels); 1243 settings.max_preraster_distance_in_screen_pixels);
1244 } 1244 }
1245 1245
1246 void PictureLayerImpl::UpdateIdealScales() { 1246 void PictureLayerImpl::UpdateIdealScales() {
1247 DCHECK(CanHaveTilings()); 1247 DCHECK(CanHaveTilings());
1248 1248
1249 float min_contents_scale = MinimumContentsScale(); 1249 float min_contents_scale = MinimumContentsScale();
1250 DCHECK_GT(min_contents_scale, 0.f); 1250 DCHECK_GT(min_contents_scale, 0.f);
1251 1251
1252 ideal_page_scale_ = IsAffectedByPageScale() 1252 ideal_page_scale_ =
1253 ? layer_tree_impl()->current_page_scale_factor() 1253 (!layer_tree_impl()->PageScaleLayer() || IsAffectedByPageScale())
Ian Vollick 2016/10/14 19:40:30 So we take the current page scale factor if we don
1254 : 1.f; 1254 ? layer_tree_impl()->current_page_scale_factor()
1255 : 1.f;
1255 ideal_device_scale_ = layer_tree_impl()->device_scale_factor(); 1256 ideal_device_scale_ = layer_tree_impl()->device_scale_factor();
1256 ideal_contents_scale_ = 1257 ideal_contents_scale_ =
1257 std::min(kMaxIdealContentsScale, 1258 std::min(kMaxIdealContentsScale,
1258 std::max(GetIdealContentsScale(), min_contents_scale)); 1259 std::max(GetIdealContentsScale(), min_contents_scale));
1259 ideal_source_scale_ = 1260 ideal_source_scale_ =
1260 ideal_contents_scale_ / ideal_page_scale_ / ideal_device_scale_; 1261 ideal_contents_scale_ / ideal_page_scale_ / ideal_device_scale_;
1261 UMA_HISTOGRAM_CUSTOM_COUNTS("Renderer4.IdealContentsScale", 1262 UMA_HISTOGRAM_CUSTOM_COUNTS("Renderer4.IdealContentsScale",
1262 ideal_contents_scale_, 1, 10000, 50); 1263 ideal_contents_scale_, 1, 10000, 50);
1263 } 1264 }
1264 1265
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { 1336 bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
1336 return !layer_tree_impl()->IsRecycleTree(); 1337 return !layer_tree_impl()->IsRecycleTree();
1337 } 1338 }
1338 1339
1339 bool PictureLayerImpl::HasValidTilePriorities() const { 1340 bool PictureLayerImpl::HasValidTilePriorities() const {
1340 return IsOnActiveOrPendingTree() && 1341 return IsOnActiveOrPendingTree() &&
1341 is_drawn_render_surface_layer_list_member(); 1342 is_drawn_render_surface_layer_list_member();
1342 } 1343 }
1343 1344
1344 } // namespace cc 1345 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | content/browser/renderer_host/render_widget_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698