| 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 REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_ | 5 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_ |
| 6 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_ | 6 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 void OnViewChanged(const pp::View& view) override; | 51 void OnViewChanged(const pp::View& view) override; |
| 52 void EnableDebugDirtyRegion(bool enable) override; | 52 void EnableDebugDirtyRegion(bool enable) override; |
| 53 | 53 |
| 54 // VideoRenderer interface. | 54 // VideoRenderer interface. |
| 55 void OnSessionConfig(const protocol::SessionConfig& config) override; | 55 void OnSessionConfig(const protocol::SessionConfig& config) override; |
| 56 protocol::VideoStub* GetVideoStub() override; | 56 protocol::VideoStub* GetVideoStub() override; |
| 57 protocol::FrameConsumer* GetFrameConsumer() override; | 57 protocol::FrameConsumer* GetFrameConsumer() override; |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 // protocol::FrameConsumer implementation. | 60 // protocol::FrameConsumer implementation. |
| 61 scoped_ptr<webrtc::DesktopFrame> AllocateFrame( | 61 std::unique_ptr<webrtc::DesktopFrame> AllocateFrame( |
| 62 const webrtc::DesktopSize& size) override; | 62 const webrtc::DesktopSize& size) override; |
| 63 void DrawFrame(scoped_ptr<webrtc::DesktopFrame> frame, | 63 void DrawFrame(std::unique_ptr<webrtc::DesktopFrame> frame, |
| 64 const base::Closure& done) override; | 64 const base::Closure& done) override; |
| 65 PixelFormat GetPixelFormat() override; | 65 PixelFormat GetPixelFormat() override; |
| 66 | 66 |
| 67 | 67 |
| 68 void Flush(); | 68 void Flush(); |
| 69 void OnFlushDone(int result); | 69 void OnFlushDone(int result); |
| 70 | 70 |
| 71 // Parameters passed to Initialize(). | 71 // Parameters passed to Initialize(). |
| 72 pp::Instance* instance_ = nullptr; | 72 pp::Instance* instance_ = nullptr; |
| 73 EventHandler* event_handler_ = nullptr; | 73 EventHandler* event_handler_ = nullptr; |
| 74 | 74 |
| 75 pp::Graphics2D graphics2d_; | 75 pp::Graphics2D graphics2d_; |
| 76 | 76 |
| 77 scoped_ptr<SoftwareVideoRenderer> software_video_renderer_; | 77 std::unique_ptr<SoftwareVideoRenderer> software_video_renderer_; |
| 78 | 78 |
| 79 // View size in output pixels. | 79 // View size in output pixels. |
| 80 webrtc::DesktopSize view_size_; | 80 webrtc::DesktopSize view_size_; |
| 81 | 81 |
| 82 // Size of the most recent source frame in pixels. | 82 // Size of the most recent source frame in pixels. |
| 83 webrtc::DesktopSize source_size_; | 83 webrtc::DesktopSize source_size_; |
| 84 | 84 |
| 85 // Done callbacks for the frames that have been painted but not flushed. | 85 // Done callbacks for the frames that have been painted but not flushed. |
| 86 ScopedVector<base::ScopedClosureRunner> pending_frames_done_callbacks_; | 86 ScopedVector<base::ScopedClosureRunner> pending_frames_done_callbacks_; |
| 87 | 87 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 104 | 104 |
| 105 pp::CompletionCallbackFactory<PepperVideoRenderer2D> callback_factory_; | 105 pp::CompletionCallbackFactory<PepperVideoRenderer2D> callback_factory_; |
| 106 base::WeakPtrFactory<PepperVideoRenderer2D> weak_factory_; | 106 base::WeakPtrFactory<PepperVideoRenderer2D> weak_factory_; |
| 107 | 107 |
| 108 DISALLOW_COPY_AND_ASSIGN(PepperVideoRenderer2D); | 108 DISALLOW_COPY_AND_ASSIGN(PepperVideoRenderer2D); |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 } // namespace remoting | 111 } // namespace remoting |
| 112 | 112 |
| 113 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_ | 113 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_ |
| OLD | NEW |