Chromium Code Reviews| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 void CopyPixelsFrom(uint8_t* src_buffer, | 61 void CopyPixelsFrom(uint8_t* src_buffer, |
| 62 int src_stride, | 62 int src_stride, |
| 63 const DesktopRect& dest_rect); | 63 const DesktopRect& dest_rect); |
| 64 void CopyPixelsFrom(const DesktopFrame& src_frame, | 64 void CopyPixelsFrom(const DesktopFrame& src_frame, |
| 65 const DesktopVector& src_pos, | 65 const DesktopVector& src_pos, |
| 66 const DesktopRect& dest_rect); | 66 const DesktopRect& dest_rect); |
| 67 | 67 |
| 68 // A helper to return the data pointer of a frame at the specified position. | 68 // A helper to return the data pointer of a frame at the specified position. |
| 69 uint8_t* GetFrameDataAtPos(const DesktopVector& pos) const; | 69 uint8_t* GetFrameDataAtPos(const DesktopVector& pos) const; |
| 70 | 70 |
| 71 // A helper to return the position at the specified data pointer. | |
| 72 DesktopVector GetPosAtFrameData(const uint8_t* const pos) const; | |
|
Jamie
2016/08/26 22:29:09
You don't seem to be using this.
Hzj_jie
2016/08/29 21:57:28
Done.
| |
| 73 | |
| 71 protected: | 74 protected: |
| 72 DesktopFrame(DesktopSize size, | 75 DesktopFrame(DesktopSize size, |
| 73 int stride, | 76 int stride, |
| 74 uint8_t* data, | 77 uint8_t* data, |
| 75 SharedMemory* shared_memory); | 78 SharedMemory* shared_memory); |
| 76 | 79 |
| 77 // Ownership of the buffers is defined by the classes that inherit from this | 80 // Ownership of the buffers is defined by the classes that inherit from this |
| 78 // class. They must guarantee that the buffer is not deleted before the frame | 81 // class. They must guarantee that the buffer is not deleted before the frame |
| 79 // is deleted. | 82 // is deleted. |
| 80 uint8_t* const data_; | 83 uint8_t* const data_; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 124 ~SharedMemoryDesktopFrame() override; | 127 ~SharedMemoryDesktopFrame() override; |
| 125 | 128 |
| 126 private: | 129 private: |
| 127 RTC_DISALLOW_COPY_AND_ASSIGN(SharedMemoryDesktopFrame); | 130 RTC_DISALLOW_COPY_AND_ASSIGN(SharedMemoryDesktopFrame); |
| 128 }; | 131 }; |
| 129 | 132 |
| 130 } // namespace webrtc | 133 } // namespace webrtc |
| 131 | 134 |
| 132 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_H_ | 135 #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_FRAME_H_ |
| 133 | 136 |
| OLD | NEW |