Closed Bug 542280 Opened 15 years ago Closed 15 years ago

Use GetUpdateRgn() on Windows Mobile

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Windows Mobile 6 Professional
defect
Not set
major

Tracking

(status1.9.2 .2-fixed, fennec1.0a4-wm+)

RESOLVED FIXED
Tracking Status
status1.9.2 --- .2-fixed
fennec 1.0a4-wm+ ---

People

(Reporter: crowderbt, Assigned: crowderbt)

References

Details

Attachments

(1 file, 3 obsolete files)

Attached file One big fix (obsolete) —
+++ This bug was initially created as a clone of Bug #540668 +++ I see this issue primarily when scrolling chrome windows, such as the awesomepanel. Whenever are are using a ::Invalidate*() GDI call, we should be adding the same region to our mInvalidatedRegion member. Without doing so, we end not blitting enough to properly redraw in WM_PAINT. Alternatively, we should experiment with using ::GetUpdateRgn() or something comparable as a replacement for ::GetRandomRgn() -- which doesn't exist on WinCE apparently -- instead of manually tracking our invalidated region.
Comment on attachment 423566 [details] One big fix This patch helps a lot, but isn't the whole fix. I'm going to experiment with ::GetUpdateRgn() next.
Attached patch w00t (obsolete) — Splinter Review
This works well and rips out entirely the code that maintains a "duplicate" invalidated region.
Assignee: nobody → crowderbt
Attachment #423566 - Attachment is obsolete: true
Comment on attachment 423634 [details] [diff] [review] w00t The latest patch works well. It seems to solve the issues I've seen with panning the awesome panel. >@@ -1028,21 +1031,10 @@ PRBool nsWindow::OnPaintImageDDraw16() > SetLastError(0); // See http://msdn.microsoft.com/en-us/library/dd145046%28VS.85%29.aspx > if (MapWindowPoints(mWnd, 0, (LPPOINT)&renderRect, 2) || 0 == (hr = GetLastError())) > hr = glpDDPrimary->Blt(&renderRect, glpDDSecondary, &r, 0, NULL); >-#ifdef WINCE_WINDOWS_MOBILE >- if (FAILED(hr)) >- // add this rect back to the invalidated region so we'll attempt paint it next time around >- mInvalidatedRegion->Union(rects->mRects[i].x, rects->mRects[i].y, >- rects->mRects[i].width, rects->mRects[i].height); >-#endif > } > result = PR_TRUE; > > cleanup: >-#ifdef WINCE_WINDOWS_MOBILE >- // re-invalidate the region if we failed. >- if (!result) >- mInvalidatedRegion->Union(*paintRgnWin.get()); >-#endif > ::EndPaint(mWnd, &ps); > mPaintDC = nsnull; > mPainting = PR_FALSE; I think we still want to re-invalidate the region or rect if we fail to paint it.
Blocks: 540668
No longer depends on: 540668
Summary: need to update mInvalidateRegion correctly for Windows Mobile → Use GetUpdateRgn() on Windows Mobile
Attached patch the one to review (obsolete) — Splinter Review
Attachment #423634 - Attachment is obsolete: true
Attachment #424026 - Flags: review?(bugmail)
Attachment #424026 - Flags: review?(bugmail) → review+
Comment on attachment 424026 [details] [diff] [review] the one to review >+ paintRgn = ::CreateRectRgn(0, 0, 0, 0); you shouldn't need to initialize it here, just drop this line > cleanup: >-#ifdef WINCE_WINDOWS_MOBILE >- // re-invalidate the region if we failed. >- if (!result) >- mInvalidatedRegion->Union(*paintRgnWin.get()); >-#endif if result is false, have an NS_ERROR() saying so
Attached patch arghSplinter Review
Attachment #424026 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Attachment #424120 - Flags: approval1.9.2.1?
tracking-fennec: 1.0-wm+ → 1.0a4-wm+
Attachment #424120 - Flags: approval1.9.2.2?
Component: Windows Mobile → General
QA Contact: mobile-windows → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: