Bug 94508

Summary: RenderLayer::paintLayerContents replace paint phase bit mask with enumeration
Product: WebKit Reporter: Dirk Schulze <krit>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: achicu, jchaffraix, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Dirk Schulze
Reported 2012-08-20 12:03:16 PDT
The rendering code is using a bit mask for the different paint phases. It might be more clear to use an enumeration instead, since painting operations are exclusively.
Attachments
Simon Fraser (smfr)
Comment 1 2012-08-20 13:03:01 PDT
PaintPhase is already an enumeration. Maybe you're confusing this with PaintLayerFlags, which does need to be a bitmask.
Dirk Schulze
Comment 2 2012-08-20 13:44:50 PDT
Yes, I was referring to the PaintLayerFlags. Why do they need to be a bit mask? When do we set more than one bit at once?
Julien Chaffraix
Comment 3 2012-09-27 18:21:18 PDT
I don't understand what your proposal is. Could it be possible for you to clarify what you are trying to achieve? > Why do they need to be a bit mask? When do we set more than one bit at once? The different operations in PaintLayerFlags are not orthogonal at all, which would be required to use an enumeration: you can be painting with some combination of them. Look at RenderLayer::paintOverlayScrollbars for an example. Alternatively painting some transparent transformed object with a reflection would trigger different sets of flags to be set at different point during the painting.
Dirk Schulze
Comment 4 2012-09-27 20:26:26 PDT
(In reply to comment #3) > I don't understand what your proposal is. Could it be possible for you to clarify what you are trying to achieve? > > > Why do they need to be a bit mask? When do we set more than one bit at once? > > The different operations in PaintLayerFlags are not orthogonal at all, which would be required to use an enumeration: you can be painting with some combination of them. Look at RenderLayer::paintOverlayScrollbars for an example. Alternatively painting some transparent transformed object with a reflection would trigger different sets of flags to be set at different point during the painting. Yes, we discussed it in IRC before, just forgot to close the bug. I was not ware that e.g reflection can be set with other things as well.
Note You need to log in before you can comment on or make changes to this bug.