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

Side by Side Diff: content/common/gpu/client/content_gl_context.h

Issue 9910004: Implement Discard and EnsureBackbufferCHROMIUM using command buffer instead of IPC. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 (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 // This API is consistent with other OpenGL setup APIs like window's WGL 5 // This API is consistent with other OpenGL setup APIs like window's WGL
6 // and pepper's PGL. This API is used to manage OpenGL ContentGLContexts in the 6 // and pepper's PGL. This API is used to manage OpenGL ContentGLContexts in the
7 // Chrome renderer process in a way that is consistent with other platforms. 7 // Chrome renderer process in a way that is consistent with other platforms.
8 8
9 #ifndef CONTENT_COMMON_GPU_CLIENT_RENDERER_GL_CONTEXT_H_ 9 #ifndef CONTENT_COMMON_GPU_CLIENT_RENDERER_GL_CONTEXT_H_
10 #define CONTENT_COMMON_GPU_CLIENT_RENDERER_GL_CONTEXT_H_ 10 #define CONTENT_COMMON_GPU_CLIENT_RENDERER_GL_CONTEXT_H_
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // by the parent ContentGLContext. 157 // by the parent ContentGLContext.
158 bool SwapBuffers(); 158 bool SwapBuffers();
159 159
160 // Run the task once the channel has been flushed. Takes care of deleting the 160 // Run the task once the channel has been flushed. Takes care of deleting the
161 // task whether the echo succeeds or not. 161 // task whether the echo succeeds or not.
162 bool Echo(const base::Closure& task); 162 bool Echo(const base::Closure& task);
163 163
164 // Sends an IPC message with the new state of surface visibility 164 // Sends an IPC message with the new state of surface visibility
165 bool SetSurfaceVisible(bool visibility); 165 bool SetSurfaceVisible(bool visibility);
166 166
167 bool DiscardBackbuffer();
168 bool EnsureBackbuffer();
169
170 // Register a callback to invoke whenever we recieve a new memory allocation. 167 // Register a callback to invoke whenever we recieve a new memory allocation.
171 void SetMemoryAllocationChangedCallback( 168 void SetMemoryAllocationChangedCallback(
172 const base::Callback<void(const GpuMemoryAllocationForRenderer&)>& 169 const base::Callback<void(const GpuMemoryAllocationForRenderer&)>&
173 callback); 170 callback);
174 171
175 // Allows direct access to the GLES2 implementation so a ContentGLContext 172 // Allows direct access to the GLES2 implementation so a ContentGLContext
176 // can be used without making it current. 173 // can be used without making it current.
177 gpu::gles2::GLES2Implementation* GetImplementation(); 174 gpu::gles2::GLES2Implementation* GetImplementation();
178 175
179 // Return the current error. 176 // Return the current error.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 gpu::gles2::GLES2CmdHelper* gles2_helper_; 213 gpu::gles2::GLES2CmdHelper* gles2_helper_;
217 gpu::TransferBuffer* transfer_buffer_; 214 gpu::TransferBuffer* transfer_buffer_;
218 gpu::gles2::GLES2Implementation* gles2_implementation_; 215 gpu::gles2::GLES2Implementation* gles2_implementation_;
219 Error last_error_; 216 Error last_error_;
220 int frame_number_; 217 int frame_number_;
221 218
222 DISALLOW_COPY_AND_ASSIGN(ContentGLContext); 219 DISALLOW_COPY_AND_ASSIGN(ContentGLContext);
223 }; 220 };
224 221
225 #endif // CONTENT_COMMON_GPU_CLIENT_RENDERER_GL_CONTEXT_H_ 222 #endif // CONTENT_COMMON_GPU_CLIENT_RENDERER_GL_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy_impl.cc ('k') | content/common/gpu/client/content_gl_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698