diff options
author | danakj <danakj@chromium.org> | 2014-10-10 20:24:42 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-11 03:24:59 +0000 |
commit | 19f0c9e018cc431eb60fa49615192dd091622fef (patch) | |
tree | 486462476d75939d5ca7b2e6d44c1e5badd21711 /cc/trees/layer_tree_host_unittest_damage.cc | |
parent | e22bac1a138a221ce4ba4d121f69827cc65b9a87 (diff) | |
download | chromium_src-19f0c9e018cc431eb60fa49615192dd091622fef.zip chromium_src-19f0c9e018cc431eb60fa49615192dd091622fef.tar.gz chromium_src-19f0c9e018cc431eb60fa49615192dd091622fef.tar.bz2 |
cc: Stop converting update rect from int to float to int.
Layer::SetNeedsDisplay() would turn the int bounds() into a float RectF
just for PictureLayer to turn it back into an int Rect. This is silly.
If PictureLayer is just going to use ints, we might as well use ints
throughout. So convert update_rect_ from a RectF to a Rect.
R=enne
BUG=342848
Review URL: https://codereview.chromium.org/647253002
Cr-Commit-Position: refs/heads/master@{#299233}
Diffstat (limited to 'cc/trees/layer_tree_host_unittest_damage.cc')
-rw-r--r-- | cc/trees/layer_tree_host_unittest_damage.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cc/trees/layer_tree_host_unittest_damage.cc b/cc/trees/layer_tree_host_unittest_damage.cc index f8e44d5..d231553 100644 --- a/cc/trees/layer_tree_host_unittest_damage.cc +++ b/cc/trees/layer_tree_host_unittest_damage.cc @@ -293,7 +293,7 @@ class LayerTreeHostDamageTestForcedFullDamage : public LayerTreeHostDamageTest { EXPECT_FALSE(frame_data->has_no_damage); // Just a part of the next frame should be damaged. - child_damage_rect_ = gfx::RectF(10, 11, 12, 13); + child_damage_rect_ = gfx::Rect(10, 11, 12, 13); break; case 3: // The update rect in the child should be damaged and the damaged area @@ -319,7 +319,7 @@ class LayerTreeHostDamageTestForcedFullDamage : public LayerTreeHostDamageTest { // If we damage part of the frame, but also damage the full // frame, then the whole frame should be damaged. - child_damage_rect_ = gfx::RectF(10, 11, 12, 13); + child_damage_rect_ = gfx::Rect(10, 11, 12, 13); host_impl->SetFullRootLayerDamage(); break; case 4: @@ -340,7 +340,7 @@ class LayerTreeHostDamageTestForcedFullDamage : public LayerTreeHostDamageTest { if (!child_damage_rect_.IsEmpty()) { child_->SetNeedsDisplayRect(child_damage_rect_); - child_damage_rect_ = gfx::RectF(); + child_damage_rect_ = gfx::Rect(); } } @@ -349,7 +349,7 @@ class LayerTreeHostDamageTestForcedFullDamage : public LayerTreeHostDamageTest { FakeContentLayerClient client_; scoped_refptr<FakeContentLayer> root_; scoped_refptr<FakeContentLayer> child_; - gfx::RectF child_damage_rect_; + gfx::Rect child_damage_rect_; }; SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(LayerTreeHostDamageTestForcedFullDamage); |