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

Side by Side Diff: cc/trees/layer_tree_host_unittest_damage.cc

Issue 1357423009: gfx: Make conversions from Size to SizeF be explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sizefconvert-gfx: . Created 5 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 unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 351
352 scoped_refptr<Layer> scrollbar_layer = FakePaintedScrollbarLayer::Create( 352 scoped_refptr<Layer> scrollbar_layer = FakePaintedScrollbarLayer::Create(
353 layer_settings(), false, true, content_layer->id()); 353 layer_settings(), false, true, content_layer->id());
354 scrollbar_layer->SetPosition(gfx::Point(300, 300)); 354 scrollbar_layer->SetPosition(gfx::Point(300, 300));
355 scrollbar_layer->SetBounds(gfx::Size(10, 100)); 355 scrollbar_layer->SetBounds(gfx::Size(10, 100));
356 scrollbar_layer->ToScrollbarLayer()->SetClipLayer(scroll_clip_layer->id()); 356 scrollbar_layer->ToScrollbarLayer()->SetClipLayer(scroll_clip_layer->id());
357 scrollbar_layer->ToScrollbarLayer()->SetScrollLayer(content_layer->id()); 357 scrollbar_layer->ToScrollbarLayer()->SetScrollLayer(content_layer->id());
358 root_layer->AddChild(scrollbar_layer); 358 root_layer->AddChild(scrollbar_layer);
359 359
360 gfx::RectF content_rect(content_layer->position(), 360 gfx::RectF content_rect(content_layer->position(),
361 content_layer->bounds()); 361 gfx::SizeF(content_layer->bounds()));
362 gfx::RectF scrollbar_rect(scrollbar_layer->position(), 362 gfx::RectF scrollbar_rect(scrollbar_layer->position(),
363 scrollbar_layer->bounds()); 363 gfx::SizeF(scrollbar_layer->bounds()));
364 EXPECT_FALSE(content_rect.Intersects(scrollbar_rect)); 364 EXPECT_FALSE(content_rect.Intersects(scrollbar_rect));
365 365
366 LayerTreeHostDamageTest::SetupTree(); 366 LayerTreeHostDamageTest::SetupTree();
367 } 367 }
368 368
369 private: 369 private:
370 FakeContentLayerClient client_; 370 FakeContentLayerClient client_;
371 }; 371 };
372 372
373 class LayerTreeHostDamageTestScrollbarDoesDamage 373 class LayerTreeHostDamageTestScrollbarDoesDamage
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 529
530 void AfterTest() override { EXPECT_EQ(3, did_swaps_); } 530 void AfterTest() override { EXPECT_EQ(3, did_swaps_); }
531 531
532 int did_swaps_; 532 int did_swaps_;
533 }; 533 };
534 534
535 MULTI_THREAD_TEST_F(LayerTreeHostDamageTestScrollbarCommitDoesNoDamage); 535 MULTI_THREAD_TEST_F(LayerTreeHostDamageTestScrollbarCommitDoesNoDamage);
536 536
537 } // namespace 537 } // namespace
538 } // namespace cc 538 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698