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

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

Issue 1324413003: Move gpu memory calculations to Compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment + android_arm64_dbg_recipe bot issue. Created 5 years, 2 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
« 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 MOJO_CC_CONTEXT_PROVIDER_MOJO_H_ 5 #ifndef MOJO_CC_CONTEXT_PROVIDER_MOJO_H_
6 #define MOJO_CC_CONTEXT_PROVIDER_MOJO_H_ 6 #define MOJO_CC_CONTEXT_PROVIDER_MOJO_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 14 matching lines...) Expand all
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 VerifyContexts() override {} 30 void VerifyContexts() override {}
31 void DeleteCachedResources() override {} 31 void DeleteCachedResources() override {}
32 bool DestroyedOnMainThread() override; 32 bool DestroyedOnMainThread() override;
33 void SetLostContextCallback( 33 void SetLostContextCallback(
34 const LostContextCallback& lost_context_callback) override {} 34 const LostContextCallback& lost_context_callback) override {}
35 void SetMemoryPolicyChangedCallback(
36 const MemoryPolicyChangedCallback& memory_policy_changed_callback)
37 override {}
38 35
39 protected: 36 protected:
40 friend class base::RefCountedThreadSafe<ContextProvider>; 37 friend class base::RefCountedThreadSafe<ContextProvider>;
41 ~ContextProvider() override; 38 ~ContextProvider() override;
42 39
43 private: 40 private:
44 static void ContextLostThunk(void* closure) { 41 static void ContextLostThunk(void* closure) {
45 static_cast<ContextProvider*>(closure)->ContextLost(); 42 static_cast<ContextProvider*>(closure)->ContextLost();
46 } 43 }
47 void ContextLost(); 44 void ContextLost();
48 45
49 cc::ContextProvider::Capabilities capabilities_; 46 cc::ContextProvider::Capabilities capabilities_;
50 mojo::ScopedMessagePipeHandle command_buffer_handle_; 47 mojo::ScopedMessagePipeHandle command_buffer_handle_;
51 MojoGLES2Context context_; 48 MojoGLES2Context context_;
52 scoped_ptr<gpu::gles2::GLES2Interface> context_gl_; 49 scoped_ptr<gpu::gles2::GLES2Interface> context_gl_;
53 50
54 base::Lock context_lock_; 51 base::Lock context_lock_;
55 52
56 DISALLOW_COPY_AND_ASSIGN(ContextProvider); 53 DISALLOW_COPY_AND_ASSIGN(ContextProvider);
57 }; 54 };
58 55
59 } // namespace mus 56 } // namespace mus
60 57
61 #endif // MOJO_CC_CONTEXT_PROVIDER_MOJO_H_ 58 #endif // MOJO_CC_CONTEXT_PROVIDER_MOJO_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