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

Side by Side Diff: components/mus/public/cpp/context_provider.h

Issue 1412923004: Revert of Move gpu memory calculations to Compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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
« no previous file with comments | « cc/trees/layer_tree_settings.cc ('k') | components/mus/surfaces/surfaces_context_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_ 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_
6 #define COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_ 6 #define COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 12 matching lines...) Expand all
23 gpu::gles2::GLES2Interface* ContextGL() override; 23 gpu::gles2::GLES2Interface* ContextGL() override;
24 gpu::ContextSupport* ContextSupport() override; 24 gpu::ContextSupport* ContextSupport() override;
25 class GrContext* GrContext() override; 25 class GrContext* GrContext() override;
26 void InvalidateGrContext(uint32_t state) override; 26 void InvalidateGrContext(uint32_t state) override;
27 void SetupLock() override; 27 void SetupLock() override;
28 base::Lock* GetLock() override; 28 base::Lock* GetLock() override;
29 Capabilities ContextCapabilities() override; 29 Capabilities ContextCapabilities() override;
30 void DeleteCachedResources() override {} 30 void DeleteCachedResources() override {}
31 void SetLostContextCallback( 31 void SetLostContextCallback(
32 const LostContextCallback& lost_context_callback) override {} 32 const LostContextCallback& lost_context_callback) override {}
33 void SetMemoryPolicyChangedCallback(
34 const MemoryPolicyChangedCallback& memory_policy_changed_callback)
35 override {}
33 36
34 protected: 37 protected:
35 friend class base::RefCountedThreadSafe<ContextProvider>; 38 friend class base::RefCountedThreadSafe<ContextProvider>;
36 ~ContextProvider() override; 39 ~ContextProvider() override;
37 40
38 private: 41 private:
39 static void ContextLostThunk(void* closure) { 42 static void ContextLostThunk(void* closure) {
40 static_cast<ContextProvider*>(closure)->ContextLost(); 43 static_cast<ContextProvider*>(closure)->ContextLost();
41 } 44 }
42 void ContextLost(); 45 void ContextLost();
43 46
44 cc::ContextProvider::Capabilities capabilities_; 47 cc::ContextProvider::Capabilities capabilities_;
45 mojo::ScopedMessagePipeHandle command_buffer_handle_; 48 mojo::ScopedMessagePipeHandle command_buffer_handle_;
46 MojoGLES2Context context_; 49 MojoGLES2Context context_;
47 scoped_ptr<gpu::gles2::GLES2Interface> context_gl_; 50 scoped_ptr<gpu::gles2::GLES2Interface> context_gl_;
48 51
49 base::Lock context_lock_; 52 base::Lock context_lock_;
50 53
51 DISALLOW_COPY_AND_ASSIGN(ContextProvider); 54 DISALLOW_COPY_AND_ASSIGN(ContextProvider);
52 }; 55 };
53 56
54 } // namespace mus 57 } // namespace mus
55 58
56 #endif // COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_ 59 #endif // COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_settings.cc ('k') | components/mus/surfaces/surfaces_context_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698