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

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

Issue 2860293002: Change cc::ElementId to be a uint64_t (Closed)
Patch Set: none Created 3 years, 7 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
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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 class LayerTreeHostScrollbarDamageTest : public LayerTreeHostDamageTest { 335 class LayerTreeHostScrollbarDamageTest : public LayerTreeHostDamageTest {
336 void SetupTree() override { 336 void SetupTree() override {
337 scoped_refptr<Layer> root_layer = Layer::Create(); 337 scoped_refptr<Layer> root_layer = Layer::Create();
338 root_layer->SetBounds(gfx::Size(400, 400)); 338 root_layer->SetBounds(gfx::Size(400, 400));
339 root_layer->SetMasksToBounds(true); 339 root_layer->SetMasksToBounds(true);
340 layer_tree_host()->SetRootLayer(root_layer); 340 layer_tree_host()->SetRootLayer(root_layer);
341 341
342 scoped_refptr<Layer> scroll_clip_layer = Layer::Create(); 342 scoped_refptr<Layer> scroll_clip_layer = Layer::Create();
343 content_layer_ = FakePictureLayer::Create(&client_); 343 content_layer_ = FakePictureLayer::Create(&client_);
344 content_layer_->SetElementId( 344 content_layer_->SetElementId(ElementId(content_layer_->id()));
suzyh_UTC10 (ex-contributor) 2017/05/05 04:27:30 Another possibly unnecessary ElementId call?
chrishtr 2017/05/05 05:34:52 Fixed.
345 LayerIdToElementIdForTesting(content_layer_->id()));
346 content_layer_->SetScrollClipLayerId(scroll_clip_layer->id()); 345 content_layer_->SetScrollClipLayerId(scroll_clip_layer->id());
347 content_layer_->SetScrollOffset(gfx::ScrollOffset(10, 20)); 346 content_layer_->SetScrollOffset(gfx::ScrollOffset(10, 20));
348 content_layer_->SetBounds(gfx::Size(100, 200)); 347 content_layer_->SetBounds(gfx::Size(100, 200));
349 content_layer_->SetIsDrawable(true); 348 content_layer_->SetIsDrawable(true);
350 scroll_clip_layer->SetBounds( 349 scroll_clip_layer->SetBounds(
351 gfx::Size(content_layer_->bounds().width() - 30, 350 gfx::Size(content_layer_->bounds().width() - 30,
352 content_layer_->bounds().height() - 50)); 351 content_layer_->bounds().height() - 50));
353 scroll_clip_layer->AddChild(content_layer_); 352 scroll_clip_layer->AddChild(content_layer_);
354 root_layer->AddChild(scroll_clip_layer); 353 root_layer->AddChild(scroll_clip_layer);
355 354
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 528
530 void AfterTest() override { EXPECT_EQ(3, num_draws_); } 529 void AfterTest() override { EXPECT_EQ(3, num_draws_); }
531 530
532 int num_draws_; 531 int num_draws_;
533 }; 532 };
534 533
535 MULTI_THREAD_TEST_F(LayerTreeHostDamageTestScrollbarCommitDoesNoDamage); 534 MULTI_THREAD_TEST_F(LayerTreeHostDamageTestScrollbarCommitDoesNoDamage);
536 535
537 } // namespace 536 } // namespace
538 } // namespace cc 537 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698