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

Side by Side Diff: cc/layers/layer_unittest.cc

Issue 1464313007: cc: Introduce CompositorMode enum. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change ui::MockLayerTreeHost Created 5 years 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/cc.gyp ('k') | cc/layers/texture_layer_unittest.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/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "cc/animation/keyframed_animation_curve.h" 8 #include "cc/animation/keyframed_animation_curve.h"
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/layers/layer_impl.h" 10 #include "cc/layers/layer_impl.h"
(...skipping 29 matching lines...) Expand all
40 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \ 40 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \
41 } while (false) 41 } while (false)
42 42
43 namespace cc { 43 namespace cc {
44 namespace { 44 namespace {
45 45
46 class MockLayerTreeHost : public LayerTreeHost { 46 class MockLayerTreeHost : public LayerTreeHost {
47 public: 47 public:
48 MockLayerTreeHost(LayerTreeHostSingleThreadClient* single_thread_client, 48 MockLayerTreeHost(LayerTreeHostSingleThreadClient* single_thread_client,
49 LayerTreeHost::InitParams* params) 49 LayerTreeHost::InitParams* params)
50 : LayerTreeHost(params) { 50 : LayerTreeHost(params, CompositorMode::SingleThreaded) {
51 InitializeSingleThreaded(single_thread_client, 51 InitializeSingleThreaded(single_thread_client,
52 base::ThreadTaskRunnerHandle::Get(), nullptr); 52 base::ThreadTaskRunnerHandle::Get(), nullptr);
53 } 53 }
54 54
55 MOCK_METHOD0(SetNeedsCommit, void()); 55 MOCK_METHOD0(SetNeedsCommit, void());
56 MOCK_METHOD0(SetNeedsUpdateLayers, void()); 56 MOCK_METHOD0(SetNeedsUpdateLayers, void());
57 MOCK_METHOD0(SetNeedsFullTreeSync, void()); 57 MOCK_METHOD0(SetNeedsFullTreeSync, void());
58 }; 58 };
59 59
60 class LayerTest : public testing::Test { 60 class LayerTest : public testing::Test {
(...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 1699
1700 properties.set_needs_push_properties(true); 1700 properties.set_needs_push_properties(true);
1701 properties.mutable_base(); 1701 properties.mutable_base();
1702 layer->FromLayerPropertiesProto(properties); 1702 layer->FromLayerPropertiesProto(properties);
1703 EXPECT_TRUE(layer->needs_push_properties()); 1703 EXPECT_TRUE(layer->needs_push_properties());
1704 EXPECT_FALSE(layer->descendant_needs_push_properties()); 1704 EXPECT_FALSE(layer->descendant_needs_push_properties());
1705 } 1705 }
1706 1706
1707 } // namespace 1707 } // namespace
1708 } // namespace cc 1708 } // namespace cc
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698