This change adds RotateDesktopFrame(), RotateRect(), RotateSize(), ReverseRotate() functions, so an implementation can use these free functions to rotate and copy pixels from one DesktopFrame to another at the same time. This is the first part of the change to support rotation in DirectX capturer. In a coming change, these functions will be used in DxgiOutputDuplicator to do the rotation and copying. Background, DirectX APIs always return unrotated data buffer, so we need to rotate it to match the user-selected rotation. What worse is except for the data buffer, other variables return by these APIs are all rotated, e.g. output size, monitor position. So we will eventually not be able to capture the rotated monitors, because we cannot set their position and size correctly. Though DXGI_OUTDUPL_DESC provides a DXGI_MODE_ROTATION enumeration to indicate the output rotation, it does not provide a simple way to rotate an IDXGIResource, which is the only thing we can get from duplication APIs. A typical user case here is to use a matrix to transform the IDXGIResource and render it to a surface. But since we do not render the IDXGIResource at all, we need to manually rotate it. BUG=314516 Review-Url: https://codereview.webrtc.org/2500883004 Cr-Commit-Position: refs/heads/master@{#15205}
6 lines
92 B
Python
6 lines
92 B
Python
include_rules = [
|
|
"+webrtc/base",
|
|
"+webrtc/system_wrappers",
|
|
"+third_party/libyuv",
|
|
]
|