[Webkit-unassigned] [Bug 184336] New: When recoding the drawing, the DisplayList should be initialized with the GraphicsContextState of the underlying GraphicsContext
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Apr 5 11:26:16 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=184336
Bug ID: 184336
Summary: When recoding the drawing, the DisplayList should be
initialized with the GraphicsContextState of the
underlying GraphicsContext
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Layout and Rendering
Assignee: webkit-unassigned at lists.webkit.org
Reporter: sabouhallawa at apple.com
CC: bfulgham at webkit.org, simon.fraser at apple.com,
zalan at apple.com
The state of the drawing context has to be transfered to the recording DisplayList before recording. Many recording GraphicsContext functions will behave wrongly if get the default state. Here is a scenario of the bug:
-- context.m_state.fillColor = RED (context is the underlying GraphicsContext for the recorded DisplayList)
-- displayListRecorder is created to start recording.
-- displayListRecorder.m_stateStack[0].lastDrawingState.fillColor = BALCK (Because lastDrawingState was initialized by the default GraphicsContextState)
-- displayListContext is created which encapsulates the displayListRecorder
-- displayListContext.setFillColor(BALCK) is called
-- displayListContext.fillRect(rect) is called
-- displayListRecorder is replayed back into context
Result:
-- displayListContext.fillRect() will end up calling Recorder::willAppendItem() which will call GraphicsContextStateChange::changesFromState()
-- GraphicsContextStateChange::changesFromState() will not find a change in the fillColor. The recording GraphicsContext has it BALCK and it was BALCK. So there is no change here and the flag FillColorChange will not be returned
-- Recorder::willAppendItem() will not append a new SetState item in the DisplayList
-- The rectangle is filled with the current fillColor which is RED instead of BALCK as the caller wanted
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180405/b107f3fb/attachment-0002.html>
More information about the webkit-unassigned
mailing list