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

Unified Diff: ui/compositor/test/in_process_context_provider.h

Issue 1317743002: cc: Implement shared worker contexts. (v1) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tear down 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
« no previous file with comments | « ui/compositor/test/in_process_context_factory.cc ('k') | ui/compositor/test/in_process_context_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/test/in_process_context_provider.h
diff --git a/ui/compositor/test/in_process_context_provider.h b/ui/compositor/test/in_process_context_provider.h
index 0f5f35f14123a1cebeb89f9ffd23b8d82424819d..8e236357249124071287d1c8ce7f686b2552f1e9 100644
--- a/ui/compositor/test/in_process_context_provider.h
+++ b/ui/compositor/test/in_process_context_provider.h
@@ -38,14 +38,7 @@ class InProcessContextProvider : public cc::ContextProvider {
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
gpu::ImageFactory* image_factory);
- private:
- InProcessContextProvider(
- const gpu::gles2::ContextCreationAttribHelper& attribs,
- gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
- gpu::ImageFactory* image_factory,
- gfx::AcceleratedWidget window,
- const std::string& debug_name);
- ~InProcessContextProvider() override;
+ void Destroy();
// cc::ContextProvider:
bool BindToCurrentThread() override;
@@ -59,12 +52,22 @@ class InProcessContextProvider : public cc::ContextProvider {
base::Lock* GetLock() 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;
+
+ private:
+ InProcessContextProvider(
+ const gpu::gles2::ContextCreationAttribHelper& attribs,
+ gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
+ gpu::ImageFactory* image_factory,
+ gfx::AcceleratedWidget window,
+ const std::string& debug_name);
+ ~InProcessContextProvider() override;
void OnLostContext();
@@ -83,10 +86,11 @@ class InProcessContextProvider : public cc::ContextProvider {
LostContextCallback lost_context_callback_;
- base::Lock destroyed_lock_;
- bool destroyed_;
+ base::Lock lost_lock_;
+ bool lost_;
base::Lock context_lock_;
+ bool destroyed_;
DISALLOW_COPY_AND_ASSIGN(InProcessContextProvider);
};
« no previous file with comments | « ui/compositor/test/in_process_context_factory.cc ('k') | ui/compositor/test/in_process_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698