| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_TREES_LAYER_TREE_HOST_CLIENT_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_CLIENT_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_CLIENT_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 virtual void DidCompleteSwapBuffers() = 0; | 37 virtual void DidCompleteSwapBuffers() = 0; |
| 38 | 38 |
| 39 // Used only in the single-threaded path. | 39 // Used only in the single-threaded path. |
| 40 virtual void ScheduleComposite() = 0; | 40 virtual void ScheduleComposite() = 0; |
| 41 | 41 |
| 42 // If the client provides an OutputSurface bound to a 3d context for direct | 42 // If the client provides an OutputSurface bound to a 3d context for direct |
| 43 // rendering, this must return a provider that provides contexts usable from | 43 // rendering, this must return a provider that provides contexts usable from |
| 44 // the same thread as the OutputSurface's context. | 44 // the same thread as the OutputSurface's context. |
| 45 virtual scoped_refptr<cc::ContextProvider> OffscreenContextProvider() = 0; | 45 virtual scoped_refptr<cc::ContextProvider> OffscreenContextProvider() = 0; |
| 46 | 46 |
| 47 // Requests that the client insert a rate limiting token in the shared main |
| 48 // thread context's command stream that will block if the context gets too far |
| 49 // ahead of the compositor's command stream. Only needed if the tree contains |
| 50 // a TextureLayer that calls SetRateLimitContext(true). |
| 51 virtual void RateLimitSharedMainThreadContext() {} |
| 52 |
| 47 // This hook is for testing. | 53 // This hook is for testing. |
| 48 virtual void DidFailToInitializeOutputSurface() {} | 54 virtual void DidFailToInitializeOutputSurface() {} |
| 49 | 55 |
| 50 protected: | 56 protected: |
| 51 virtual ~LayerTreeHostClient() {} | 57 virtual ~LayerTreeHostClient() {} |
| 52 }; | 58 }; |
| 53 | 59 |
| 54 } // namespace cc | 60 } // namespace cc |
| 55 | 61 |
| 56 #endif // CC_TREES_LAYER_TREE_HOST_CLIENT_H_ | 62 #endif // CC_TREES_LAYER_TREE_HOST_CLIENT_H_ |
| OLD | NEW |