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

Side by Side Diff: cc/output/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 | « 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Delete all cached gpu resources. 87 // Delete all cached gpu resources.
88 virtual void DeleteCachedResources() = 0; 88 virtual void DeleteCachedResources() = 0;
89 89
90 // Sets a callback to be called when the context is lost. This should be 90 // Sets a callback to be called when the context is lost. This should be
91 // called from the same thread that the context is bound to. To avoid races, 91 // called from the same thread that the context is bound to. To avoid races,
92 // it should be called before BindToCurrentThread(). 92 // it should be called before BindToCurrentThread().
93 typedef base::Closure LostContextCallback; 93 typedef base::Closure LostContextCallback;
94 virtual void SetLostContextCallback( 94 virtual void SetLostContextCallback(
95 const LostContextCallback& lost_context_callback) = 0; 95 const LostContextCallback& lost_context_callback) = 0;
96 96
97 // Sets a callback to be called when the memory policy changes. This should be
98 // called from the same thread that the context is bound to.
99 typedef base::Callback<void(const ManagedMemoryPolicy& policy)>
100 MemoryPolicyChangedCallback;
101 virtual void SetMemoryPolicyChangedCallback(
102 const MemoryPolicyChangedCallback& memory_policy_changed_callback) = 0;
103
97 protected: 104 protected:
98 friend class base::RefCountedThreadSafe<ContextProvider>; 105 friend class base::RefCountedThreadSafe<ContextProvider>;
99 virtual ~ContextProvider() {} 106 virtual ~ContextProvider() {}
100 }; 107 };
101 108
102 } // namespace cc 109 } // namespace cc
103 110
104 #endif // CC_OUTPUT_CONTEXT_PROVIDER_H_ 111 #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