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

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

Issue 308193003: Removed QuadSink and MockQuadCuller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@plumLayerImpl
Patch Set: rebase Created 6 years, 6 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_picture_layer_impl.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/test/fake_layer_tree_host.h" 11 #include "cc/test/fake_layer_tree_host.h"
11 #include "cc/test/mock_quad_culler.h" 12 #include "cc/test/mock_occlusion_tracker.h"
12 #include "cc/trees/layer_tree_host_impl.h" 13 #include "cc/trees/layer_tree_host_impl.h"
13 14
14 #define EXPECT_SET_NEEDS_COMMIT(expect, code_to_test) \ 15 #define EXPECT_SET_NEEDS_COMMIT(expect, code_to_test) \
15 do { \ 16 do { \
16 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times((expect)); \ 17 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times((expect)); \
17 code_to_test; \ 18 code_to_test; \
18 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \ 19 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \
19 } while (false) 20 } while (false)
20 21
21 #define EXPECT_SET_NEEDS_UPDATE(expect, code_to_test) \ 22 #define EXPECT_SET_NEEDS_UPDATE(expect, code_to_test) \
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 107
107 OutputSurface* output_surface() const { 108 OutputSurface* output_surface() const {
108 return host_->host_impl()->output_surface(); 109 return host_->host_impl()->output_surface();
109 } 110 }
110 ResourceProvider* resource_provider() const { 111 ResourceProvider* resource_provider() const {
111 return host_->host_impl()->resource_provider(); 112 return host_->host_impl()->resource_provider();
112 } 113 }
113 LayerImpl* root_layer() const { return root_layer_impl_.get(); } 114 LayerImpl* root_layer() const { return root_layer_impl_.get(); }
114 FakeLayerTreeHostImpl* host_impl() const { return host_->host_impl(); } 115 FakeLayerTreeHostImpl* host_impl() const { return host_->host_impl(); }
115 Proxy* proxy() const { return host_->host_impl()->proxy(); } 116 Proxy* proxy() const { return host_->host_impl()->proxy(); }
116 const QuadList& quad_list() const { return quad_culler_->quad_list(); } 117 const QuadList& quad_list() const { return render_pass_->quad_list; }
117 118
118 private: 119 private:
119 scoped_ptr<FakeLayerTreeHost> host_; 120 scoped_ptr<FakeLayerTreeHost> host_;
120 scoped_ptr<LayerImpl> root_layer_impl_; 121 scoped_ptr<LayerImpl> root_layer_impl_;
121 scoped_ptr<RenderPass> render_pass_; 122 scoped_ptr<RenderPass> render_pass_;
122 MockOcclusionTracker<LayerImpl> occlusion_tracker_; 123 MockOcclusionTracker<LayerImpl> occlusion_tracker_;
123 scoped_ptr<MockQuadCuller> quad_culler_;
124 }; 124 };
125 }; 125 };
126 126
127 } // namespace cc 127 } // namespace cc
128 128
129 #endif // CC_TEST_LAYER_TEST_COMMON_H_ 129 #endif // CC_TEST_LAYER_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/test/fake_picture_layer_impl.cc ('k') | cc/test/layer_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698