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

Side by Side Diff: cc/output/context_provider.h

Issue 1324413003: Move gpu memory calculations to Compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove more memory alloc codes. 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
« no previous file with comments | « no previous file | cc/output/output_surface.cc » ('j') | cc/test/test_context_provider.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 CC_OUTPUT_CONTEXT_PROVIDER_H_ 5 #ifndef CC_OUTPUT_CONTEXT_PROVIDER_H_
6 #define CC_OUTPUT_CONTEXT_PROVIDER_H_ 6 #define CC_OUTPUT_CONTEXT_PROVIDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // called from the same thread that the context is bound to. To avoid races, 96 // called from the same thread that the context is bound to. To avoid races,
97 // it should be called before BindToCurrentThread(), or VerifyContexts() 97 // it should be called before BindToCurrentThread(), or VerifyContexts()
98 // should be called after setting the callback. 98 // should be called after setting the callback.
99 typedef base::Closure LostContextCallback; 99 typedef base::Closure LostContextCallback;
100 virtual void SetLostContextCallback( 100 virtual void SetLostContextCallback(
101 const LostContextCallback& lost_context_callback) = 0; 101 const LostContextCallback& lost_context_callback) = 0;
102 102
103 // Sets a callback to be called when the memory policy changes. This should be 103 // Sets a callback to be called when the memory policy changes. This should be
104 // called from the same thread that the context is bound to. 104 // called from the same thread that the context is bound to.
105 typedef base::Callback<void(const ManagedMemoryPolicy& policy)> 105 typedef base::Callback<void(const ManagedMemoryPolicy& policy)>
106 MemoryPolicyChangedCallback; 106 MemoryPolicyChangedCallback;
piman 2015/09/24 21:34:08 nit: remove this, since it shouldn't be used anymo
sohanjg 2015/09/28 07:35:49 Done.
107 virtual void SetMemoryPolicyChangedCallback(
108 const MemoryPolicyChangedCallback& memory_policy_changed_callback) = 0;
109 107
110 protected: 108 protected:
111 friend class base::RefCountedThreadSafe<ContextProvider>; 109 friend class base::RefCountedThreadSafe<ContextProvider>;
112 virtual ~ContextProvider() {} 110 virtual ~ContextProvider() {}
113 }; 111 };
114 112
115 } // namespace cc 113 } // namespace cc
116 114
117 #endif // CC_OUTPUT_CONTEXT_PROVIDER_H_ 115 #endif // CC_OUTPUT_CONTEXT_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/output/output_surface.cc » ('j') | cc/test/test_context_provider.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698