Closed
Bug 174585
Opened 22 years ago
Closed 21 years ago
Need to work around gdk_flush() call in nsNativeThemeGTK.cpp
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.7alpha
People
(Reporter: roc, Assigned: bryner)
Details
Attachments
(1 file)
5.51 KB,
patch
|
roc
:
review+
blizzard
:
superreview+
|
Details | Diff | Splinter Review |
This gdk_flush() call really hurts on remote connections. We need to find a way to avoid it "most of the time", perhaps by caching the "known good" status of a theme on a per-(widget+state) basis.
Assignee | ||
Comment 1•21 years ago
|
||
This patch caches widget states that are known to draw without error. I thought about this quite a bit and decided that this is not redundant at all with the current widget disabled bitfield. The reason is that there are 3 possible states you might have -- the widget state has never been drawn, the widget state is known to be safe, or the entire widget is disabled. The widget being disabled is not the same as not knowing the state to be safe. So, I think this is actually the minimum amount of space we need to store this information -- one bit per widget+state, and an additional bit per widget. Also, I decided not to include canDefault as a factor in the state cache since it's never given to gtk directly. I also decided not to use the scrollbar curPos and maxPos simply because I can't imagine those states individually triggering a problem.
Assignee | ||
Updated•21 years ago
|
Attachment #136087 -
Flags: superreview?(dbaron)
Attachment #136087 -
Flags: review?(roc)
Reporter | ||
Comment 2•21 years ago
|
||
Comment on attachment 136087 [details] [diff] [review] cache known-good states looks OK. This is a bit of a hack; just because painting a widget in one state doesn't cause an error the first time, doesn't mean it won't the next time. On the other hand this whole thing is a hack so if this heuristic works on real themes, and it should, then let's do it.
Attachment #136087 -
Flags: review?(roc) → review+
Assignee | ||
Updated•21 years ago
|
Attachment #136087 -
Flags: superreview?(dbaron) → superreview?(blizzard)
Updated•21 years ago
|
Attachment #136087 -
Flags: superreview?(blizzard) → superreview+
Assignee | ||
Comment 3•21 years ago
|
||
checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 4•21 years ago
|
||
This have added a warning on brad TBox: +gfx/src/gtk/nsNativeThemeGTK.cpp:430 + `int (*oldHandler)(Display*, XErrorEvent*)' might be used uninitialized in this function
Assignee | ||
Comment 5•21 years ago
|
||
The warning is bogus, I'd say. |oldHandler| is only set or used if |safeState| is false. It's not possible for |safeState| to become true between the first and second checks.
Assignee | ||
Comment 6•21 years ago
|
||
or rather, to become false.
Comment 7•21 years ago
|
||
Re comment 5: The code is right, but the compiler does not track the |if| conditions :-( Would you care for a patch like this anyway ? { - XErrorHandler oldHandler; + /* Useless initialization, except to avoid a compiler warning. */ + XErrorHandler oldHandler = nsnull; }
Comment 8•21 years ago
|
||
Re comment 7: Warning fixed: Check in: { 01/07/2004 12:08 bryner%brianryner.com mozilla/ gfx/ src/ gtk/ nsNativeThemeGTK.cpp 1.45 }
Target Milestone: --- → mozilla1.7alpha
You need to log in
before you can comment on or make changes to this bug.
Description
•