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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 1946403003: Add fixed raster scale use counter histograms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+fix Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/proto/begin_main_frame_and_commit_state.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index b2b8def1ad4ca91430fab762063e48576df5c398..0cf42f07a13c9a9a842b2b8699e8804a2c172be9 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -69,6 +69,7 @@ PictureLayerImpl::PictureLayerImpl(LayerTreeImpl* tree_impl,
ideal_device_scale_(0.f),
ideal_source_scale_(0.f),
ideal_contents_scale_(0.f),
+ last_ideal_source_scale_(0.f),
raster_page_scale_(0.f),
raster_device_scale_(0.f),
raster_source_scale_(0.f),
@@ -433,6 +434,17 @@ bool PictureLayerImpl::UpdateTiles() {
AddTilingsForRasterScale();
}
+ // Inform layer tree impl if we will have blurry content because of fixed
+ // raster scale (note that this check should happen after we
+ // ReclaculateRasterScales, since that's the function that will determine
+ // whether our raster scale is fixed.
+ if (raster_source_scale_is_fixed_ && !has_will_change_transform_hint()) {
+ if (raster_source_scale_ != ideal_source_scale_)
+ layer_tree_impl()->SetFixedRasterScaleHasBlurryContent();
+ if (ideal_source_scale_ != last_ideal_source_scale_)
+ layer_tree_impl()->SetFixedRasterScaleAttemptedToChangeScale();
+ }
+
if (layer_tree_impl()->IsActiveTree())
AddLowResolutionTilingIfNeeded();
@@ -1206,6 +1218,7 @@ void PictureLayerImpl::UpdateIdealScales() {
: 1.f;
ideal_device_scale_ = layer_tree_impl()->device_scale_factor();
ideal_contents_scale_ = std::max(GetIdealContentsScale(), min_contents_scale);
+ last_ideal_source_scale_ = ideal_source_scale_;
ideal_source_scale_ =
ideal_contents_scale_ / ideal_page_scale_ / ideal_device_scale_;
}
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/proto/begin_main_frame_and_commit_state.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698