OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_ | 5 #ifndef MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_ |
6 #define MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_ | 6 #define MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "cc/layers/video_frame_provider.h" | 10 #include "cc/layers/video_frame_provider.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 // TODO(scherkus): Investigate the inconsistency between the callbacks with | 37 // TODO(scherkus): Investigate the inconsistency between the callbacks with |
38 // respect to why we don't call |natural_size_changed_cb| on the first frame. | 38 // respect to why we don't call |natural_size_changed_cb| on the first frame. |
39 // I suspect it was for historical reasons that no longer make sense. | 39 // I suspect it was for historical reasons that no longer make sense. |
40 VideoFrameCompositor( | 40 VideoFrameCompositor( |
41 const base::Callback<void(gfx::Size)>& natural_size_changed_cb, | 41 const base::Callback<void(gfx::Size)>& natural_size_changed_cb, |
42 const base::Callback<void(bool)>& opacity_changed_cb); | 42 const base::Callback<void(bool)>& opacity_changed_cb); |
43 virtual ~VideoFrameCompositor(); | 43 virtual ~VideoFrameCompositor(); |
44 | 44 |
45 // cc::VideoFrameProvider implementation. | 45 // cc::VideoFrameProvider implementation. |
46 virtual void SetVideoFrameProviderClient( | 46 virtual void SetVideoFrameProviderClient( |
47 cc::VideoFrameProvider::Client* client) OVERRIDE; | 47 cc::VideoFrameProvider::Client* client) override; |
48 virtual scoped_refptr<VideoFrame> GetCurrentFrame() OVERRIDE; | 48 virtual scoped_refptr<VideoFrame> GetCurrentFrame() override; |
49 virtual void PutCurrentFrame( | 49 virtual void PutCurrentFrame( |
50 const scoped_refptr<VideoFrame>& frame) OVERRIDE; | 50 const scoped_refptr<VideoFrame>& frame) override; |
51 | 51 |
52 // Updates the current frame and notifies the compositor. | 52 // Updates the current frame and notifies the compositor. |
53 void UpdateCurrentFrame(const scoped_refptr<VideoFrame>& frame); | 53 void UpdateCurrentFrame(const scoped_refptr<VideoFrame>& frame); |
54 | 54 |
55 private: | 55 private: |
56 base::Callback<void(gfx::Size)> natural_size_changed_cb_; | 56 base::Callback<void(gfx::Size)> natural_size_changed_cb_; |
57 base::Callback<void(bool)> opacity_changed_cb_; | 57 base::Callback<void(bool)> opacity_changed_cb_; |
58 | 58 |
59 cc::VideoFrameProvider::Client* client_; | 59 cc::VideoFrameProvider::Client* client_; |
60 | 60 |
61 scoped_refptr<VideoFrame> current_frame_; | 61 scoped_refptr<VideoFrame> current_frame_; |
62 | 62 |
63 DISALLOW_COPY_AND_ASSIGN(VideoFrameCompositor); | 63 DISALLOW_COPY_AND_ASSIGN(VideoFrameCompositor); |
64 }; | 64 }; |
65 | 65 |
66 } // namespace media | 66 } // namespace media |
67 | 67 |
68 #endif // MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_ | 68 #endif // MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_ |
OLD | NEW |