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

Unified Diff: cc/layers/layer_impl.cc

Issue 2441853002: Plumb preferred raster bounds rather than scale (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 832fe51eda6dab83c3f20114901d3869e807ea5f..aad1b1cdfa02022ff06e0c55bbc5175a30e149d1 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -79,8 +79,7 @@ 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),
+ has_preferred_raster_bounds_(false),
scrolls_drawn_descendant_(false),
has_will_change_transform_hint_(false),
needs_push_properties_(false) {
@@ -109,14 +108,15 @@ 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::SetPreferredRasterBounds(
+ const gfx::Size& preferred_raster_bounds) {
+ has_preferred_raster_bounds_ = true;
+ preferred_raster_bounds_ = preferred_raster_bounds;
}
-void LayerImpl::ClearPreferredRasterScale() {
- has_preferred_raster_scale_ = false;
- preferred_raster_scale_ = 1.0f;
+void LayerImpl::ClearPreferredRasterBounds() {
+ has_preferred_raster_bounds_ = false;
+ preferred_raster_bounds_ = gfx::Size();
}
AnimationHost* LayerImpl::GetAnimationHost() const {
« no previous file with comments | « cc/layers/layer_impl.h ('k') | third_party/WebKit/LayoutTests/compositing/scaling/preferred-raster-bounds.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698