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

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: 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 | « blimp/client/compositor/blimp_context_provider.cc ('k') | cc/output/output_surface.cc » ('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 (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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 virtual bool DestroyedOnMainThread() = 0; 97 virtual bool DestroyedOnMainThread() = 0;
98 98
99 // Sets a callback to be called when the context is lost. This should be 99 // Sets a callback to be called when the context is lost. This should be
100 // called from the same thread that the context is bound to. To avoid races, 100 // called from the same thread that the context is bound to. To avoid races,
101 // it should be called before BindToCurrentThread(), or VerifyContexts() 101 // it should be called before BindToCurrentThread(), or VerifyContexts()
102 // should be called after setting the callback. 102 // should be called after setting the callback.
103 typedef base::Closure LostContextCallback; 103 typedef base::Closure LostContextCallback;
104 virtual void SetLostContextCallback( 104 virtual void SetLostContextCallback(
105 const LostContextCallback& lost_context_callback) = 0; 105 const LostContextCallback& lost_context_callback) = 0;
106 106
107 // Sets a callback to be called when the memory policy changes. This should be
108 // called from the same thread that the context is bound to.
109 typedef base::Callback<void(const ManagedMemoryPolicy& policy)>
110 MemoryPolicyChangedCallback;
111 virtual void SetMemoryPolicyChangedCallback(
112 const MemoryPolicyChangedCallback& memory_policy_changed_callback) = 0;
113
114 protected: 107 protected:
115 friend class base::RefCountedThreadSafe<ContextProvider>; 108 friend class base::RefCountedThreadSafe<ContextProvider>;
116 virtual ~ContextProvider() {} 109 virtual ~ContextProvider() {}
117 }; 110 };
118 111
119 } // namespace cc 112 } // namespace cc
120 113
121 #endif // CC_OUTPUT_CONTEXT_PROVIDER_H_ 114 #endif // CC_OUTPUT_CONTEXT_PROVIDER_H_
OLDNEW
« no previous file with comments | « blimp/client/compositor/blimp_context_provider.cc ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698