Closed
Bug 561265
Opened 15 years ago
Closed 2 years ago
Use GetThemeBitmap for drawing native widgets with D2D
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: jrmuizel, Unassigned)
References
Details
We can do more efficient drawing if use GetThemeBitmap to build a cache of all of the theme bitmaps and draw them directly with D2D instead of using GDI. Further if we sprite them we can also take advantage of direct2d's ability to draw multiple parts in a single draw call.
The documentation on how to use GetThemeBitmap etc. is pretty sparse but Wine has an implementation of the theme dll which should give a pretty good idea of how this should work.
| Reporter | ||
Comment 1•15 years ago
|
||
Drawing theme elements this way would also limit our need for native clipping on GDI.
| Reporter | ||
Comment 2•15 years ago
|
||
I think we can use GetThemeMargins and GetThemePartSize to figure out how to draw the theme bitmaps. i.e. to draw a button get the margins and then stretch out the bitmap using a 3x3 grid defined by the margins sort of like "border-image".
This might help with bug 713532, but I don't know how this would work with animated themes.
| Reporter | ||
Comment 4•9 years ago
|
||
FWIW, Edge does not seem to be using this API anymore. I wonder if we'd be better off just implementing the windows style theme by hand. (This is what Chrome does)
Updated•9 years ago
|
Component: Widget: Win32 → Graphics
Updated•3 years ago
|
Severity: normal → S3
Comment 5•2 years ago
|
||
Not relevant anymore
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•