Bug 239953
| Summary: | avoid setting different syntax but same value Colors in DrawGlyphsRecorder | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Cameron McCormack (:heycam) <heycam> |
| Component: | WebKit Process Model | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Cameron McCormack (:heycam)
DrawGlyphsRecorder extracts the current fill and stroke colors when text is drawn. This handles color fonts. We extract the current colors using CGGStateGetFillColor and CGGStateGetStrokeColor, then convert the CGColors to WebCore::Colors using Color::createAndPreserveColorSpace. The result is that we always create an out-of-line Color (i.e. one with float components), even if the original color we set came from an SRGBA<uint8_t> color value. The two don't compare equal, and we spend time generating and processing state change display list items for this.
For the common case of the draw glyphs callback being called with the current fill and stroke set to the same CGColor object instances that we set in DrawGlyphsRecorder::populateInternalContext, we can set the fill/stroke using the brush values on m_originalState, and the graphics context state management code will detect these as the same and avoid generating changes.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/92593336>
Cameron McCormack (:heycam)
*** This bug has been marked as a duplicate of bug 235604 ***