| 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_3D_H_ | 5 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_3D_H_ |
| 6 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_3D_H_ | 6 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_3D_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "ppapi/cpp/graphics_3d.h" | 16 #include "ppapi/cpp/graphics_3d.h" |
| 17 #include "ppapi/cpp/instance_handle.h" | 17 #include "ppapi/cpp/instance_handle.h" |
| 18 #include "ppapi/cpp/video_decoder.h" | 18 #include "ppapi/cpp/video_decoder.h" |
| 19 #include "ppapi/utility/completion_callback_factory.h" | 19 #include "ppapi/utility/completion_callback_factory.h" |
| 20 #include "remoting/client/plugin/pepper_video_renderer.h" | 20 #include "remoting/client/plugin/pepper_video_renderer.h" |
| 21 #include "remoting/protocol/video_stub.h" | 21 #include "remoting/protocol/video_stub.h" |
| 22 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" | 22 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" |
| 23 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" | |
| 24 | 23 |
| 25 struct PPB_OpenGLES2; | 24 struct PPB_OpenGLES2; |
| 26 | 25 |
| 27 namespace remoting { | 26 namespace remoting { |
| 28 | 27 |
| 29 // PepperVideoRenderer that uses the PPB_VideoDecoder interface for video | 28 // PepperVideoRenderer that uses the PPB_VideoDecoder interface for video |
| 30 // decoding and Graphics3D for rendering. | 29 // decoding and Graphics3D for rendering. |
| 31 class PepperVideoRenderer3D : public PepperVideoRenderer, | 30 class PepperVideoRenderer3D : public PepperVideoRenderer, |
| 32 public protocol::VideoStub { | 31 public protocol::VideoStub { |
| 33 public: | 32 public: |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 91 |
| 93 EventHandler* event_handler_ = nullptr; | 92 EventHandler* event_handler_ = nullptr; |
| 94 protocol::PerformanceTracker* perf_tracker_ = nullptr; | 93 protocol::PerformanceTracker* perf_tracker_ = nullptr; |
| 95 | 94 |
| 96 pp::Graphics3D graphics_; | 95 pp::Graphics3D graphics_; |
| 97 const PPB_OpenGLES2* gles2_if_; | 96 const PPB_OpenGLES2* gles2_if_; |
| 98 pp::VideoDecoder video_decoder_; | 97 pp::VideoDecoder video_decoder_; |
| 99 | 98 |
| 100 webrtc::DesktopSize frame_size_; | 99 webrtc::DesktopSize frame_size_; |
| 101 webrtc::DesktopVector frame_dpi_; | 100 webrtc::DesktopVector frame_dpi_; |
| 102 scoped_ptr<webrtc::DesktopRegion> frame_shape_; | |
| 103 | 101 |
| 104 webrtc::DesktopSize view_size_; | 102 webrtc::DesktopSize view_size_; |
| 105 | 103 |
| 106 bool initialization_finished_ = false; | 104 bool initialization_finished_ = false; |
| 107 bool decode_pending_ = false; | 105 bool decode_pending_ = false; |
| 108 bool get_picture_pending_ = false; | 106 bool get_picture_pending_ = false; |
| 109 bool paint_pending_ = false; | 107 bool paint_pending_ = false; |
| 110 | 108 |
| 111 // Queue of packets that that have been received, but haven't been passed to | 109 // Queue of packets that that have been received, but haven't been passed to |
| 112 // the decoder yet. | 110 // the decoder yet. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 139 bool debug_dirty_region_ = false; | 137 bool debug_dirty_region_ = false; |
| 140 | 138 |
| 141 pp::CompletionCallbackFactory<PepperVideoRenderer3D> callback_factory_; | 139 pp::CompletionCallbackFactory<PepperVideoRenderer3D> callback_factory_; |
| 142 | 140 |
| 143 DISALLOW_COPY_AND_ASSIGN(PepperVideoRenderer3D); | 141 DISALLOW_COPY_AND_ASSIGN(PepperVideoRenderer3D); |
| 144 }; | 142 }; |
| 145 | 143 |
| 146 } // namespace remoting | 144 } // namespace remoting |
| 147 | 145 |
| 148 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_3D_H_ | 146 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_3D_H_ |
| OLD | NEW |