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

Side by Side Diff: cc/quads/render_pass.h

Issue 197223003: Start of hardware overlay support in CC with Ubercompositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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 #ifndef CC_QUADS_RENDER_PASS_H_ 5 #ifndef CC_QUADS_RENDER_PASS_H_
6 #define CC_QUADS_RENDER_PASS_H_ 6 #define CC_QUADS_RENDER_PASS_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 bool operator!=(const Id& other) const { 56 bool operator!=(const Id& other) const {
57 return !(*this == other); 57 return !(*this == other);
58 } 58 }
59 bool operator<(const Id& other) const { 59 bool operator<(const Id& other) const {
60 return layer_id < other.layer_id || 60 return layer_id < other.layer_id ||
61 (layer_id == other.layer_id && index < other.index); 61 (layer_id == other.layer_id && index < other.index);
62 } 62 }
63 }; 63 };
64 64
65 enum HwOverlayState { NO_OVERLAY, RENDER_AND_OVERLAY, SIMPLE_OVERLAY, };
enne (OOO) 2014/03/14 18:13:41 bikeshed: maybe just OverlayState? Are there other
66
65 ~RenderPass(); 67 ~RenderPass();
66 68
67 static scoped_ptr<RenderPass> Create(); 69 static scoped_ptr<RenderPass> Create();
68 static scoped_ptr<RenderPass> Create(size_t num_layers); 70 static scoped_ptr<RenderPass> Create(size_t num_layers);
69 71
70 // A shallow copy of the render pass, which does not include its quads or copy 72 // A shallow copy of the render pass, which does not include its quads or copy
71 // requests. 73 // requests.
72 scoped_ptr<RenderPass> Copy(Id new_id) const; 74 scoped_ptr<RenderPass> Copy(Id new_id) const;
73 75
74 // A deep copy of the render passes in the list including the quads. 76 // A deep copy of the render passes in the list including the quads.
(...skipping 29 matching lines...) Expand all
104 106
105 // If non-empty, the renderer should produce a copy of the render pass' 107 // If non-empty, the renderer should produce a copy of the render pass'
106 // contents as a bitmap, and give a copy of the bitmap to each callback in 108 // contents as a bitmap, and give a copy of the bitmap to each callback in
107 // this list. This property should not be serialized between compositors, as 109 // this list. This property should not be serialized between compositors, as
108 // it only makes sense in the root compositor. 110 // it only makes sense in the root compositor.
109 ScopedPtrVector<CopyOutputRequest> copy_requests; 111 ScopedPtrVector<CopyOutputRequest> copy_requests;
110 112
111 QuadList quad_list; 113 QuadList quad_list;
112 SharedQuadStateList shared_quad_state_list; 114 SharedQuadStateList shared_quad_state_list;
113 115
116 // Specifies whether the pass is going into an overlay, needs to be rendered
117 // into a buffer before it can be presented to overlay hardware or a quad
118 // inside it is presented as is.
piman 2014/03/14 03:42:34 nit: this would be a great comment to have on the
119 HwOverlayState overlay_state;
piman 2014/03/14 03:42:34 Generally, adding a field here requires it to be a
alexst (slow to review) 2014/03/14 19:54:22 Yes, this should only exist in one process. I adde
120
114 protected: 121 protected:
115 explicit RenderPass(size_t num_layers); 122 explicit RenderPass(size_t num_layers);
116 RenderPass(); 123 RenderPass();
117 124
118 private: 125 private:
119 DISALLOW_COPY_AND_ASSIGN(RenderPass); 126 DISALLOW_COPY_AND_ASSIGN(RenderPass);
120 }; 127 };
121 128
122 } // namespace cc 129 } // namespace cc
123 130
(...skipping 13 matching lines...) Expand all
137 #error define a hash function for your compiler 144 #error define a hash function for your compiler
138 #endif // COMPILER 145 #endif // COMPILER
139 } // namespace BASE_HASH_NAMESPACE 146 } // namespace BASE_HASH_NAMESPACE
140 147
141 namespace cc { 148 namespace cc {
142 typedef ScopedPtrVector<RenderPass> RenderPassList; 149 typedef ScopedPtrVector<RenderPass> RenderPassList;
143 typedef base::hash_map<RenderPass::Id, RenderPass*> RenderPassIdHashMap; 150 typedef base::hash_map<RenderPass::Id, RenderPass*> RenderPassIdHashMap;
144 } // namespace cc 151 } // namespace cc
145 152
146 #endif // CC_QUADS_RENDER_PASS_H_ 153 #endif // CC_QUADS_RENDER_PASS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698