| Index: content/common/gpu/client/context_provider_command_buffer.h
|
| diff --git a/content/common/gpu/client/context_provider_command_buffer.h b/content/common/gpu/client/context_provider_command_buffer.h
|
| index 1e0d23f82b915609416ce8473e6d4f83d6fd24bb..2dd5ef5dc48749594d42bb92f7967ea43e587966 100644
|
| --- a/content/common/gpu/client/context_provider_command_buffer.h
|
| +++ b/content/common/gpu/client/context_provider_command_buffer.h
|
| @@ -30,6 +30,11 @@ class CONTENT_EXPORT ContextProviderCommandBuffer
|
|
|
| CommandBufferProxyImpl* GetCommandBufferProxy();
|
|
|
| + // Destroy WebGraphicsContext3DCommandBufferImpl context and GrContext. This
|
| + // should only be used if content provider has been set up for multi-threaded
|
| + // usage by calling SetupLock().
|
| + void Destroy();
|
| +
|
| // cc_blink::ContextProviderWebContext implementation.
|
| WebGraphicsContext3DCommandBufferImpl* WebContext3D() override;
|
|
|
| @@ -45,12 +50,13 @@ class CONTENT_EXPORT ContextProviderCommandBuffer
|
| Capabilities ContextCapabilities() override;
|
| void VerifyContexts() override;
|
| void DeleteCachedResources() override;
|
| - bool DestroyedOnMainThread() override;
|
| + bool HasBeenLostOnMainThread() override;
|
| void SetLostContextCallback(
|
| const LostContextCallback& lost_context_callback) override;
|
| void SetMemoryPolicyChangedCallback(
|
| const MemoryPolicyChangedCallback& memory_policy_changed_callback)
|
| override;
|
| + bool HasBeenDestroyed() override;
|
|
|
| protected:
|
| ContextProviderCommandBuffer(
|
| @@ -63,6 +69,7 @@ class CONTENT_EXPORT ContextProviderCommandBuffer
|
|
|
| private:
|
| void InitializeCapabilities();
|
| + void DestroyWithLockAcquired();
|
|
|
| base::ThreadChecker main_thread_checker_;
|
| base::ThreadChecker context_thread_checker_;
|
| @@ -78,9 +85,10 @@ class CONTENT_EXPORT ContextProviderCommandBuffer
|
| MemoryPolicyChangedCallback memory_policy_changed_callback_;
|
|
|
| base::Lock main_thread_lock_;
|
| - bool destroyed_;
|
| + bool lost_;
|
|
|
| base::Lock context_lock_;
|
| + bool destroyed_;
|
|
|
| class LostContextCallbackProxy;
|
| scoped_ptr<LostContextCallbackProxy> lost_context_callback_proxy_;
|
|
|