Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upIncorrect text shadows with 0 blur on color emoji #1917
Closed
Comments
|
I'm not sure I understand why the shadow application for blur=0 should be different (replace vs multiply) from the more general shadow case. |
|
It shouldn't be different. The bug is that it is different at the moment. The blur shader ignores R/G/B, the text shader respects it (which is incorrect for shadows). |
|
I suggest closing this issue in favor of #1959 which has a screenshot and is easier to understand. |
bors-servo
added a commit
that referenced
this issue
Dec 18, 2017
ignore glyph color data when doing fast shadows This addresses issues #1959 and #1917. We need to swizzle away the glyph's color data for emoji fast shadows. Rather than introducing more shaders/ifdefs to deal with this, I added a reasonably cheap programmable swizzle in the shader to control this. A side benefit of this is that we also get rid of the need for the separate shader with the subpixel-with-bg-color blending passes as they now just use the swizzle mechanism. In the process of this I noticed that the idea of directly stuffing the shadow color into the font on the cloned text run primitive for the fast shadow has a downside: it will usually cause the font to hash differently and so make duplicate entries in the glyph cache. So I added a shadow_color field back onto TextRunPrimitiveCpu, serving dual purposes that 1) lets the font itself hash the same while also 2) indicating down to the batching code that we have to use shadows in the first place (and thus need to enable the swizzle). <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/2223) <!-- Reviewable:end -->
|
Fixed in #2223. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the text shadow with 0 blur case, we use the normal text shader. For color emoji, this shader samples the bitmap color data, and then multiplies by the shadow color, when it should just be simply the shadow color. We probably need to punt back to the text shadow shader somehow or modify the text shader somehow to handle this case.