| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 virtual ~SharedDesktopFrame(); | 23 virtual ~SharedDesktopFrame(); |
| 24 | 24 |
| 25 static SharedDesktopFrame* Wrap(DesktopFrame* desktop_frame); | 25 static SharedDesktopFrame* Wrap(DesktopFrame* desktop_frame); |
| 26 | 26 |
| 27 // Returns the underlying instance of DesktopFrame. | 27 // Returns the underlying instance of DesktopFrame. |
| 28 DesktopFrame* GetUnderlyingFrame(); | 28 DesktopFrame* GetUnderlyingFrame(); |
| 29 | 29 |
| 30 // Creates a clone of this object. | 30 // Creates a clone of this object. |
| 31 SharedDesktopFrame* Share(); | 31 SharedDesktopFrame* Share(); |
| 32 | 32 |
| 33 const DesktopSize& size() const override; |
| 34 |
| 35 int stride() const override; |
| 36 |
| 37 uint8_t* data() const override; |
| 38 |
| 39 SharedMemory* shared_memory() const override; |
| 40 |
| 41 const DesktopRegion& updated_region() const override; |
| 42 DesktopRegion* mutable_updated_region() override; |
| 43 |
| 44 const DesktopVector& dpi() const override; |
| 45 void set_dpi(const DesktopVector& dpi) override; |
| 46 |
| 47 int64_t capture_time_ms() const override; |
| 48 void set_capture_time_ms(int64_t time_ms) override; |
| 49 |
| 50 const DesktopRegion* shape() const override; |
| 51 void set_shape(DesktopRegion* shape) override; |
| 52 |
| 53 void CopyPixelsFrom(uint8_t* src_buffer, |
| 54 int src_stride, |
| 55 const DesktopRect& dest_rect) override; |
| 56 void CopyPixelsFrom(const DesktopFrame& src_frame, |
| 57 const DesktopVector& src_pos, |
| 58 const DesktopRect& dest_rect) override; |
| 59 |
| 33 // Checks if the frame is currently shared. If it returns false it's | 60 // Checks if the frame is currently shared. If it returns false it's |
| 34 // guaranteed that there are no clones of the object. | 61 // guaranteed that there are no clones of the object. |
| 35 bool IsShared(); | 62 bool IsShared(); |
| 36 | 63 |
| 37 private: | 64 private: |
| 38 class Core; | 65 class Core; |
| 39 | 66 |
| 40 SharedDesktopFrame(rtc::scoped_refptr<Core> core); | 67 SharedDesktopFrame(rtc::scoped_refptr<Core> core); |
| 41 | 68 |
| 42 rtc::scoped_refptr<Core> core_; | 69 rtc::scoped_refptr<Core> core_; |
| 43 | 70 |
| 44 RTC_DISALLOW_COPY_AND_ASSIGN(SharedDesktopFrame); | 71 RTC_DISALLOW_COPY_AND_ASSIGN(SharedDesktopFrame); |
| 45 }; | 72 }; |
| 46 | 73 |
| 47 } // namespace webrtc | 74 } // namespace webrtc |
| 48 | 75 |
| 49 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_SHARED_DESKTOP_FRAME_H_ | 76 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_SHARED_DESKTOP_FRAME_H_ |
| OLD | NEW |