Commit 02e6ee31 authored by Juha Manninen's avatar Juha Manninen
Browse files

LCL-Win32: Optimize TWindowProcHelper.CalcClipRgn a little. Issue #35467, patch from Serge Anvarov.

git-svn-id: trunk@61086 -
parent d3ce767c
......@@ -493,7 +493,7 @@ end;
procedure TWindowProcHelper.CalcClipRgn(PaintRegion: HRGN);
var
nSize, BytesCount: DWORD;
nSize: DWORD;
RgnData: PRgnData;
WindowOrg: Windows.POINT;
XFRM: TXFORM;
......@@ -527,8 +527,7 @@ begin
XFRM.eM11:=-1; XFRM.eM12:=0;
XFRM.eM21:=0; XFRM.eM22:=1;
// ToDo: BytesCount is not initialized.
MirroredPaintRgn := ExtCreateRegion(@XFRM, BytesCount, RgnData^);
MirroredPaintRgn := ExtCreateRegion(@XFRM, nSize, RgnData^);
Windows.SelectClipRgn(CurDoubleBuffer.DC, MirroredPaintRgn);
Windows.DeleteObject(MirroredPaintRgn);
Freemem(RgnData);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment