Module: wine Branch: master Commit: 063cb64e111a7bfcb008599ce9711cf348120a05 URL: http://source.winehq.org/git/wine.git/?a=commit;h=063cb64e111a7bfcb008599ce9...
Author: Michael Stefaniuc mstefani@redhat.de Date: Wed Apr 13 13:48:52 2016 +0200
quartz: Simplify a RECT transformation.
Signed-off-by: Michael Stefaniuc mstefani@redhat.de Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/quartz/vmr9.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 03b4115..701d06d 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -2592,14 +2592,9 @@ static HRESULT VMR9_ImagePresenter_PresentOffscreenSurface(VMR9DefaultAllocatorP return hr; }
- target_rect = This->pVMR9->target_rect; - target_rect.right -= target_rect.left; - target_rect.bottom -= target_rect.top; - target_rect.left = target_rect.top = 0; - - /* Flip */ - target_rect.top = target_rect.bottom; - target_rect.bottom = 0; + /* Move rect to origin and flip it */ + SetRect(&target_rect, 0, This->pVMR9->target_rect.bottom - This->pVMR9->target_rect.top, + This->pVMR9->target_rect.right - This->pVMR9->target_rect.left, 0);
hr = IDirect3DDevice9_StretchRect(This->d3d9_dev, surface, &This->pVMR9->source_rect, target, &target_rect, D3DTEXF_LINEAR); if (FAILED(hr))