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

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

Issue 584503005: Make scroll offset type of float in cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: link crbug to TODO 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 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/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 class LayerTreeHostScrollbarDamageTest : public LayerTreeHostDamageTest { 357 class LayerTreeHostScrollbarDamageTest : public LayerTreeHostDamageTest {
358 virtual void SetupTree() OVERRIDE { 358 virtual void SetupTree() OVERRIDE {
359 scoped_refptr<Layer> root_layer = Layer::Create(); 359 scoped_refptr<Layer> root_layer = Layer::Create();
360 root_layer->SetBounds(gfx::Size(400, 400)); 360 root_layer->SetBounds(gfx::Size(400, 400));
361 root_layer->SetMasksToBounds(true); 361 root_layer->SetMasksToBounds(true);
362 layer_tree_host()->SetRootLayer(root_layer); 362 layer_tree_host()->SetRootLayer(root_layer);
363 363
364 scoped_refptr<Layer> scroll_clip_layer = Layer::Create(); 364 scoped_refptr<Layer> scroll_clip_layer = Layer::Create();
365 scoped_refptr<Layer> content_layer = FakeContentLayer::Create(&client_); 365 scoped_refptr<Layer> content_layer = FakeContentLayer::Create(&client_);
366 content_layer->SetScrollClipLayerId(scroll_clip_layer->id()); 366 content_layer->SetScrollClipLayerId(scroll_clip_layer->id());
367 content_layer->SetScrollOffset(gfx::Vector2d(10, 20)); 367 content_layer->SetScrollOffset(gfx::ScrollOffset(10, 20));
368 content_layer->SetBounds(gfx::Size(100, 200)); 368 content_layer->SetBounds(gfx::Size(100, 200));
369 scroll_clip_layer->SetBounds( 369 scroll_clip_layer->SetBounds(
370 gfx::Size(content_layer->bounds().width() - 30, 370 gfx::Size(content_layer->bounds().width() - 30,
371 content_layer->bounds().height() - 50)); 371 content_layer->bounds().height() - 50));
372 scroll_clip_layer->AddChild(content_layer); 372 scroll_clip_layer->AddChild(content_layer);
373 root_layer->AddChild(scroll_clip_layer); 373 root_layer->AddChild(scroll_clip_layer);
374 374
375 scoped_refptr<Layer> scrollbar_layer = 375 scoped_refptr<Layer> scrollbar_layer =
376 FakePaintedScrollbarLayer::Create(false, true, content_layer->id()); 376 FakePaintedScrollbarLayer::Create(false, true, content_layer->id());
377 scrollbar_layer->SetPosition(gfx::Point(300, 300)); 377 scrollbar_layer->SetPosition(gfx::Point(300, 300));
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 FakeContentLayerClient client_; 637 FakeContentLayerClient client_;
638 int swap_count_; 638 int swap_count_;
639 int prepare_to_draw_count_; 639 int prepare_to_draw_count_;
640 int update_visible_tile_count_; 640 int update_visible_tile_count_;
641 }; 641 };
642 642
643 MULTI_THREAD_TEST_F(LayerTreeHostDamageTestVisibleTilesStillTriggerDraws); 643 MULTI_THREAD_TEST_F(LayerTreeHostDamageTestVisibleTilesStillTriggerDraws);
644 644
645 } // namespace 645 } // namespace
646 } // namespace cc 646 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_animation.cc ('k') | cc/trees/layer_tree_host_unittest_scroll.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698