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

Side by Side Diff: cc/debug/test_context_provider.h

Issue 22900018: cc: Set the mapped memory reclaim limit for the renderer compositor on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set the limit in the unittest Created 7 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
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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); 53 bool discard_backbuffer_when_not_visible);
54 54
55 void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes);
56
55 protected: 57 protected:
56 TestContextProvider(); 58 TestContextProvider();
57 virtual ~TestContextProvider(); 59 virtual ~TestContextProvider();
58 60
59 bool InitializeOnMainThread(const CreateCallback& create_callback); 61 bool InitializeOnMainThread(const CreateCallback& create_callback);
60 62
61 void OnLostContext(); 63 void OnLostContext();
62 void OnSwapBuffersComplete(); 64 void OnSwapBuffersComplete();
63 65
64 scoped_ptr<TestWebGraphicsContext3D> context3d_; 66 scoped_ptr<TestWebGraphicsContext3D> context3d_;
(...skipping 14 matching lines...) Expand all
79 81
80 class SwapBuffersCompleteCallbackProxy; 82 class SwapBuffersCompleteCallbackProxy;
81 scoped_ptr<SwapBuffersCompleteCallbackProxy> 83 scoped_ptr<SwapBuffersCompleteCallbackProxy>
82 swap_buffers_complete_callback_proxy_; 84 swap_buffers_complete_callback_proxy_;
83 }; 85 };
84 86
85 } // namespace cc 87 } // namespace cc
86 88
87 #endif // CC_DEBUG_TEST_CONTEXT_PROVIDER_H_ 89 #endif // CC_DEBUG_TEST_CONTEXT_PROVIDER_H_
88 90
OLDNEW
« no previous file with comments | « no previous file | cc/debug/test_context_provider.cc » ('j') | cc/debug/test_web_graphics_context_3d.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698