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

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

Issue 14925009: Run all LayerTreeHost tests with a delegating renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: uber-unittests: for landing2 Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_unittest_delegated.cc ('k') | no next file » | 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 "cc/base/thread_impl.h" 7 #include "cc/base/thread_impl.h"
8 #include "cc/layers/content_layer.h" 8 #include "cc/layers/content_layer.h"
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/layers/layer_impl.h" 10 #include "cc/layers/layer_impl.h"
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 gfx::Vector2d final_scroll_offset_; 443 gfx::Vector2d final_scroll_offset_;
444 444
445 FakeContentLayerClient fake_content_layer_client_; 445 FakeContentLayerClient fake_content_layer_client_;
446 446
447 scoped_refptr<Layer> root_scroll_layer_; 447 scoped_refptr<Layer> root_scroll_layer_;
448 scoped_refptr<Layer> child_layer_; 448 scoped_refptr<Layer> child_layer_;
449 scoped_refptr<Layer> expected_scroll_layer_; 449 scoped_refptr<Layer> expected_scroll_layer_;
450 scoped_refptr<Layer> expected_no_scroll_layer_; 450 scoped_refptr<Layer> expected_no_scroll_layer_;
451 }; 451 };
452 452
453 TEST_F(LayerTreeHostScrollTestCaseWithChild, DeviceScaleFactor1_ScrollChild) { 453 TEST_F(LayerTreeHostScrollTestCaseWithChild,
454 DeviceScaleFactor1_ScrollChild_DirectRenderer) {
454 device_scale_factor_ = 1.f; 455 device_scale_factor_ = 1.f;
455 scroll_child_layer_ = true; 456 scroll_child_layer_ = true;
456 RunTest(true); 457 RunTest(true, false);
457 }
458
459 TEST_F(LayerTreeHostScrollTestCaseWithChild, DeviceScaleFactor15_ScrollChild) {
460 device_scale_factor_ = 1.5f;
461 scroll_child_layer_ = true;
462 RunTest(true);
463 }
464
465 TEST_F(LayerTreeHostScrollTestCaseWithChild, DeviceScaleFactor2_ScrollChild) {
466 device_scale_factor_ = 2.f;
467 scroll_child_layer_ = true;
468 RunTest(true);
469 } 458 }
470 459
471 TEST_F(LayerTreeHostScrollTestCaseWithChild, 460 TEST_F(LayerTreeHostScrollTestCaseWithChild,
472 DeviceScaleFactor1_ScrollRootScrollLayer) { 461 DeviceScaleFactor1_ScrollChild_DelegatingRenderer) {
473 device_scale_factor_ = 1.f; 462 device_scale_factor_ = 1.f;
474 scroll_child_layer_ = false; 463 scroll_child_layer_ = true;
475 RunTest(true); 464 RunTest(true, true);
476 } 465 }
477 466
478 TEST_F(LayerTreeHostScrollTestCaseWithChild, 467 TEST_F(LayerTreeHostScrollTestCaseWithChild,
479 DeviceScaleFactor15_ScrollRootScrollLayer) { 468 DeviceScaleFactor15_ScrollChild_DirectRenderer) {
480 device_scale_factor_ = 1.5f; 469 device_scale_factor_ = 1.5f;
481 scroll_child_layer_ = false; 470 scroll_child_layer_ = true;
482 RunTest(true); 471 RunTest(true, false);
483 } 472 }
484 473
485 TEST_F(LayerTreeHostScrollTestCaseWithChild, 474 TEST_F(LayerTreeHostScrollTestCaseWithChild,
486 DeviceScaleFactor2_ScrollRootScrollLayer) { 475 DeviceScaleFactor15_ScrollChild_DelegatingRenderer) {
476 device_scale_factor_ = 1.5f;
477 scroll_child_layer_ = true;
478 RunTest(true, true);
479 }
480
481 TEST_F(LayerTreeHostScrollTestCaseWithChild,
482 DeviceScaleFactor2_ScrollChild_DirectRenderer) {
483 device_scale_factor_ = 2.f;
484 scroll_child_layer_ = true;
485 RunTest(true, false);
486 }
487
488 TEST_F(LayerTreeHostScrollTestCaseWithChild,
489 DeviceScaleFactor2_ScrollChild_DelegatingRenderer) {
490 device_scale_factor_ = 2.f;
491 scroll_child_layer_ = true;
492 RunTest(true, true);
493 }
494
495 TEST_F(LayerTreeHostScrollTestCaseWithChild,
496 DeviceScaleFactor1_ScrollRootScrollLayer_DirectRenderer) {
497 device_scale_factor_ = 1.f;
498 scroll_child_layer_ = false;
499 RunTest(true, false);
500 }
501
502 TEST_F(LayerTreeHostScrollTestCaseWithChild,
503 DeviceScaleFactor1_ScrollRootScrollLayer_DelegatingRenderer) {
504 device_scale_factor_ = 1.f;
505 scroll_child_layer_ = false;
506 RunTest(true, true);
507 }
508
509 TEST_F(LayerTreeHostScrollTestCaseWithChild,
510 DeviceScaleFactor15_ScrollRootScrollLayer_DirectRenderer) {
511 device_scale_factor_ = 1.5f;
512 scroll_child_layer_ = false;
513 RunTest(true, false);
514 }
515
516 TEST_F(LayerTreeHostScrollTestCaseWithChild,
517 DeviceScaleFactor15_ScrollRootScrollLayer_DelegatingRenderer) {
518 device_scale_factor_ = 1.5f;
519 scroll_child_layer_ = false;
520 RunTest(true, true);
521 }
522
523 TEST_F(LayerTreeHostScrollTestCaseWithChild,
524 DeviceScaleFactor2_ScrollRootScrollLayer_DirectRenderer) {
487 device_scale_factor_ = 2.f; 525 device_scale_factor_ = 2.f;
488 scroll_child_layer_ = false; 526 scroll_child_layer_ = false;
489 RunTest(true); 527 RunTest(true, false);
528 }
529
530 TEST_F(LayerTreeHostScrollTestCaseWithChild,
531 DeviceScaleFactor2_ScrollRootScrollLayer_DelegatingRenderer) {
532 device_scale_factor_ = 2.f;
533 scroll_child_layer_ = false;
534 RunTest(true, true);
490 } 535 }
491 536
492 class ImplSidePaintingScrollTest : public LayerTreeHostScrollTest { 537 class ImplSidePaintingScrollTest : public LayerTreeHostScrollTest {
493 public: 538 public:
494 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { 539 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
495 settings->impl_side_painting = true; 540 settings->impl_side_painting = true;
496 } 541 }
497 542
498 virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE { 543 virtual void DrawLayersOnThread(LayerTreeHostImpl* impl) OVERRIDE {
499 // Manual vsync tick. 544 // Manual vsync tick.
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 LayerTreeHost::Create(&client, settings, impl_ccthread.Pass()); 772 LayerTreeHost::Create(&client, settings, impl_ccthread.Pass());
728 773
729 layer_tree_host->DidStopFlinging(); 774 layer_tree_host->DidStopFlinging();
730 layer_tree_host.reset(); 775 layer_tree_host.reset();
731 impl_thread.Stop(); 776 impl_thread.Stop();
732 EXPECT_TRUE(received_stop_flinging); 777 EXPECT_TRUE(received_stop_flinging);
733 } 778 }
734 779
735 } // namespace 780 } // namespace
736 } // namespace cc 781 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_delegated.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698