OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |