| Index: webrtc/modules/desktop_capture/desktop_frame.h
|
| diff --git a/webrtc/modules/desktop_capture/desktop_frame.h b/webrtc/modules/desktop_capture/desktop_frame.h
|
| index 7047db8fc16e5021c6c5df1940e708c711aa0b7b..323383d3987329215d0d77515e84cf2896094201 100644
|
| --- a/webrtc/modules/desktop_capture/desktop_frame.h
|
| +++ b/webrtc/modules/desktop_capture/desktop_frame.h
|
| @@ -63,7 +63,8 @@ class DesktopFrame {
|
|
|
| // Copies pixels from a buffer or another frame. |dest_rect| rect must lay
|
| // within bounds of this frame.
|
| - void CopyPixelsFrom(uint8_t* src_buffer, int src_stride,
|
| + void CopyPixelsFrom(uint8_t* src_buffer,
|
| + int src_stride,
|
| const DesktopRect& dest_rect);
|
| void CopyPixelsFrom(const DesktopFrame& src_frame,
|
| const DesktopVector& src_pos,
|
| @@ -78,21 +79,21 @@ class DesktopFrame {
|
| uint8_t* data,
|
| SharedMemory* shared_memory);
|
|
|
| - const DesktopSize size_;
|
| - const int stride_;
|
| -
|
| // Ownership of the buffers is defined by the classes that inherit from this
|
| // class. They must guarantee that the buffer is not deleted before the frame
|
| // is deleted.
|
| uint8_t* const data_;
|
| SharedMemory* const shared_memory_;
|
|
|
| + private:
|
| + const DesktopSize size_;
|
| + const int stride_;
|
| +
|
| DesktopRegion updated_region_;
|
| DesktopVector dpi_;
|
| int64_t capture_time_ms_;
|
| std::unique_ptr<DesktopRegion> shape_;
|
|
|
| - private:
|
| RTC_DISALLOW_COPY_AND_ASSIGN(DesktopFrame);
|
| };
|
|
|
| @@ -116,14 +117,16 @@ class SharedMemoryDesktopFrame : public DesktopFrame {
|
| DesktopSize size,
|
| SharedMemoryFactory* shared_memory_factory);
|
|
|
| + static std::unique_ptr<DesktopFrame> Create(
|
| + DesktopSize size,
|
| + std::unique_ptr<SharedMemory> shared_memory);
|
| +
|
| // Takes ownership of |shared_memory|.
|
| - // TODO(sergeyu): Remove this constructor and keep the second one.
|
| + // TODO(zijiehe): Hide constructors after fake_desktop_capturer.cc has been
|
| + // migrated, Create() is preferred.
|
| SharedMemoryDesktopFrame(DesktopSize size,
|
| int stride,
|
| SharedMemory* shared_memory);
|
| - SharedMemoryDesktopFrame(DesktopSize size,
|
| - int stride,
|
| - std::unique_ptr<SharedMemory> shared_memory);
|
| ~SharedMemoryDesktopFrame() override;
|
|
|
| private:
|
|
|