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

Side by Side Diff: cc/debug/test_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: 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_DEBUG_TEST_CONTEXT_PROVIDER_H_ 5 #ifndef CC_DEBUG_TEST_CONTEXT_PROVIDER_H_
6 #define CC_DEBUG_TEST_CONTEXT_PROVIDER_H_ 6 #define CC_DEBUG_TEST_CONTEXT_PROVIDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 const MemoryPolicyChangedCallback& cb) OVERRIDE; 42 const MemoryPolicyChangedCallback& cb) OVERRIDE;
43 43
44 TestWebGraphicsContext3D* TestContext3d(); 44 TestWebGraphicsContext3D* TestContext3d();
45 45
46 // This returns the TestWebGraphicsContext3D but is valid to call 46 // This returns the TestWebGraphicsContext3D but is valid to call
47 // before the context is bound to a thread. This is needed to set up 47 // before the context is bound to a thread. This is needed to set up
48 // state on the test context before binding. Don't call 48 // state on the test context before binding. Don't call
49 // makeContextCurrent on the context returned from this method. 49 // makeContextCurrent on the context returned from this method.
50 TestWebGraphicsContext3D* UnboundTestContext3d(); 50 TestWebGraphicsContext3D* UnboundTestContext3d();
51 51
52 void SetMemoryAllocation(const ManagedMemoryPolicy& policy, 52 void SetMemoryAllocation(const ManagedMemoryPolicy& policy);
53 bool discard_backbuffer_when_not_visible);
54 53
55 void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes); 54 void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes);
56 55
57 protected: 56 protected:
58 TestContextProvider(scoped_ptr<TestWebGraphicsContext3D> context); 57 TestContextProvider(scoped_ptr<TestWebGraphicsContext3D> context);
59 virtual ~TestContextProvider(); 58 virtual ~TestContextProvider();
60 59
61 void OnLostContext(); 60 void OnLostContext();
62 void OnSwapBuffersComplete(); 61 void OnSwapBuffersComplete();
63 62
(...skipping 17 matching lines...) Expand all
81 80
82 class SwapBuffersCompleteCallbackProxy; 81 class SwapBuffersCompleteCallbackProxy;
83 scoped_ptr<SwapBuffersCompleteCallbackProxy> 82 scoped_ptr<SwapBuffersCompleteCallbackProxy>
84 swap_buffers_complete_callback_proxy_; 83 swap_buffers_complete_callback_proxy_;
85 }; 84 };
86 85
87 } // namespace cc 86 } // namespace cc
88 87
89 #endif // CC_DEBUG_TEST_CONTEXT_PROVIDER_H_ 88 #endif // CC_DEBUG_TEST_CONTEXT_PROVIDER_H_
90 89
OLDNEW
« no previous file with comments | « no previous file | cc/debug/test_context_provider.cc » ('j') | cc/trees/layer_tree_host_unittest_damage.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698