| 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_TEST_TEST_CONTEXT_PROVIDER_H_ | 5 #ifndef CC_TEST_TEST_CONTEXT_PROVIDER_H_ |
| 6 #define CC_TEST_TEST_CONTEXT_PROVIDER_H_ | 6 #define CC_TEST_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 29 matching lines...) Expand all Loading... |
| 40 const MemoryPolicyChangedCallback& cb) OVERRIDE; | 40 const MemoryPolicyChangedCallback& cb) OVERRIDE; |
| 41 | 41 |
| 42 TestWebGraphicsContext3D* TestContext3d(); | 42 TestWebGraphicsContext3D* TestContext3d(); |
| 43 | 43 |
| 44 // This returns the TestWebGraphicsContext3D but is valid to call | 44 // This returns the TestWebGraphicsContext3D but is valid to call |
| 45 // before the context is bound to a thread. This is needed to set up | 45 // before the context is bound to a thread. This is needed to set up |
| 46 // state on the test context before binding. Don't call | 46 // state on the test context before binding. Don't call |
| 47 // makeContextCurrent on the context returned from this method. | 47 // makeContextCurrent on the context returned from this method. |
| 48 TestWebGraphicsContext3D* UnboundTestContext3d(); | 48 TestWebGraphicsContext3D* UnboundTestContext3d(); |
| 49 | 49 |
| 50 void SetMemoryAllocation(const ManagedMemoryPolicy& policy, | 50 void SetMemoryAllocation(const ManagedMemoryPolicy& policy); |
| 51 bool discard_backbuffer_when_not_visible); | |
| 52 | 51 |
| 53 void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes); | 52 void SetMaxTransferBufferUsageBytes(size_t max_transfer_buffer_usage_bytes); |
| 54 | 53 |
| 55 protected: | 54 protected: |
| 56 explicit TestContextProvider(scoped_ptr<TestWebGraphicsContext3D> context); | 55 explicit TestContextProvider(scoped_ptr<TestWebGraphicsContext3D> context); |
| 57 virtual ~TestContextProvider(); | 56 virtual ~TestContextProvider(); |
| 58 | 57 |
| 59 void OnLostContext(); | 58 void OnLostContext(); |
| 60 void OnSwapBuffersComplete(); | 59 void OnSwapBuffersComplete(); |
| 61 | 60 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 79 | 78 |
| 80 class SwapBuffersCompleteCallbackProxy; | 79 class SwapBuffersCompleteCallbackProxy; |
| 81 scoped_ptr<SwapBuffersCompleteCallbackProxy> | 80 scoped_ptr<SwapBuffersCompleteCallbackProxy> |
| 82 swap_buffers_complete_callback_proxy_; | 81 swap_buffers_complete_callback_proxy_; |
| 83 }; | 82 }; |
| 84 | 83 |
| 85 } // namespace cc | 84 } // namespace cc |
| 86 | 85 |
| 87 #endif // CC_TEST_TEST_CONTEXT_PROVIDER_H_ | 86 #endif // CC_TEST_TEST_CONTEXT_PROVIDER_H_ |
| 88 | 87 |
| OLD | NEW |