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

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

Issue 53633003: Do not give GPU memory to backgrounded compositors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove test Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/output/delegating_renderer.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 (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 "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 const LostContextCallback& lost_context_callback) = 0; 71 const LostContextCallback& lost_context_callback) = 0;
72 72
73 // Sets a callback to be called when swap buffers completes. This should be 73 // Sets a callback to be called when swap buffers completes. This should be
74 // called from the same thread that the context is bound to. 74 // called from the same thread that the context is bound to.
75 typedef base::Closure SwapBuffersCompleteCallback; 75 typedef base::Closure SwapBuffersCompleteCallback;
76 virtual void SetSwapBuffersCompleteCallback( 76 virtual void SetSwapBuffersCompleteCallback(
77 const SwapBuffersCompleteCallback& swap_buffers_complete_callback) = 0; 77 const SwapBuffersCompleteCallback& swap_buffers_complete_callback) = 0;
78 78
79 // Sets a callback to be called when the memory policy changes. This should be 79 // Sets a callback to be called when the memory policy changes. This should be
80 // called from the same thread that the context is bound to. 80 // called from the same thread that the context is bound to.
81 typedef base::Callback<void( 81 typedef base::Callback<void(const cc::ManagedMemoryPolicy& policy)>
82 const cc::ManagedMemoryPolicy& policy, 82 MemoryPolicyChangedCallback;
83 bool discard_backbuffer_when_not_visible)> MemoryPolicyChangedCallback;
84 virtual void SetMemoryPolicyChangedCallback( 83 virtual void SetMemoryPolicyChangedCallback(
85 const MemoryPolicyChangedCallback& memory_policy_changed_callback) = 0; 84 const MemoryPolicyChangedCallback& memory_policy_changed_callback) = 0;
86 85
87 protected: 86 protected:
88 friend class base::RefCountedThreadSafe<ContextProvider>; 87 friend class base::RefCountedThreadSafe<ContextProvider>;
89 virtual ~ContextProvider() {} 88 virtual ~ContextProvider() {}
90 }; 89 };
91 90
92 } // namespace cc 91 } // namespace cc
93 92
94 #endif // CC_OUTPUT_CONTEXT_PROVIDER_H_ 93 #endif // CC_OUTPUT_CONTEXT_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/output/delegating_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698