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 |
50 protected: | 53 protected: |
51 virtual ~Client() {} | 54 virtual ~Client() {} |
52 }; | 55 }; |
53 | 56 |
54 // May be called from any thread, but there must be some external guarantee | 57 // May be called from any thread, but there must be some external guarantee |
55 // that the provider is not destroyed before this call returns. | 58 // that the provider is not destroyed before this call returns. |
56 virtual void SetVideoFrameProviderClient(Client* client) = 0; | 59 virtual void SetVideoFrameProviderClient(Client* client) = 0; |
57 | 60 |
58 // Called by the client on a regular interval. Returns true if a new frame | 61 // Called by the client on a regular interval. Returns true if a new frame |
59 // will be available via GetCurrentFrame() which should be displayed within | 62 // will be available via GetCurrentFrame() which should be displayed within |
(...skipping 27 matching lines...) Expand all Loading... |
87 // frame missed its intended deadline. | 90 // frame missed its intended deadline. |
88 virtual void PutCurrentFrame() = 0; | 91 virtual void PutCurrentFrame() = 0; |
89 | 92 |
90 protected: | 93 protected: |
91 virtual ~VideoFrameProvider() {} | 94 virtual ~VideoFrameProvider() {} |
92 }; | 95 }; |
93 | 96 |
94 } // namespace cc | 97 } // namespace cc |
95 | 98 |
96 #endif // CC_LAYERS_VIDEO_FRAME_PROVIDER_H_ | 99 #endif // CC_LAYERS_VIDEO_FRAME_PROVIDER_H_ |
OLD | NEW |