| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |