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

Side by Side Diff: components/view_manager/surfaces/surfaces_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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_VIEW_MANAGER_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ 5 #ifndef COMPONENTS_VIEW_MANAGER_SURFACES_SURFACES_CONTEXT_PROVIDER_H_
6 #define COMPONENTS_VIEW_MANAGER_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ 6 #define COMPONENTS_VIEW_MANAGER_SURFACES_SURFACES_CONTEXT_PROVIDER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "base/threading/non_thread_safe.h" 10 #include "base/threading/non_thread_safe.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // cc::ContextProvider implementation. 45 // cc::ContextProvider implementation.
46 bool BindToCurrentThread() override; 46 bool BindToCurrentThread() override;
47 gpu::gles2::GLES2Interface* ContextGL() override; 47 gpu::gles2::GLES2Interface* ContextGL() override;
48 gpu::ContextSupport* ContextSupport() override; 48 gpu::ContextSupport* ContextSupport() override;
49 class GrContext* GrContext() override; 49 class GrContext* GrContext() override;
50 void InvalidateGrContext(uint32_t state) override; 50 void InvalidateGrContext(uint32_t state) override;
51 Capabilities ContextCapabilities() override; 51 Capabilities ContextCapabilities() override;
52 void VerifyContexts() override {} 52 void VerifyContexts() override {}
53 void DeleteCachedResources() override {} 53 void DeleteCachedResources() override {}
54 bool DestroyedOnMainThread() override; 54 bool HasBeenLostOnMainThread() override;
55 void SetLostContextCallback( 55 void SetLostContextCallback(
56 const LostContextCallback& lost_context_callback) override; 56 const LostContextCallback& lost_context_callback) override;
57 void SetMemoryPolicyChangedCallback( 57 void SetMemoryPolicyChangedCallback(
58 const MemoryPolicyChangedCallback& memory_policy_changed_callback) 58 const MemoryPolicyChangedCallback& memory_policy_changed_callback)
59 override {} 59 override {}
60 void SetupLock() override; 60 void SetupLock() override;
61 base::Lock* GetLock() override; 61 base::Lock* GetLock() override;
62 bool HasBeenDestroyed() override;
62 63
63 protected: 64 protected:
64 friend class base::RefCountedThreadSafe<SurfacesContextProvider>; 65 friend class base::RefCountedThreadSafe<SurfacesContextProvider>;
65 ~SurfacesContextProvider() override; 66 ~SurfacesContextProvider() override;
66 67
67 private: 68 private:
68 // CommandBufferLocalClient: 69 // CommandBufferLocalClient:
69 void UpdateVSyncParameters(int64_t timebase, int64_t interval) override; 70 void UpdateVSyncParameters(int64_t timebase, int64_t interval) override;
70 void DidLoseContext() override; 71 void DidLoseContext() override;
71 72
(...skipping 12 matching lines...) Expand all
84 scoped_ptr<gles2::CommandBufferLocal> command_buffer_local_; 85 scoped_ptr<gles2::CommandBufferLocal> command_buffer_local_;
85 86
86 base::Lock context_lock_; 87 base::Lock context_lock_;
87 88
88 DISALLOW_COPY_AND_ASSIGN(SurfacesContextProvider); 89 DISALLOW_COPY_AND_ASSIGN(SurfacesContextProvider);
89 }; 90 };
90 91
91 } // namespace surfaces 92 } // namespace surfaces
92 93
93 #endif // COMPONENTS_VIEW_MANAGER_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ 94 #endif // COMPONENTS_VIEW_MANAGER_SURFACES_SURFACES_CONTEXT_PROVIDER_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | components/view_manager/surfaces/surfaces_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698