Closed
Bug 717393
Opened 13 years ago
Closed 13 years ago
[Azure]Subpixel AA is disabled
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: lh.bennett, Assigned: bas.schouten)
References
Details
Attachments
(5 files)
5.39 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
11.96 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
4.80 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
22.24 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
5.16 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
Bas already knows but I'll file anyway.
Subpixel AA is not available when Azure-Thebes wrapper is enabled.
Updated•13 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 2•13 years ago
|
||
Assignee: nobody → bas.schouten
Status: NEW → ASSIGNED
Attachment #623551 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 3•13 years ago
|
||
This patch refactors clip management a little to be more readible. It also adds the ClipMaskTexture which is a cached texture that contains the mask defined by the current clip.
Assignee | ||
Comment 4•13 years ago
|
||
As we start using GetClippedGeometry more with the patch to fix this bug, caching it is a good idea.
Attachment #623555 -
Flags: review?(jmuizelaar)
Assignee | ||
Updated•13 years ago
|
Attachment #623554 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 5•13 years ago
|
||
Attachment #623558 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 6•13 years ago
|
||
Attachment #623563 -
Flags: review?(roc)
Attachment #623563 -
Flags: review?(roc) → review+
Comment 7•13 years ago
|
||
Comment on attachment 623551 [details] [diff] [review]
Part 1: Add helper for creating DWriteGlyphRuns
Review of attachment 623551 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/2d/HelpersD2D.h
@@ +227,5 @@
> + mat.dy = aMatrix._32;
> + return mat;
> +}
> +
> +class AutoDWriteGlyphRun : public DWRITE_GLYPH_RUN
Not a huge fan of the Auto in the name but can't think of anything better.
@@ +270,5 @@
> + run->allocate(aGlyphs.mNumGlyphs);
> +
> + FLOAT *advances = const_cast<FLOAT*>(run->glyphAdvances);
> + UINT16 *indices = const_cast<UINT16*>(run->glyphIndices);
> + DWRITE_GLYPH_OFFSET *offsets = const_cast<DWRITE_GLYPH_OFFSET*>(run->glyphOffsets);
The const_casts here are sort of ugly. Can we do anything about them?
@@ +272,5 @@
> + FLOAT *advances = const_cast<FLOAT*>(run->glyphAdvances);
> + UINT16 *indices = const_cast<UINT16*>(run->glyphIndices);
> + DWRITE_GLYPH_OFFSET *offsets = const_cast<DWRITE_GLYPH_OFFSET*>(run->glyphOffsets);
> +
> + memset(advances, 0, sizeof(FLOAT) * aGlyphs.mNumGlyphs);
It might be clearer to get rid of the memset() and do advances[i] = 0;
Attachment #623551 -
Flags: review?(jmuizelaar) → review+
Updated•13 years ago
|
Attachment #623554 -
Flags: review?(jmuizelaar) → review+
Comment 8•13 years ago
|
||
Comment on attachment 623558 [details] [diff] [review]
Part 4: Add code to draw subpixel-AA to transparent surfaces
Review of attachment 623558 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/2d/DrawTargetD2D.cpp
@@ +895,5 @@
> + aOptions.mCompositionOp == OP_OVER && aPattern.GetType() == PATTERN_COLOR) {
> + if (FillGlyphsManual(font, aBuffer,
> + static_cast<const ColorPattern*>(&aPattern)->mColor,
> + params, aOptions)) {
> + return;
Do we expect this to fail? If not we should probably at least produce a Warning()
Attachment #623558 -
Flags: review?(jmuizelaar) → review+
Assignee | ||
Comment 9•13 years ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #7)
> Comment on attachment 623551 [details] [diff] [review]
> @@ +270,5 @@
> > + run->allocate(aGlyphs.mNumGlyphs);
> > +
> > + FLOAT *advances = const_cast<FLOAT*>(run->glyphAdvances);
> > + UINT16 *indices = const_cast<UINT16*>(run->glyphIndices);
> > + DWRITE_GLYPH_OFFSET *offsets = const_cast<DWRITE_GLYPH_OFFSET*>(run->glyphOffsets);
>
> The const_casts here are sort of ugly. Can we do anything about them?
I can't think of anything, the constness is set in the inherited MS class.
>
> @@ +272,5 @@
> > + FLOAT *advances = const_cast<FLOAT*>(run->glyphAdvances);
> > + UINT16 *indices = const_cast<UINT16*>(run->glyphIndices);
> > + DWRITE_GLYPH_OFFSET *offsets = const_cast<DWRITE_GLYPH_OFFSET*>(run->glyphOffsets);
> > +
> > + memset(advances, 0, sizeof(FLOAT) * aGlyphs.mNumGlyphs);
>
> It might be clearer to get rid of the memset() and do advances[i] = 0;
I did this for performance reasons, I'm fine with going the other thing but I thought this would perform slightly better.
Assignee | ||
Comment 10•13 years ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #8)
> Comment on attachment 623558 [details] [diff] [review]
> Part 4: Add code to draw subpixel-AA to transparent surfaces
>
> Review of attachment 623558 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: gfx/2d/DrawTargetD2D.cpp
> @@ +895,5 @@
> > + aOptions.mCompositionOp == OP_OVER && aPattern.GetType() == PATTERN_COLOR) {
> > + if (FillGlyphsManual(font, aBuffer,
> > + static_cast<const ColorPattern*>(&aPattern)->mColor,
> > + params, aOptions)) {
> > + return;
>
> Do we expect this to fail? If not we should probably at least produce a
> Warning()
There's some realistic scenarios where this could fail (when outline drawing is recommended by DWrite for very large fonts and such). Failing is not a big issue as we'll just draw normally without subpixel-AA.
Updated•13 years ago
|
Attachment #623555 -
Flags: review?(jmuizelaar) → review+
Assignee | ||
Comment 12•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/4ea09dad0f1a
https://hg.mozilla.org/integration/mozilla-inbound/rev/9d3b467dcd3e
https://hg.mozilla.org/integration/mozilla-inbound/rev/4678c61c8974
https://hg.mozilla.org/integration/mozilla-inbound/rev/c6be2987c6ec
https://hg.mozilla.org/integration/mozilla-inbound/rev/c14773057d57
Comment 13•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4ea09dad0f1a
https://hg.mozilla.org/mozilla-central/rev/9d3b467dcd3e
https://hg.mozilla.org/mozilla-central/rev/4678c61c8974
https://hg.mozilla.org/mozilla-central/rev/c6be2987c6ec
https://hg.mozilla.org/mozilla-central/rev/c14773057d57
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
Reporter | ||
Comment 14•13 years ago
|
||
This is causing graphics corruption in chrome and certain content javascript overlays.
Comment 15•13 years ago
|
||
I also suspect its crashing my ATI video chip HD3200, system locks hard and system going in/out of video card recovery, except it never recovers forcing a 'hard powerdown'
Assignee | ||
Comment 16•13 years ago
|
||
(In reply to Jim Jeffery not reading bug-mail 1/2/11 from comment #15)
> I also suspect its crashing my ATI video chip HD3200, system locks hard and
> system going in/out of video card recovery, except it never recovers forcing
> a 'hard powerdown'
If that's normally never happens and it isn't blacklisted it's probably best if you raise a separate bug with your graphics info :(
(In reply to Leman Bennett (Omega X) from comment #14)
> This is causing graphics corruption in chrome and certain content javascript
> overlays.
Any chance you could point me at some STR? It would be great if you could open a bug on it with a screenshot.
Assignee | ||
Comment 17•13 years ago
|
||
I found the likely cause, I didn't rerun the shader compiler to regenerate the shaders. Pushing a follow-up now.
Assignee | ||
Comment 18•13 years ago
|
||
Pushed the regenerated files. I chose not to make a separate bug as that would probably confuse things. (This regeneration is really part of this bug and is a recompilation of code reviewed in this bug). If someone disagrees with that I apologize.
https://hg.mozilla.org/integration/mozilla-inbound/rev/5e3bd5a8cb3b
Comment 19•13 years ago
|
||
Can you file a bug for (and possibly implement) the build to fail if the shaders and the bytecode get out of sync?
Comment 20•13 years ago
|
||
I already did: https://bugzilla.mozilla.org/show_bug.cgi?id=755741
Comment 21•13 years ago
|
||
(In reply to Bas Schouten (:bas) from comment #18)
> Pushed the regenerated files.
https://hg.mozilla.org/mozilla-central/rev/5e3bd5a8cb3b
You need to log in
before you can comment on or make changes to this bug.
Description
•