| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This class is an implementation of the ChromotingView for Pepper. It is | 5 // This class is an implementation of the ChromotingView for Pepper. It is |
| 6 // callable only on the Pepper thread. | 6 // callable only on the Pepper thread. |
| 7 | 7 |
| 8 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ | 8 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ |
| 9 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ | 9 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 virtual ~PepperView(); | 41 virtual ~PepperView(); |
| 42 | 42 |
| 43 // Allocates buffers and passes them to the FrameProducer to render into until | 43 // Allocates buffers and passes them to the FrameProducer to render into until |
| 44 // the maximum number of buffers are in-flight. | 44 // the maximum number of buffers are in-flight. |
| 45 void Initialize(FrameProducer* producer); | 45 void Initialize(FrameProducer* producer); |
| 46 | 46 |
| 47 // FrameConsumer implementation. | 47 // FrameConsumer implementation. |
| 48 virtual void ApplyBuffer(const webrtc::DesktopSize& view_size, | 48 virtual void ApplyBuffer(const webrtc::DesktopSize& view_size, |
| 49 const webrtc::DesktopRect& clip_area, | 49 const webrtc::DesktopRect& clip_area, |
| 50 webrtc::DesktopFrame* buffer, | 50 webrtc::DesktopFrame* buffer, |
| 51 const webrtc::DesktopRegion& region) OVERRIDE; | 51 const webrtc::DesktopRegion& region, |
| 52 const webrtc::DesktopRegion& shape) OVERRIDE; |
| 52 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) OVERRIDE; | 53 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) OVERRIDE; |
| 53 virtual void SetSourceSize(const webrtc::DesktopSize& source_size, | 54 virtual void SetSourceSize(const webrtc::DesktopSize& source_size, |
| 54 const webrtc::DesktopVector& dpi) OVERRIDE; | 55 const webrtc::DesktopVector& dpi) OVERRIDE; |
| 55 virtual PixelFormat GetPixelFormat() OVERRIDE; | 56 virtual PixelFormat GetPixelFormat() OVERRIDE; |
| 56 | 57 |
| 57 // Updates the PepperView's size & clipping area, taking into account the | 58 // Updates the PepperView's size & clipping area, taking into account the |
| 58 // DIP-to-device scale factor. | 59 // DIP-to-device scale factor. |
| 59 void SetView(const pp::View& view); | 60 void SetView(const pp::View& view); |
| 60 | 61 |
| 61 // Returns the dimensions of the most recently displayed frame, in pixels. | 62 // Returns the dimensions of the most recently displayed frame, in pixels. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 bool frame_received_; | 145 bool frame_received_; |
| 145 | 146 |
| 146 pp::CompletionCallbackFactory<PepperView> callback_factory_; | 147 pp::CompletionCallbackFactory<PepperView> callback_factory_; |
| 147 | 148 |
| 148 DISALLOW_COPY_AND_ASSIGN(PepperView); | 149 DISALLOW_COPY_AND_ASSIGN(PepperView); |
| 149 }; | 150 }; |
| 150 | 151 |
| 151 } // namespace remoting | 152 } // namespace remoting |
| 152 | 153 |
| 153 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ | 154 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ |
| OLD | NEW |