Changeset 291771 in webkit
- Timestamp:
- Mar 23, 2022, 3:50:35 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/GraphicsContext.cpp (modified) (1 diff)
-
platform/graphics/GraphicsContext.h (modified) (1 diff)
-
platform/graphics/displaylists/DisplayListRecorder.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r291769 r291771 1 2022-03-23 Said Abou-Hallawa <said@apple.com> 2 3 [GPU Process] Ensure DisplayList::Recorder and its base class are initialized with the same GraphicsContextState 4 https://bugs.webkit.org/show_bug.cgi?id=238278 5 rdar://84602660 6 7 Reviewed by Simon Fraser. 8 9 DisplayList::RecorderImpl passes the initial GraphicsContextState to its 10 base class DisplayList::Recorder which pushes it on its stack. But 11 DisplayList::Recorder does not pass this initial GraphicsContextState to 12 its base class which is GraphicsContext. So DisplayList::Recorder ends up 13 having the initial state but the GraphicsContext ends up having the default 14 state. 15 16 DisplayList::Recorder::drawGlyphs() calls DrawGlyphsRecorder::drawGlyphs() 17 which stores the original fillBrush, strokeBrush and dropShadow. It uses 18 these original values to restore the owner GraphicsContext when it finishes. 19 The problem is DrawGlyphsRecorder::drawGlyphs() stores the values in the 20 state of the GraphicsContext which are the default. So in some cases we 21 may restore the default state to the drawing GraphicsContext. 22 23 * platform/graphics/GraphicsContext.cpp: 24 (WebCore::GraphicsContext::GraphicsContext): 25 * platform/graphics/GraphicsContext.h: 26 * platform/graphics/displaylists/DisplayListRecorder.cpp: 27 (WebCore::DisplayList::Recorder::Recorder): 28 1 29 2022-03-23 Andres Gonzalez <andresg_22@apple.com> 2 30 -
trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp
r291696 r291771 49 49 } 50 50 51 GraphicsContext::GraphicsContext(const GraphicsContextState& state) 52 : m_state(state) 53 { 54 } 55 51 56 GraphicsContext::~GraphicsContext() 52 57 { -
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
r291696 r291771 67 67 public: 68 68 WEBCORE_EXPORT GraphicsContext(const GraphicsContextState::ChangeFlags& = { }, InterpolationQuality = InterpolationQuality::Default); 69 WEBCORE_EXPORT GraphicsContext(const GraphicsContextState&); 69 70 WEBCORE_EXPORT virtual ~GraphicsContext(); 70 71 -
trunk/Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
r291696 r291771 44 44 45 45 Recorder::Recorder(const GraphicsContextState& state, const FloatRect& initialClip, const AffineTransform& initialCTM, DrawGlyphsRecorder::DeconstructDrawGlyphs deconstructDrawGlyphs) 46 : m_drawGlyphsRecorder(*this, deconstructDrawGlyphs) 46 : GraphicsContext(state) 47 , m_drawGlyphsRecorder(*this, deconstructDrawGlyphs) 47 48 { 48 49 m_stateStack.append({ state, initialCTM, initialCTM.mapRect(initialClip) });
Note:
See TracChangeset
for help on using the changeset viewer.