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

Side by Side Diff: gpu/command_buffer/service/framebuffer_manager.h

Issue 1309333003: Get ReadPixels to work with INT and UNSIGNED_INT format. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 void SetDrawBuffers(GLsizei n, const GLenum* bufs); 143 void SetDrawBuffers(GLsizei n, const GLenum* bufs);
144 144
145 // If a color buffer is attached to GL_COLOR_ATTACHMENTi, enable that 145 // If a color buffer is attached to GL_COLOR_ATTACHMENTi, enable that
146 // draw buffer for glClear(). 146 // draw buffer for glClear().
147 void PrepareDrawBuffersForClear() const; 147 void PrepareDrawBuffersForClear() const;
148 148
149 // Restore draw buffers states that have been changed in 149 // Restore draw buffers states that have been changed in
150 // PrepareDrawBuffersForClear(). 150 // PrepareDrawBuffersForClear().
151 void RestoreDrawBuffersAfterClear() const; 151 void RestoreDrawBuffersAfterClear() const;
152 152
153 // Clear all the active INT or UINT type color buffers to (0, 0, 0, 0).
154 void ClearIntegerBuffers();
155
153 // Return true if any draw buffers has an alpha channel. 156 // Return true if any draw buffers has an alpha channel.
154 bool HasAlphaMRT() const; 157 bool HasAlphaMRT() const;
155 158
156 // Return false if any two active color attachments have different internal 159 // Return false if any two active color attachments have different internal
157 // formats. 160 // formats.
158 bool HasSameInternalFormatsMRT() const; 161 bool HasSameInternalFormatsMRT() const;
159 162
160 void OnTextureRefDetached(TextureRef* texture); 163 void OnTextureRefDetached(TextureRef* texture);
161 void OnWillRenderTo() const; 164
162 void OnDidRenderTo() const; 165 // If attachment is 0, apply to all attachments; otherwise, apply only to
166 // the specified attachment.
167 void OnWillRenderTo(GLenum attachment) const;
168 void OnDidRenderTo(GLenum attachment) const;
163 169
164 void set_read_buffer(GLenum read_buffer) { 170 void set_read_buffer(GLenum read_buffer) {
165 read_buffer_ = read_buffer; 171 read_buffer_ = read_buffer;
166 } 172 }
167 173
168 GLenum read_buffer() const { 174 GLenum read_buffer() const {
169 return read_buffer_; 175 return read_buffer_;
170 } 176 }
171 177
172 private: 178 private:
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 343
338 scoped_refptr<FramebufferCompletenessCache> framebuffer_combo_complete_cache_; 344 scoped_refptr<FramebufferCompletenessCache> framebuffer_combo_complete_cache_;
339 345
340 DISALLOW_COPY_AND_ASSIGN(FramebufferManager); 346 DISALLOW_COPY_AND_ASSIGN(FramebufferManager);
341 }; 347 };
342 348
343 } // namespace gles2 349 } // namespace gles2
344 } // namespace gpu 350 } // namespace gpu
345 351
346 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_ 352 #endif // GPU_COMMAND_BUFFER_SERVICE_FRAMEBUFFER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698