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

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

Issue 2824693002: Refactor LayerTreeImpl's scrollbar map to be keyed on element ids (Closed)
Patch Set: rebase Created 3 years, 8 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.h » ('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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 333
334 class LayerTreeHostScrollbarDamageTest : public LayerTreeHostDamageTest { 334 class LayerTreeHostScrollbarDamageTest : public LayerTreeHostDamageTest {
335 void SetupTree() override { 335 void SetupTree() override {
336 scoped_refptr<Layer> root_layer = Layer::Create(); 336 scoped_refptr<Layer> root_layer = Layer::Create();
337 root_layer->SetBounds(gfx::Size(400, 400)); 337 root_layer->SetBounds(gfx::Size(400, 400));
338 root_layer->SetMasksToBounds(true); 338 root_layer->SetMasksToBounds(true);
339 layer_tree_host()->SetRootLayer(root_layer); 339 layer_tree_host()->SetRootLayer(root_layer);
340 340
341 scoped_refptr<Layer> scroll_clip_layer = Layer::Create(); 341 scoped_refptr<Layer> scroll_clip_layer = Layer::Create();
342 content_layer_ = FakePictureLayer::Create(&client_); 342 content_layer_ = FakePictureLayer::Create(&client_);
343 content_layer_->SetElementId(
344 LayerIdToElementIdForTesting(content_layer_->id()));
343 content_layer_->SetScrollClipLayerId(scroll_clip_layer->id()); 345 content_layer_->SetScrollClipLayerId(scroll_clip_layer->id());
344 content_layer_->SetScrollOffset(gfx::ScrollOffset(10, 20)); 346 content_layer_->SetScrollOffset(gfx::ScrollOffset(10, 20));
345 content_layer_->SetBounds(gfx::Size(100, 200)); 347 content_layer_->SetBounds(gfx::Size(100, 200));
346 content_layer_->SetIsDrawable(true); 348 content_layer_->SetIsDrawable(true);
347 scroll_clip_layer->SetBounds( 349 scroll_clip_layer->SetBounds(
348 gfx::Size(content_layer_->bounds().width() - 30, 350 gfx::Size(content_layer_->bounds().width() - 30,
349 content_layer_->bounds().height() - 50)); 351 content_layer_->bounds().height() - 50));
350 scroll_clip_layer->AddChild(content_layer_); 352 scroll_clip_layer->AddChild(content_layer_);
351 root_layer->AddChild(scroll_clip_layer); 353 root_layer->AddChild(scroll_clip_layer);
352 354
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 528
527 void AfterTest() override { EXPECT_EQ(3, num_draws_); } 529 void AfterTest() override { EXPECT_EQ(3, num_draws_); }
528 530
529 int num_draws_; 531 int num_draws_;
530 }; 532 };
531 533
532 MULTI_THREAD_TEST_F(LayerTreeHostDamageTestScrollbarCommitDoesNoDamage); 534 MULTI_THREAD_TEST_F(LayerTreeHostDamageTestScrollbarCommitDoesNoDamage);
533 535
534 } // namespace 536 } // namespace
535 } // namespace cc 537 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698