OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_LAYERS_VIDEO_FRAME_PROVIDER_H_ | 5 #ifndef CC_LAYERS_VIDEO_FRAME_PROVIDER_H_ |
6 #define CC_LAYERS_VIDEO_FRAME_PROVIDER_H_ | 6 #define CC_LAYERS_VIDEO_FRAME_PROVIDER_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 // longer expects (respectively) to have new frames for the client. Clients | 40 // longer expects (respectively) to have new frames for the client. Clients |
41 // may use this information for power conservation. | 41 // may use this information for power conservation. |
42 virtual void StartRendering() = 0; | 42 virtual void StartRendering() = 0; |
43 virtual void StopRendering() = 0; | 43 virtual void StopRendering() = 0; |
44 | 44 |
45 // Notifies the client that GetCurrentFrame() will return new data. | 45 // Notifies the client that GetCurrentFrame() will return new data. |
46 // TODO(dalecurtis): Nuke this once VideoFrameProviderClientImpl is using a | 46 // TODO(dalecurtis): Nuke this once VideoFrameProviderClientImpl is using a |
47 // BeginFrameObserver based approach. http://crbug.com/336733 | 47 // BeginFrameObserver based approach. http://crbug.com/336733 |
48 virtual void DidReceiveFrame() = 0; | 48 virtual void DidReceiveFrame() = 0; |
49 | 49 |
50 // Notifies the client of a new UV transform matrix to be used. | |
51 virtual void DidUpdateMatrix(const float* matrix) = 0; | |
52 | |
53 protected: | 50 protected: |
54 virtual ~Client() {} | 51 virtual ~Client() {} |
55 }; | 52 }; |
56 | 53 |
57 // May be called from any thread, but there must be some external guarantee | 54 // May be called from any thread, but there must be some external guarantee |
58 // that the provider is not destroyed before this call returns. | 55 // that the provider is not destroyed before this call returns. |
59 virtual void SetVideoFrameProviderClient(Client* client) = 0; | 56 virtual void SetVideoFrameProviderClient(Client* client) = 0; |
60 | 57 |
61 // Called by the client on a regular interval. Returns true if a new frame | 58 // Called by the client on a regular interval. Returns true if a new frame |
62 // will be available via GetCurrentFrame() which should be displayed within | 59 // will be available via GetCurrentFrame() which should be displayed within |
(...skipping 27 matching lines...) Expand all Loading... |
90 // frame missed its intended deadline. | 87 // frame missed its intended deadline. |
91 virtual void PutCurrentFrame() = 0; | 88 virtual void PutCurrentFrame() = 0; |
92 | 89 |
93 protected: | 90 protected: |
94 virtual ~VideoFrameProvider() {} | 91 virtual ~VideoFrameProvider() {} |
95 }; | 92 }; |
96 | 93 |
97 } // namespace cc | 94 } // namespace cc |
98 | 95 |
99 #endif // CC_LAYERS_VIDEO_FRAME_PROVIDER_H_ | 96 #endif // CC_LAYERS_VIDEO_FRAME_PROVIDER_H_ |
OLD | NEW |