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

Side by Side Diff: cc/test/layer_test_common.h

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/test/fake_proxy.cc ('k') | cc/test/layer_test_common.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 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 #ifndef CC_TEST_LAYER_TEST_COMMON_H_ 5 #ifndef CC_TEST_LAYER_TEST_COMMON_H_
6 #define CC_TEST_LAYER_TEST_COMMON_H_ 6 #define CC_TEST_LAYER_TEST_COMMON_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "cc/quads/render_pass.h" 10 #include "cc/quads/render_pass.h"
11 #include "cc/test/fake_layer_tree_host.h" 11 #include "cc/test/fake_layer_tree_host.h"
12 #include "cc/test/mock_occlusion_tracker.h"
13 #include "cc/trees/layer_tree_host_impl.h" 12 #include "cc/trees/layer_tree_host_impl.h"
14 13
15 #define EXPECT_SET_NEEDS_COMMIT(expect, code_to_test) \ 14 #define EXPECT_SET_NEEDS_COMMIT(expect, code_to_test) \
16 do { \ 15 do { \
17 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times((expect)); \ 16 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times((expect)); \
18 code_to_test; \ 17 code_to_test; \
19 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \ 18 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \
20 } while (false) 19 } while (false)
21 20
22 #define EXPECT_SET_NEEDS_UPDATE(expect, code_to_test) \ 21 #define EXPECT_SET_NEEDS_UPDATE(expect, code_to_test) \
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 LayerImpl* root_layer() const { return root_layer_impl_.get(); } 120 LayerImpl* root_layer() const { return root_layer_impl_.get(); }
122 FakeLayerTreeHostImpl* host_impl() const { return host_->host_impl(); } 121 FakeLayerTreeHostImpl* host_impl() const { return host_->host_impl(); }
123 Proxy* proxy() const { return host_->host_impl()->proxy(); } 122 Proxy* proxy() const { return host_->host_impl()->proxy(); }
124 const QuadList& quad_list() const { return render_pass_->quad_list; } 123 const QuadList& quad_list() const { return render_pass_->quad_list; }
125 124
126 private: 125 private:
127 FakeLayerTreeHostClient client_; 126 FakeLayerTreeHostClient client_;
128 scoped_ptr<FakeLayerTreeHost> host_; 127 scoped_ptr<FakeLayerTreeHost> host_;
129 scoped_ptr<LayerImpl> root_layer_impl_; 128 scoped_ptr<LayerImpl> root_layer_impl_;
130 scoped_ptr<RenderPass> render_pass_; 129 scoped_ptr<RenderPass> render_pass_;
131 MockOcclusionTracker<LayerImpl> occlusion_tracker_;
132 }; 130 };
133 }; 131 };
134 132
135 } // namespace cc 133 } // namespace cc
136 134
137 #endif // CC_TEST_LAYER_TEST_COMMON_H_ 135 #endif // CC_TEST_LAYER_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/test/fake_proxy.cc ('k') | cc/test/layer_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698