Closed
Bug 612840
Opened 14 years ago
Closed 14 years ago
Clean up layer text flags to prepare for subpixel-AA changes
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | betaN+ |
People
(Reporter: roc, Assigned: roc)
References
Details
Attachments
(4 files)
13.32 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
983 bytes,
patch
|
cjones
:
review+
|
Details | Diff | Splinter Review |
6.80 KB,
patch
|
Details | Diff | Splinter Review | |
10.88 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
I have some patches that simplify the code involved in my changes for how we handle subpixel AA. I rebased my patches for bug 363861 and bug 593604 on top of these patches.
Assignee | ||
Comment 1•14 years ago
|
||
ShouldRetainTransparentSurface is not going to be needed; we will simply converge all platforms on the behavior that when text is over opaque pixels in an RGBA surface, it can be rendered accurately with subpixel AA. As you can see from the code removal, this is already true for GDI, Quartz and Xlib, which are the only surfaces we use BasicLayers for now that D2D goes with D3D10, so this doesn't change anything. It simplifies things to remove ShouldRetainTransparentSurface now. After getting rid of ShouldRetainTransparentSurface, we can also get rid of the CONTENT_NO_TEXT flag because it's unused. We might need to re-add it one day, but I haven't found a use for it yet.
Attachment #491129 -
Flags: review?(vladimir)
Assignee | ||
Comment 2•14 years ago
|
||
I had a check for opacity == 1.0 here on the grounds that there's no point in taking the "non-retained ThebesLayer" path if we're just going to do a PushGroup for opacity and give up our chance to draw directly to the backbuffer. However, with the PushGroupAndCopyBackground stuff in bug 363861 our PushGroup can copy up the background from the backbuffer so we can draw into it with component-alpha compositing. So simplify things by taking out the opacity == 1.0 optimization now.
Attachment #491131 -
Flags: review?(jones.chris.g)
Assignee | ||
Comment 3•14 years ago
|
||
This is bug 593604 parts 3 and 6 folded together and rebased to the above patches, already r=vlad/tnikkel.
Assignee | ||
Comment 4•14 years ago
|
||
It turns out to be simpler to think about a flag that means "to represent this layer properly you need component alpha" instead of just "there is text over transparent pixels". In particular, later we'll want to force some text to be grayscale (e.g., when it's over transparent parts of a window), and then we want FrameLayerBuilder to *not* set this flag.
Attachment #491135 -
Flags: review?(vladimir)
Updated•14 years ago
|
Attachment #491131 -
Flags: review?(jones.chris.g) → review+
Attachment #491129 -
Flags: review?(vladimir) → review+
Attachment #491135 -
Flags: review?(vladimir) → review+
Assignee | ||
Updated•14 years ago
|
Whiteboard: [needs landing]
Assignee | ||
Comment 6•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/ca873b14eb71 http://hg.mozilla.org/mozilla-central/rev/53bc550efbcc http://hg.mozilla.org/mozilla-central/rev/bc423fb0aa13 http://hg.mozilla.org/mozilla-central/rev/8019b50e514c
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing]
Comment 7•14 years ago
|
||
Looks like part 3 never had review requested on it.
Comment 8•14 years ago
|
||
Comment on attachment 491133 [details] [diff] [review] Part 3: Make Layer::CONTENT_NO_TEXT_OVER_TRANSPARENT applicable to all layer types >+ * @param aTextContentFlags if all child layers have CONTENT_NO_TEXT, adds >+ * CONTENT_NO_TEXT to *aTextContentFlags. >+ * Likewise for CONTENT_NO_TEXT_OVER_TRANSPARENT. In the implementation it looks it replaces the value of aTextContentFlags completely, not adds to it. >+ PRUint32 textContentFlags = Layer::CONTENT_NO_TEXT_OVER_TRANSPARENT; >+ >+ if (!layer->GetVisibleRegion().IsEmpty()) { >+ textContentFlags &= layer->GetContentFlags(); >+ } Seems like we will never get the CONTENT_NO_TEXT flag set this way, which doesn't match the comment above.
Attachment #491133 -
Flags: review?(tnikkel)
Comment 9•14 years ago
|
||
Oh, that patch was already reviewed in another bug.
Comment 10•14 years ago
|
||
My comments still seem relevant, although seeing as part 1 removes CONTENT_NO_TEXT that part should just be removed.
Assignee | ||
Comment 11•14 years ago
|
||
Yes, I need to fix the comment there.
Comment 12•14 years ago
|
||
Comment on attachment 491133 [details] [diff] [review] Part 3: Make Layer::CONTENT_NO_TEXT_OVER_TRANSPARENT applicable to all layer types Looks like these have been addressed.
Attachment #491133 -
Flags: review?(tnikkel)
You need to log in
before you can comment on or make changes to this bug.
Description
•