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

Side by Side Diff: cc/layer_tree_host_unittest.cc

Issue 11704003: cc: Move more functionality from host to LayerTreeImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 11 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/layer_tree_host_impl_unittest.cc ('k') | cc/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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layer_tree_host.h" 5 #include "cc/layer_tree_host.h"
6 6
7 #include "base/synchronization/lock.h" 7 #include "base/synchronization/lock.h"
8 #include "cc/content_layer.h" 8 #include "cc/content_layer.h"
9 #include "cc/content_layer_client.h" 9 #include "cc/content_layer_client.h"
10 #include "cc/layer_impl.h" 10 #include "cc/layer_impl.h"
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 m_layerTreeHost->setViewportSize(gfx::Size(20, 20), gfx::Size(20, 20)); 634 m_layerTreeHost->setViewportSize(gfx::Size(20, 20), gfx::Size(20, 20));
635 m_layerTreeHost->setBackgroundColor(SK_ColorGRAY); 635 m_layerTreeHost->setBackgroundColor(SK_ColorGRAY);
636 m_layerTreeHost->setPageScaleFactorAndLimits(5, 5, 5); 636 m_layerTreeHost->setPageScaleFactorAndLimits(5, 5, 5);
637 637
638 postSetNeedsCommitToMainThread(); 638 postSetNeedsCommitToMainThread();
639 } 639 }
640 640
641 virtual void commitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE 641 virtual void commitCompleteOnThread(LayerTreeHostImpl* impl) OVERRIDE
642 { 642 {
643 EXPECT_EQ(gfx::Size(20, 20), impl->layoutViewportSize()); 643 EXPECT_EQ(gfx::Size(20, 20), impl->layoutViewportSize());
644 EXPECT_EQ(SK_ColorGRAY, impl->backgroundColor()); 644 EXPECT_EQ(SK_ColorGRAY, impl->activeTree()->background_color());
645 EXPECT_EQ(5, impl->pageScaleFactor()); 645 EXPECT_EQ(5, impl->pageScaleFactor());
646 646
647 endTest(); 647 endTest();
648 } 648 }
649 649
650 virtual void afterTest() OVERRIDE { } 650 virtual void afterTest() OVERRIDE { }
651 }; 651 };
652 652
653 TEST_F(LayerTreeHostTestCommit, runTest) 653 TEST_F(LayerTreeHostTestCommit, runTest)
654 { 654 {
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 LayerTreeSettings settings; 2013 LayerTreeSettings settings;
2014 settings.maxPartialTextureUpdates = 4; 2014 settings.maxPartialTextureUpdates = 4;
2015 2015
2016 scoped_ptr<LayerTreeHost> host = LayerTreeHost::create(&client, settings, sc oped_ptr<Thread>()); 2016 scoped_ptr<LayerTreeHost> host = LayerTreeHost::create(&client, settings, sc oped_ptr<Thread>());
2017 EXPECT_TRUE(host->initializeRendererIfNeeded()); 2017 EXPECT_TRUE(host->initializeRendererIfNeeded());
2018 EXPECT_EQ(0u, host->settings().maxPartialTextureUpdates); 2018 EXPECT_EQ(0u, host->settings().maxPartialTextureUpdates);
2019 } 2019 }
2020 2020
2021 } // namespace 2021 } // namespace
2022 } // namespace cc 2022 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host_impl_unittest.cc ('k') | cc/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698