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

Unified Diff: content/common/gpu/client/context_provider_command_buffer.h

Issue 1322853005: cc: Implement shared worker contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
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..8a886a0cb65348b36f38bfa6ecbeb4b8b5fad975 100644
--- a/content/common/gpu/client/context_provider_command_buffer.h
+++ b/content/common/gpu/client/context_provider_command_buffer.h
@@ -30,6 +30,14 @@ class CONTENT_EXPORT ContextProviderCommandBuffer
CommandBufferProxyImpl* GetCommandBufferProxy();
+ // Force the command buffer to be torn down as if the context was lost. The
+ // context can still be used just like in lost context situations but it is
+ // no longer bound to a specific thread so it is safe for the previously
+ // bound thread to drop any reference it has. 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;
@@ -63,6 +71,7 @@ class CONTENT_EXPORT ContextProviderCommandBuffer
private:
void InitializeCapabilities();
+ void DestroyWithMainThreadLockAcquired();
base::ThreadChecker main_thread_checker_;
base::ThreadChecker context_thread_checker_;

Powered by Google App Engine
This is Rietveld 408576698