| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CONTENT_PUBLIC_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_CLIENT_H_ |
| 6 #define CONTENT_PUBLIC_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_CLIENT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 | 11 |
| 12 class SynchronousCompositor; | 12 class SynchronousCompositor; |
| 13 | 13 |
| 14 class SynchronousCompositorClient { | 14 class SynchronousCompositorClient { |
| 15 public: | 15 public: |
| 16 // Indication to the client that |compositor| is now initialized on the |
| 17 // compositor thread, and open for business. |
| 18 virtual void DidInitializeCompositor(SynchronousCompositor* compositor) = 0; |
| 19 |
| 16 // Indication to the client that |compositor| is going out of scope, and | 20 // Indication to the client that |compositor| is going out of scope, and |
| 17 // must not be accessed within or after this call. | 21 // must not be accessed within or after this call. |
| 18 // NOTE if the client goes away before the compositor it must call | 22 // NOTE if the client goes away before the compositor it must call |
| 19 // SynchronousCompositor::SetClient(NULL) to release the back pointer. | 23 // SynchronousCompositor::SetClient(NULL) to release the back pointer. |
| 20 virtual void DidDestroyCompositor(SynchronousCompositor* compositor) = 0; | 24 virtual void DidDestroyCompositor(SynchronousCompositor* compositor) = 0; |
| 21 | 25 |
| 22 // TODO(joth): Add scroll getters and setters. | 26 // TODO(joth): Add scroll getters and setters. |
| 23 | 27 |
| 24 // When true, should periodically call | 28 // When true, should periodically call |
| 25 // SynchronousCompositorOutputSurface::DemandDrawHw. Note that this value | 29 // SynchronousCompositorOutputSurface::DemandDrawHw. Note that this value |
| 26 // can change inside DemandDrawHw call. | 30 // can change inside DemandDrawHw call. |
| 27 virtual void SetContinuousInvalidate(bool invalidate) = 0; | 31 virtual void SetContinuousInvalidate(bool invalidate) = 0; |
| 28 | 32 |
| 29 protected: | 33 protected: |
| 30 SynchronousCompositorClient() {} | 34 SynchronousCompositorClient() {} |
| 31 virtual ~SynchronousCompositorClient() {} | 35 virtual ~SynchronousCompositorClient() {} |
| 32 | 36 |
| 33 private: | 37 private: |
| 34 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorClient); | 38 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorClient); |
| 35 }; | 39 }; |
| 36 | 40 |
| 37 } // namespace content | 41 } // namespace content |
| 38 | 42 |
| 39 #endif // CONTENT_PUBLIC_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_CLIENT_H_ | 43 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_CLIENT_H_ |
| OLD | NEW |