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 "base/macros.h" | 8 #include "base/macros.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 class CONTENT_EXPORT CompositorClient { | 13 class CONTENT_EXPORT CompositorClient { |
14 public: | 14 public: |
15 // Gives the client a chance to update the layer tree host before compositing. | 15 // Gives the client a chance to update the layer tree host before compositing. |
16 virtual void UpdateLayerTreeHost() {} | 16 virtual void UpdateLayerTreeHost() {} |
17 | 17 |
18 // The compositor has completed swapping a frame. This is a subset of | 18 // The compositor has completed swapping a frame. |
19 // DidSwapBuffers and corresponds only to frames where Compositor submits a | |
20 // new frame. | |
21 virtual void DidSwapFrame(int pending_frames) {} | 19 virtual void DidSwapFrame(int pending_frames) {} |
22 | 20 |
23 // This is called on all swap buffers, regardless of cause. | |
24 virtual void DidSwapBuffers() {} | |
25 | |
26 protected: | 21 protected: |
27 CompositorClient() {} | 22 CompositorClient() {} |
28 virtual ~CompositorClient() {} | 23 virtual ~CompositorClient() {} |
29 | 24 |
30 private: | 25 private: |
31 DISALLOW_COPY_AND_ASSIGN(CompositorClient); | 26 DISALLOW_COPY_AND_ASSIGN(CompositorClient); |
32 }; | 27 }; |
33 | 28 |
34 } // namespace content | 29 } // namespace content |
35 | 30 |
36 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_CLIENT_H_ | 31 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_CLIENT_H_ |
OLD | NEW |