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

Unified Diff: cc/trees/layer_tree_host_unittest_scroll.cc

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-gfx: . Created 5 years, 3 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/trees/layer_tree_host_unittest_scroll.cc
diff --git a/cc/trees/layer_tree_host_unittest_scroll.cc b/cc/trees/layer_tree_host_unittest_scroll.cc
index 79fde4f24a68e7c5129c77da9048d55555d49e2c..ddd3117f5bc48460d4b5a7e36d1261e7b48284a9 100644
--- a/cc/trees/layer_tree_host_unittest_scroll.cc
+++ b/cc/trees/layer_tree_host_unittest_scroll.cc
@@ -462,7 +462,7 @@ class LayerTreeHostScrollTestCaseWithChild : public LayerTreeHostScrollTest {
root_scroll_layer_ =
FakePictureLayer::Create(layer_settings(), &fake_content_layer_client_);
root_scroll_layer_->SetBounds(gfx::Size(110, 110));
- root_scroll_layer_->SetPosition(gfx::Point());
+ root_scroll_layer_->SetPosition(gfx::PointF());
root_scroll_layer_->SetIsDrawable(true);
CreateVirtualViewportLayers(root_layer.get(),
@@ -484,10 +484,10 @@ class LayerTreeHostScrollTestCaseWithChild : public LayerTreeHostScrollTest {
// Scrolls on the child layer will happen at 5, 5. If they are treated
// like device pixels, and device scale factor is 2, then they will
// be considered at 2.5, 2.5 in logical pixels, and will miss this layer.
- child_layer_->SetPosition(gfx::Point(5, 5));
+ child_layer_->SetPosition(gfx::PointF(5.f, 5.f));
} else {
// Adjust the child layer horizontally so that scrolls will never hit it.
- child_layer_->SetPosition(gfx::Point(60, 5));
+ child_layer_->SetPosition(gfx::PointF(60.f, 5.f));
}
scoped_refptr<Layer> outer_container_layer =
@@ -1195,7 +1195,7 @@ class LayerTreeHostScrollTestLayerStructureChange
scoped_refptr<PictureLayer> scroll_layer =
PictureLayer::Create(layer_settings(), &fake_content_layer_client_);
scroll_layer->SetBounds(gfx::Size(110, 110));
- scroll_layer->SetPosition(gfx::Point(0, 0));
+ scroll_layer->SetPosition(gfx::PointF());
scroll_layer->SetIsDrawable(true);
scroll_layer->SetScrollClipLayerId(parent->id());
scroll_layer->SetBounds(gfx::Size(parent->bounds().width() + 100,

Powered by Google App Engine
This is Rietveld 408576698