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

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

Issue 1885903002: Revert of Make lost context and error message callbacks on GpuControl go to client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // NOTE: on Mac OS X, this entry point is only used to set up the 184 // NOTE: on Mac OS X, this entry point is only used to set up the
185 // accelerated compositor's output. On this platform, we actually pass 185 // accelerated compositor's output. On this platform, we actually pass
186 // a gpu::SurfaceHandle in place of the gfx::NativeViewId, 186 // a gpu::SurfaceHandle in place of the gfx::NativeViewId,
187 // because the facility to allocate a fake PluginWindowHandle is 187 // because the facility to allocate a fake PluginWindowHandle is
188 // already in place. We could add more entry points and messages to 188 // already in place. We could add more entry points and messages to
189 // allocate both fake PluginWindowHandles and NativeViewIds and map 189 // allocate both fake PluginWindowHandles and NativeViewIds and map
190 // from fake NativeViewIds to PluginWindowHandles, but this seems like 190 // from fake NativeViewIds to PluginWindowHandles, but this seems like
191 // unnecessary complexity at the moment. 191 // unnecessary complexity at the moment.
192 bool CreateContext(); 192 bool CreateContext();
193 193
194 void OnContextLost(); 194 virtual void OnContextLost();
195 void OnErrorMessage(const char* message, int32_t id);
196 195
197 bool automatic_flushes_; 196 bool automatic_flushes_;
198 gpu::gles2::ContextCreationAttribHelper attributes_; 197 gpu::gles2::ContextCreationAttribHelper attributes_;
199 198
200 // State needed by MaybeInitializeGL. 199 // State needed by MaybeInitializeGL.
201 scoped_refptr<gpu::GpuChannelHost> host_; 200 scoped_refptr<gpu::GpuChannelHost> host_;
202 gpu::SurfaceHandle surface_handle_; 201 gpu::SurfaceHandle surface_handle_;
203 GURL active_url_; 202 GURL active_url_;
204 CommandBufferContextType context_type_; 203 CommandBufferContextType context_type_;
205 204
206 gfx::GpuPreference gpu_preference_; 205 gfx::GpuPreference gpu_preference_;
207 206
208 scoped_ptr<gpu::CommandBufferProxyImpl> command_buffer_; 207 scoped_ptr<gpu::CommandBufferProxyImpl> command_buffer_;
209 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; 208 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;
210 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; 209 scoped_ptr<gpu::TransferBuffer> transfer_buffer_;
211 scoped_ptr<gpu::gles2::GLES2Implementation> real_gl_; 210 scoped_ptr<gpu::gles2::GLES2Implementation> real_gl_;
212 scoped_ptr<gpu::gles2::GLES2Interface> trace_gl_; 211 scoped_ptr<gpu::gles2::GLES2Interface> trace_gl_;
213 SharedMemoryLimits mem_limits_; 212 SharedMemoryLimits mem_limits_;
214 scoped_refptr<ShareGroup> share_group_; 213 scoped_refptr<ShareGroup> share_group_;
215 214
216 // Member variables should appear before the WeakPtrFactory, to ensure 215 // Member variables should appear before the WeakPtrFactory, to ensure
217 // that any WeakPtrs to Controller are invalidated before its members 216 // that any WeakPtrs to Controller are invalidated before its members
218 // variable's destructors are executed, rendering them invalid. 217 // variable's destructors are executed, rendering them invalid.
219 base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_; 218 base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_;
220 }; 219 };
221 220
222 } // namespace content 221 } // namespace content
223 222
224 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 223 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698