-
Bug
-
Resolution: Fixed
-
P4
-
1.2.0
-
kestrel
-
x86
-
windows_nt
Referencing MFC, the win32 AwtGraphics::FillRect() performance can be improved by using the following API calls
AwtGraphics::FillRect(...)
{
// ...
::SetBkColor(m_hDC, clr);
::ExtTextOut(m_hDC, 0, 0, ETO_OPAQUE, lpRect, NULL, 0, NULL);
// ...
}
Instead of the current coding,
void AwtGraphics::FillRect(JNIEnv* env, long nX, long nY, long nW, long nH)
{
if (nW <= 0 || nH <= 0) {
return;
}
HDC hDC = GetDC();
if (hDC == NULL) {
return;
}
SetBrushColor(TRUE);
// Bug #4047723 (FillRect apears wrong (was using the wrong DC handle))
// Bug #4055623 (Performance enhancements)
VERIFY(::PatBlt(hDC, nX + m_originX, nY + m_originY, nW, nH,
((m_rop == R2_XORPEN) ? PATINVERT : PATCOPY)));
ReleaseDC();
}
AwtGraphics::FillRect(...)
{
// ...
::SetBkColor(m_hDC, clr);
::ExtTextOut(m_hDC, 0, 0, ETO_OPAQUE, lpRect, NULL, 0, NULL);
// ...
}
Instead of the current coding,
void AwtGraphics::FillRect(JNIEnv* env, long nX, long nY, long nW, long nH)
{
if (nW <= 0 || nH <= 0) {
return;
}
HDC hDC = GetDC();
if (hDC == NULL) {
return;
}
SetBrushColor(TRUE);
// Bug #4047723 (FillRect apears wrong (was using the wrong DC handle))
// Bug #4055623 (Performance enhancements)
VERIFY(::PatBlt(hDC, nX + m_originX, nY + m_originY, nW, nH,
((m_rop == R2_XORPEN) ? PATINVERT : PATCOPY)));
ReleaseDC();
}