| 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 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/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 #include "base/threading/thread_checker.h" | 10 #include "base/threading/thread_checker.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 friend class base::RefCounted<VideoFrameProviderClientImpl>; | 61 friend class base::RefCounted<VideoFrameProviderClientImpl>; |
| 62 | 62 |
| 63 VideoFrameProviderClientImpl(VideoFrameProvider* provider, | 63 VideoFrameProviderClientImpl(VideoFrameProvider* provider, |
| 64 VideoFrameControllerClient* client); | 64 VideoFrameControllerClient* client); |
| 65 ~VideoFrameProviderClientImpl() override; | 65 ~VideoFrameProviderClientImpl() override; |
| 66 | 66 |
| 67 VideoFrameProvider* provider_; | 67 VideoFrameProvider* provider_; |
| 68 VideoFrameControllerClient* client_; | 68 VideoFrameControllerClient* client_; |
| 69 VideoLayerImpl* active_video_layer_; | 69 VideoLayerImpl* active_video_layer_; |
| 70 bool stopped_; | 70 bool stopped_; |
| 71 bool rendering_; |
| 71 | 72 |
| 72 // Since the provider lives on another thread, it can be destroyed while the | 73 // Since the provider lives on another thread, it can be destroyed while the |
| 73 // frame controller are accessing its frame. Before being destroyed the | 74 // frame controller are accessing its frame. Before being destroyed the |
| 74 // provider calls StopUsingProvider. provider_lock_ blocks StopUsingProvider | 75 // provider calls StopUsingProvider. provider_lock_ blocks StopUsingProvider |
| 75 // from returning until the frame controller is done using the frame. | 76 // from returning until the frame controller is done using the frame. |
| 76 base::Lock provider_lock_; | 77 base::Lock provider_lock_; |
| 77 base::ThreadChecker thread_checker_; | 78 base::ThreadChecker thread_checker_; |
| 78 | 79 |
| 79 gfx::Transform stream_texture_matrix_; | 80 gfx::Transform stream_texture_matrix_; |
| 80 | 81 |
| 81 DISALLOW_COPY_AND_ASSIGN(VideoFrameProviderClientImpl); | 82 DISALLOW_COPY_AND_ASSIGN(VideoFrameProviderClientImpl); |
| 82 }; | 83 }; |
| 83 | 84 |
| 84 } // namespace cc | 85 } // namespace cc |
| 85 | 86 |
| 86 #endif // CC_LAYERS_VIDEO_FRAME_PROVIDER_CLIENT_IMPL_H_ | 87 #endif // CC_LAYERS_VIDEO_FRAME_PROVIDER_CLIENT_IMPL_H_ |
| OLD | NEW |