| 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 CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_CLIENT_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_CLIENT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_CLIENT_H_ |
| 7 | 7 |
| 8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 | 11 |
| 12 class CONTENT_EXPORT CompositorClient { | 12 class CONTENT_EXPORT CompositorClient { |
| 13 public: | 13 public: |
| 14 // Gives the client a chance for layout changes before compositing. | 14 // Gives the client a chance for layout changes before compositing. |
| 15 virtual void Layout() {} | 15 virtual void Layout() {} |
| 16 | 16 |
| 17 // The compositor has completed swapping a frame. | 17 // The compositor has completed swapping a frame. |
| 18 virtual void OnSwapBuffersCompleted(int pending_swap_buffers) {} | 18 virtual void OnSwapBuffersCompleted(int pending_swap_buffers) {} |
| 19 | 19 |
| 20 // Tells the client that GL resources were lost and need to be reinitialized. | 20 // Tells the client that GL resources were lost and need to be reinitialized. |
| 21 virtual void DidLoseResources() {} | 21 virtual void DidLoseResources() {} |
| 22 | 22 |
| 23 // Tells the client that UI resources were lost and need to be reinitialized. | |
| 24 virtual void DidLoseUIResources() {} | |
| 25 | |
| 26 // Mark the UI Resources as being invalid for use. | |
| 27 virtual void UIResourcesAreInvalid() {} | |
| 28 | |
| 29 protected: | 23 protected: |
| 30 CompositorClient() {} | 24 CompositorClient() {} |
| 31 virtual ~CompositorClient() {} | 25 virtual ~CompositorClient() {} |
| 32 | 26 |
| 33 private: | 27 private: |
| 34 DISALLOW_COPY_AND_ASSIGN(CompositorClient); | 28 DISALLOW_COPY_AND_ASSIGN(CompositorClient); |
| 35 }; | 29 }; |
| 36 | 30 |
| 37 } // namespace content | 31 } // namespace content |
| 38 | 32 |
| 39 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_CLIENT_H_ | 33 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_CLIENT_H_ |
| OLD | NEW |