Revert of "Converted LayerImpl::bounds() to return SizeF."
Seems this was more contentious than originally anticipated. Reverting
this until we have consensus on how to go forward.
[email protected],[email protected],[email protected]
BUG=
Review URL: https://codereview.chromium.org/637913003
Cr-Commit-Position: refs/heads/master@{#298710}
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 302bda4..6dfec0e7 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -622,7 +622,7 @@
// (w/s',h/s') - (w/s,h/s) = (w,h)(1/s' - 1/s) = (w,h)(1 - ds)/(s ds)
//
gfx::Vector2dF delta_from_pinch =
- gfx::RectF(scroll_clip_layer_->bounds()).bottom_right() - gfx::PointF();
+ gfx::Rect(scroll_clip_layer_->bounds()).bottom_right() - gfx::PointF();
delta_from_pinch.Scale((1.f - scale_delta) / (scale * scale_delta));
return delta_from_scroll + delta_from_pinch;
@@ -633,8 +633,8 @@
result->SetString("LayerType", LayerTypeAsString());
base::ListValue* list = new base::ListValue;
- list->AppendDouble(bounds().width());
- list->AppendDouble(bounds().height());
+ list->AppendInteger(bounds().width());
+ list->AppendInteger(bounds().height());
result->Set("Bounds", list);
list = new base::ListValue;
@@ -771,7 +771,8 @@
return layer_tree_impl_->IsActiveTree();
}
-gfx::SizeF LayerImpl::bounds() const {
+// TODO(aelias): Convert so that bounds returns SizeF.
+gfx::Size LayerImpl::bounds() const {
return gfx::ToCeiledSize(gfx::SizeF(bounds_.width() + bounds_delta_.x(),
bounds_.height() + bounds_delta_.y()));
}