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

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

Issue 565833002: Refactoring the weak_ptr_factory order in src/content/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.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 (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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 bool visible_; 193 bool visible_;
194 194
195 // State needed by MaybeInitializeGL. 195 // State needed by MaybeInitializeGL.
196 scoped_refptr<GpuChannelHost> host_; 196 scoped_refptr<GpuChannelHost> host_;
197 int32 surface_id_; 197 int32 surface_id_;
198 GURL active_url_; 198 GURL active_url_;
199 199
200 gfx::GpuPreference gpu_preference_; 200 gfx::GpuPreference gpu_preference_;
201 201
202 base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_;
203
204 scoped_ptr<CommandBufferProxyImpl> command_buffer_; 202 scoped_ptr<CommandBufferProxyImpl> command_buffer_;
205 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; 203 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;
206 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; 204 scoped_ptr<gpu::TransferBuffer> transfer_buffer_;
207 scoped_ptr<gpu::gles2::GLES2Implementation> real_gl_; 205 scoped_ptr<gpu::gles2::GLES2Implementation> real_gl_;
208 scoped_ptr<gpu::gles2::GLES2Interface> trace_gl_; 206 scoped_ptr<gpu::gles2::GLES2Interface> trace_gl_;
209 Error last_error_; 207 Error last_error_;
210 SharedMemoryLimits mem_limits_; 208 SharedMemoryLimits mem_limits_;
211 scoped_refptr<ShareGroup> share_group_; 209 scoped_refptr<ShareGroup> share_group_;
210
211 // Member variables should appear before the WeakPtrFactory, to ensure
212 // that any WeakPtrs to Controller are invalidated before its members
213 // variable's destructors are executed, rendering them invalid.
214 base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_;
212 }; 215 };
213 216
214 } // namespace content 217 } // namespace content
215 218
216 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 219 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698