Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: cc/layers/video_frame_provider_client_impl.h

Issue 1848923003: Revert of Make Android StreamTexture implement GLStreamTextureImage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/video_frame_provider.h ('k') | cc/layers/video_frame_provider_client_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CC_LAYERS_VIDEO_FRAME_PROVIDER_CLIENT_IMPL_H_ 5 #ifndef CC_LAYERS_VIDEO_FRAME_PROVIDER_CLIENT_IMPL_H_
6 #define CC_LAYERS_VIDEO_FRAME_PROVIDER_CLIENT_IMPL_H_ 6 #define CC_LAYERS_VIDEO_FRAME_PROVIDER_CLIENT_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 27 matching lines...) Expand all
38 38
39 bool Stopped() const; 39 bool Stopped() const;
40 // Must be called on the impl thread while the main thread is blocked. 40 // Must be called on the impl thread while the main thread is blocked.
41 void Stop(); 41 void Stop();
42 42
43 scoped_refptr<media::VideoFrame> AcquireLockAndCurrentFrame(); 43 scoped_refptr<media::VideoFrame> AcquireLockAndCurrentFrame();
44 void PutCurrentFrame(); 44 void PutCurrentFrame();
45 void ReleaseLock(); 45 void ReleaseLock();
46 bool HasCurrentFrame(); 46 bool HasCurrentFrame();
47 47
48 const gfx::Transform& StreamTextureMatrix() const;
49
48 // VideoFrameController implementation. 50 // VideoFrameController implementation.
49 void OnBeginFrame(const BeginFrameArgs& args) override; 51 void OnBeginFrame(const BeginFrameArgs& args) override;
50 void DidDrawFrame() override; 52 void DidDrawFrame() override;
51 53
52 // VideoFrameProvider::Client implementation. 54 // VideoFrameProvider::Client implementation.
53 // Called on the main thread. 55 // Called on the main thread.
54 void StopUsingProvider() override; 56 void StopUsingProvider() override;
55 // Called on the impl thread. 57 // Called on the impl thread.
56 void StartRendering() override; 58 void StartRendering() override;
57 void StopRendering() override; 59 void StopRendering() override;
58 void DidReceiveFrame() override; 60 void DidReceiveFrame() override;
61 void DidUpdateMatrix(const float* matrix) override;
59 62
60 const VideoFrameProvider* get_provider_for_testing() const { 63 const VideoFrameProvider* get_provider_for_testing() const {
61 return provider_; 64 return provider_;
62 } 65 }
63 66
64 private: 67 private:
65 friend class base::RefCounted<VideoFrameProviderClientImpl>; 68 friend class base::RefCounted<VideoFrameProviderClientImpl>;
66 69
67 VideoFrameProviderClientImpl(VideoFrameProvider* provider, 70 VideoFrameProviderClientImpl(VideoFrameProvider* provider,
68 VideoFrameControllerClient* client); 71 VideoFrameControllerClient* client);
69 ~VideoFrameProviderClientImpl() override; 72 ~VideoFrameProviderClientImpl() override;
70 73
71 VideoFrameProvider* provider_; 74 VideoFrameProvider* provider_;
72 VideoFrameControllerClient* client_; 75 VideoFrameControllerClient* client_;
73 VideoLayerImpl* active_video_layer_; 76 VideoLayerImpl* active_video_layer_;
74 bool stopped_; 77 bool stopped_;
75 bool rendering_; 78 bool rendering_;
76 bool needs_put_current_frame_; 79 bool needs_put_current_frame_;
77 80
78 // Since the provider lives on another thread, it can be destroyed while the 81 // Since the provider lives on another thread, it can be destroyed while the
79 // frame controller are accessing its frame. Before being destroyed the 82 // frame controller are accessing its frame. Before being destroyed the
80 // provider calls StopUsingProvider. provider_lock_ blocks StopUsingProvider 83 // provider calls StopUsingProvider. provider_lock_ blocks StopUsingProvider
81 // from returning until the frame controller is done using the frame. 84 // from returning until the frame controller is done using the frame.
82 base::Lock provider_lock_; 85 base::Lock provider_lock_;
83 base::ThreadChecker thread_checker_; 86 base::ThreadChecker thread_checker_;
84 87
88 gfx::Transform stream_texture_matrix_;
89
85 DISALLOW_COPY_AND_ASSIGN(VideoFrameProviderClientImpl); 90 DISALLOW_COPY_AND_ASSIGN(VideoFrameProviderClientImpl);
86 }; 91 };
87 92
88 } // namespace cc 93 } // namespace cc
89 94
90 #endif // CC_LAYERS_VIDEO_FRAME_PROVIDER_CLIENT_IMPL_H_ 95 #endif // CC_LAYERS_VIDEO_FRAME_PROVIDER_CLIENT_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/video_frame_provider.h ('k') | cc/layers/video_frame_provider_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698