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

Unified Diff: cc/layers/layer_impl.cc

Issue 637913003: Revert of "Converted LayerImpl::bounds() to return SizeF." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 302bda43088490d68f4f303404197e44d5cc0995..6dfec0e7d71c2069e3666f34d1371dbd275128fc 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -622,7 +622,7 @@ gfx::Vector2dF LayerImpl::FixedContainerSizeDelta() const {
// (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 @@ base::DictionaryValue* LayerImpl::LayerTreeAsJson() const {
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 @@ bool LayerImpl::IsActive() const {
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()));
}
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698