return mem_limits_.mapped_memory_reclaim_limit;
}
+ // WebGraphicsContext3DImpl methods
+ virtual bool InitializeOnCurrentThread() OVERRIDE;
+
//----------------------------------------------------------------------
// WebGraphicsContext3D methods
-
- // Must be called after initialize() and before any of the following methods.
- // Permanently binds to the first calling thread. Returns false if the
- // graphics context fails to create. Do not call from more than one thread.
- virtual bool makeContextCurrent();
-
virtual bool isContextLost();
virtual WGC3Denum getGraphicsResetStatusARB();
gfx::GpuPreference gpu_preference_;
- base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_;
-
scoped_ptr<CommandBufferProxyImpl> command_buffer_;
scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;
scoped_ptr<gpu::TransferBuffer> transfer_buffer_;
Error last_error_;
SharedMemoryLimits mem_limits_;
scoped_refptr<ShareGroup> share_group_;
+
+ // Member variables should appear before the WeakPtrFactory, to ensure
+ // that any WeakPtrs to Controller are invalidated before its members
+ // variable's destructors are executed, rendering them invalid.
+ base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_;
};
} // namespace content