зеркало из https://github.com/mozilla/pjs.git
deferred creation of null pen until we actually need to use it.
This commit is contained in:
Родитель
72f8a6f853
Коммит
4702d24f2a
|
@ -286,8 +286,6 @@ nsresult nsRenderingContextWin :: CommonInit(void)
|
|||
mBlackPen = ::CreatePen(PS_SOLID, 0, RGB(0, 0, 0));
|
||||
mOrigSolidPen = ::SelectObject(mDC, mBlackPen);
|
||||
|
||||
mNullPen = ::CreatePen(PS_NULL, 0, 0);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -646,6 +644,10 @@ void nsRenderingContextWin::FillPolygon(nsPoint aPoints[], PRInt32 aNumPoints)
|
|||
int pfm = ::GetPolyFillMode(mDC);
|
||||
::SetPolyFillMode(mDC, WINDING);
|
||||
SetupSolidBrush();
|
||||
|
||||
if (NULL == mNullPen)
|
||||
mNullPen = ::CreatePen(PS_NULL, 0, 0);
|
||||
|
||||
HPEN oldPen = ::SelectObject(mDC, mNullPen);
|
||||
::Polygon(mDC, pp0, int(aNumPoints));
|
||||
::SelectObject(mDC, oldPen);
|
||||
|
|
Загрузка…
Ссылка в новой задаче