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

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

Issue 404563005: Make RenderPass::Id an isolated class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more case in mojo Created 6 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/surfaces/surfaces_pixeltest.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"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 T::Create(host_->host_impl()->active_tree(), 2, a, b, c, d, e); 102 T::Create(host_->host_impl()->active_tree(), 2, a, b, c, d, e);
103 T* ptr = layer.get(); 103 T* ptr = layer.get();
104 root_layer_impl_->AddChild(layer.template PassAs<LayerImpl>()); 104 root_layer_impl_->AddChild(layer.template PassAs<LayerImpl>());
105 return ptr; 105 return ptr;
106 } 106 }
107 107
108 void CalcDrawProps(const gfx::Size& viewport_size); 108 void CalcDrawProps(const gfx::Size& viewport_size);
109 void AppendQuadsWithOcclusion(LayerImpl* layer_impl, 109 void AppendQuadsWithOcclusion(LayerImpl* layer_impl,
110 const gfx::Rect& occluded); 110 const gfx::Rect& occluded);
111 void AppendQuadsForPassWithOcclusion(LayerImpl* layer_impl, 111 void AppendQuadsForPassWithOcclusion(LayerImpl* layer_impl,
112 const RenderPass::Id& id, 112 const RenderPassId& id,
113 const gfx::Rect& occluded); 113 const gfx::Rect& occluded);
114 void AppendSurfaceQuadsWithOcclusion(RenderSurfaceImpl* surface_impl, 114 void AppendSurfaceQuadsWithOcclusion(RenderSurfaceImpl* surface_impl,
115 const gfx::Rect& occluded); 115 const gfx::Rect& occluded);
116 116
117 OutputSurface* output_surface() const { 117 OutputSurface* output_surface() const {
118 return host_->host_impl()->output_surface(); 118 return host_->host_impl()->output_surface();
119 } 119 }
120 ResourceProvider* resource_provider() const { 120 ResourceProvider* resource_provider() const {
121 return host_->host_impl()->resource_provider(); 121 return host_->host_impl()->resource_provider();
122 } 122 }
123 LayerImpl* root_layer() const { return root_layer_impl_.get(); } 123 LayerImpl* root_layer() const { return root_layer_impl_.get(); }
124 FakeLayerTreeHostImpl* host_impl() const { return host_->host_impl(); } 124 FakeLayerTreeHostImpl* host_impl() const { return host_->host_impl(); }
125 Proxy* proxy() const { return host_->host_impl()->proxy(); } 125 Proxy* proxy() const { return host_->host_impl()->proxy(); }
126 const QuadList& quad_list() const { return render_pass_->quad_list; } 126 const QuadList& quad_list() const { return render_pass_->quad_list; }
127 127
128 private: 128 private:
129 scoped_ptr<FakeLayerTreeHost> host_; 129 scoped_ptr<FakeLayerTreeHost> host_;
130 scoped_ptr<LayerImpl> root_layer_impl_; 130 scoped_ptr<LayerImpl> root_layer_impl_;
131 scoped_ptr<RenderPass> render_pass_; 131 scoped_ptr<RenderPass> render_pass_;
132 MockOcclusionTracker<LayerImpl> occlusion_tracker_; 132 MockOcclusionTracker<LayerImpl> occlusion_tracker_;
133 }; 133 };
134 }; 134 };
135 135
136 } // namespace cc 136 } // namespace cc
137 137
138 #endif // CC_TEST_LAYER_TEST_COMMON_H_ 138 #endif // CC_TEST_LAYER_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/surfaces/surfaces_pixeltest.cc ('k') | cc/test/layer_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698