| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 RTC_DCHECK(DesktopRect::MakeSize(source.size()).ContainsRect(source_rect)); | 101 RTC_DCHECK(DesktopRect::MakeSize(source.size()).ContainsRect(source_rect)); |
| 102 // The rectangle in |target|. | 102 // The rectangle in |target|. |
| 103 const DesktopRect target_rect = | 103 const DesktopRect target_rect = |
| 104 RotateAndOffsetRect(source_rect, source.size(), rotation, target_offset); | 104 RotateAndOffsetRect(source_rect, source.size(), rotation, target_offset); |
| 105 RTC_DCHECK(DesktopRect::MakeSize(target->size()).ContainsRect(target_rect)); | 105 RTC_DCHECK(DesktopRect::MakeSize(target->size()).ContainsRect(target_rect)); |
| 106 | 106 |
| 107 if (target_rect.is_empty()) { | 107 if (target_rect.is_empty()) { |
| 108 return; | 108 return; |
| 109 } | 109 } |
| 110 | 110 |
| 111 target->mutable_updated_region()->AddRect(target_rect); | |
| 112 int result = libyuv::ARGBRotate( | 111 int result = libyuv::ARGBRotate( |
| 113 source.GetFrameDataAtPos(source_rect.top_left()), source.stride(), | 112 source.GetFrameDataAtPos(source_rect.top_left()), source.stride(), |
| 114 target->GetFrameDataAtPos(target_rect.top_left()), target->stride(), | 113 target->GetFrameDataAtPos(target_rect.top_left()), target->stride(), |
| 115 source_rect.width(), source_rect.height(), | 114 source_rect.width(), source_rect.height(), |
| 116 ToLibyuvRotationMode(rotation)); | 115 ToLibyuvRotationMode(rotation)); |
| 117 RTC_DCHECK_EQ(result, 0); | 116 RTC_DCHECK_EQ(result, 0); |
| 118 } | 117 } |
| 119 | 118 |
| 120 } // namespace webrtc | 119 } // namespace webrtc |
| OLD | NEW |