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

Unified Diff: cc/layers/layer_unittest.cc

Issue 647253002: cc: Stop converting update rect from int to float to int. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: displayrectint: ccperftests 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_perftest.cc ('k') | cc/layers/picture_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_unittest.cc
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc
index a6ff2e0a8e7066d65cbf73062cbac5c6517d435f..4c93d42092a945c921b590f5208cc6ae50ac30e2 100644
--- a/cc/layers/layer_unittest.cc
+++ b/cc/layers/layer_unittest.cc
@@ -536,10 +536,9 @@ TEST_F(LayerTest, CheckSetNeedsDisplayCausesCorrectBehavior) {
gfx::Size test_bounds = gfx::Size(501, 508);
- gfx::RectF dirty1 = gfx::RectF(10.f, 15.f, 1.f, 2.f);
- gfx::RectF dirty2 = gfx::RectF(20.f, 25.f, 3.f, 4.f);
- gfx::RectF empty_dirty_rect = gfx::RectF(40.f, 45.f, 0.f, 0.f);
- gfx::RectF out_of_bounds_dirty_rect = gfx::RectF(400.f, 405.f, 500.f, 502.f);
+ gfx::Rect dirty1 = gfx::Rect(10, 15, 1, 2);
+ gfx::Rect dirty2 = gfx::Rect(20, 25, 3, 4);
+ gfx::Rect out_of_bounds_dirty_rect = gfx::Rect(400, 405, 500, 502);
// Before anything, test_layer should not be dirty.
EXPECT_FALSE(test_layer->NeedsDisplayForTesting());
@@ -649,14 +648,14 @@ TEST_F(LayerTest, PushPropertiesAccumulatesUpdateRect) {
EXPECT_SET_NEEDS_FULL_TREE_SYNC(1,
layer_tree_host_->SetRootLayer(test_layer));
- test_layer->SetNeedsDisplayRect(gfx::RectF(0.f, 0.f, 5.f, 5.f));
+ test_layer->SetNeedsDisplayRect(gfx::Rect(5, 5));
test_layer->PushPropertiesTo(impl_layer.get());
EXPECT_FLOAT_RECT_EQ(gfx::RectF(0.f, 0.f, 5.f, 5.f),
impl_layer->update_rect());
// The LayerImpl's update_rect() should be accumulated here, since we did not
// do anything to clear it.
- test_layer->SetNeedsDisplayRect(gfx::RectF(10.f, 10.f, 5.f, 5.f));
+ test_layer->SetNeedsDisplayRect(gfx::Rect(10, 10, 5, 5));
test_layer->PushPropertiesTo(impl_layer.get());
EXPECT_FLOAT_RECT_EQ(gfx::RectF(0.f, 0.f, 15.f, 15.f),
impl_layer->update_rect());
@@ -664,7 +663,7 @@ TEST_F(LayerTest, PushPropertiesAccumulatesUpdateRect) {
// If we do clear the LayerImpl side, then the next update_rect() should be
// fresh without accumulation.
impl_layer->ResetAllChangeTrackingForSubtree();
- test_layer->SetNeedsDisplayRect(gfx::RectF(10.f, 10.f, 5.f, 5.f));
+ test_layer->SetNeedsDisplayRect(gfx::Rect(10, 10, 5, 5));
test_layer->PushPropertiesTo(impl_layer.get());
EXPECT_FLOAT_RECT_EQ(gfx::RectF(10.f, 10.f, 5.f, 5.f),
impl_layer->update_rect());
« no previous file with comments | « cc/layers/layer_perftest.cc ('k') | cc/layers/picture_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698