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

Unified Diff: cc/layers/layer_impl.cc

Issue 2410513002: Plumb preferred raster scale for background images from Blink to cc layers. (Closed)
Patch Set: none 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 side-by-side diff with in-line comments
Download patch
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 00df26a9fa93e849d44d5dbdbb9ddcdc9655a590..832fe51eda6dab83c3f20114901d3869e807ea5f 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -79,6 +79,8 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id)
current_draw_mode_(DRAW_MODE_NONE),
mutable_properties_(MutableProperty::kNone),
debug_info_(nullptr),
+ preferred_raster_scale_(1.0f),
+ has_preferred_raster_scale_(false),
scrolls_drawn_descendant_(false),
has_will_change_transform_hint_(false),
needs_push_properties_(false) {
@@ -107,6 +109,16 @@ void LayerImpl::SetHasWillChangeTransformHint(bool has_will_change) {
has_will_change_transform_hint_ = has_will_change;
}
+void LayerImpl::SetPreferredRasterScale(float preferred_raster_scale) {
+ has_preferred_raster_scale_ = true;
+ preferred_raster_scale_ = preferred_raster_scale;
+}
+
+void LayerImpl::ClearPreferredRasterScale() {
+ has_preferred_raster_scale_ = false;
+ preferred_raster_scale_ = 1.0f;
+}
+
AnimationHost* LayerImpl::GetAnimationHost() const {
return layer_tree_impl_ ? layer_tree_impl_->animation_host() : nullptr;
}
« no previous file with comments | « cc/layers/layer_impl.h ('k') | third_party/WebKit/LayoutTests/compositing/scaling/preferred-raster-scale.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698