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

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

Issue 2231233002: cc: Remove the lie of "DirectRenderer" in LayerTreeTests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no-ltt-delegating: ccpt Created 4 years, 4 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_perftest.cc ('k') | cc/trees/layer_tree_host_unittest_context.cc » ('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/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 namespace cc { 74 namespace cc {
75 namespace { 75 namespace {
76 76
77 class LayerTreeHostTest : public LayerTreeTest {}; 77 class LayerTreeHostTest : public LayerTreeTest {};
78 78
79 class LayerTreeHostTestHasImplThreadTest : public LayerTreeHostTest { 79 class LayerTreeHostTestHasImplThreadTest : public LayerTreeHostTest {
80 public: 80 public:
81 LayerTreeHostTestHasImplThreadTest() : threaded_(false) {} 81 LayerTreeHostTestHasImplThreadTest() : threaded_(false) {}
82 82
83 void RunTest(CompositorMode mode, bool delegating_renderer) override { 83 void RunTest(CompositorMode mode) override {
84 threaded_ = mode == CompositorMode::THREADED; 84 threaded_ = mode == CompositorMode::THREADED;
85 LayerTreeHostTest::RunTest(mode, delegating_renderer); 85 LayerTreeHostTest::RunTest(mode);
86 } 86 }
87 87
88 void BeginTest() override { 88 void BeginTest() override {
89 EXPECT_EQ(threaded_, HasImplThread()); 89 EXPECT_EQ(threaded_, HasImplThread());
90 EndTest(); 90 EndTest();
91 } 91 }
92 92
93 void AfterTest() override { EXPECT_EQ(threaded_, HasImplThread()); } 93 void AfterTest() override { EXPECT_EQ(threaded_, HasImplThread()); }
94 94
95 private: 95 private:
(...skipping 5559 matching lines...) Expand 10 before | Expand all | Expand 10 after
5655 } 5655 }
5656 } 5656 }
5657 5657
5658 bool reclaim_resources_; 5658 bool reclaim_resources_;
5659 int commit_count_ = 0; 5659 int commit_count_ = 0;
5660 TestSwapPromiseResult swap_promise_result_[3]; 5660 TestSwapPromiseResult swap_promise_result_[3];
5661 }; 5661 };
5662 5662
5663 TEST_F(LayerTreeHostTestSynchronousCompositeSwapPromise, NoReclaim) { 5663 TEST_F(LayerTreeHostTestSynchronousCompositeSwapPromise, NoReclaim) {
5664 reclaim_resources_ = false; 5664 reclaim_resources_ = false;
5665 RunTest(CompositorMode::SINGLE_THREADED, true); 5665 RunTest(CompositorMode::SINGLE_THREADED);
5666 } 5666 }
5667 5667
5668 TEST_F(LayerTreeHostTestSynchronousCompositeSwapPromise, Reclaim) { 5668 TEST_F(LayerTreeHostTestSynchronousCompositeSwapPromise, Reclaim) {
5669 reclaim_resources_ = true; 5669 reclaim_resources_ = true;
5670 RunTest(CompositorMode::SINGLE_THREADED, true); 5670 RunTest(CompositorMode::SINGLE_THREADED);
5671 } 5671 }
5672 5672
5673 // Make sure page scale and top control deltas are applied to the client even 5673 // Make sure page scale and top control deltas are applied to the client even
5674 // when the LayerTreeHost doesn't have a root layer. 5674 // when the LayerTreeHost doesn't have a root layer.
5675 class LayerTreeHostAcceptsDeltasFromImplWithoutRootLayer 5675 class LayerTreeHostAcceptsDeltasFromImplWithoutRootLayer
5676 : public LayerTreeHostTest { 5676 : public LayerTreeHostTest {
5677 public: 5677 public:
5678 LayerTreeHostAcceptsDeltasFromImplWithoutRootLayer() 5678 LayerTreeHostAcceptsDeltasFromImplWithoutRootLayer()
5679 : deltas_sent_to_client_(false) {} 5679 : deltas_sent_to_client_(false) {}
5680 5680
(...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after
7050 private: 7050 private:
7051 FakeContentLayerClient client_; 7051 FakeContentLayerClient client_;
7052 const gfx::Size viewport_size_; 7052 const gfx::Size viewport_size_;
7053 const gfx::Size large_image_size_; 7053 const gfx::Size large_image_size_;
7054 }; 7054 };
7055 7055
7056 SINGLE_AND_MULTI_THREAD_TEST_F(GpuRasterizationSucceedsWithLargeImage); 7056 SINGLE_AND_MULTI_THREAD_TEST_F(GpuRasterizationSucceedsWithLargeImage);
7057 7057
7058 } // namespace 7058 } // namespace
7059 } // namespace cc 7059 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_perftest.cc ('k') | cc/trees/layer_tree_host_unittest_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698