Remove A8_LCD luminance hack.
It no longer appears to be necessary, and the powf function is slowing down Android text rendering. R=bungeman@google.com, bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/337603008
This commit is contained in:
parent
e41f3886ea
commit
dc1cf66483
@ -51,3 +51,97 @@ bigblurs
|
||||
perlinnoise
|
||||
perlinnoise_localmatrix
|
||||
imagefiltersscaled
|
||||
|
||||
# jvanverth:
|
||||
# A8 text gamma changes slightly
|
||||
# https://codereview.chromium.org/348153002/
|
||||
imageblurtiled
|
||||
filterbitmap_text_3.00pt
|
||||
filterbitmap_text_7.00pt
|
||||
filterbitmap_text_10.00pt
|
||||
texteffects
|
||||
gammatext
|
||||
fontscaler
|
||||
imageblur_large
|
||||
imageblur
|
||||
convex_poly_clip
|
||||
fontcache
|
||||
varied_text_ignorable_clip_lcd
|
||||
imageresizetiled
|
||||
fontmgr_iter
|
||||
varied_text_clipped_no_lcd
|
||||
typefacestyles_kerning
|
||||
downsamplebitmap_text_high_72.00pt
|
||||
downsamplebitmap_text_medium_72.00pt
|
||||
degeneratesegments
|
||||
verttext2
|
||||
varied_text_clipped_lcd
|
||||
cubicclosepath
|
||||
quadclosepath
|
||||
lineclosepath
|
||||
cubicpath
|
||||
quadpath
|
||||
linepath
|
||||
imagefiltersgraph
|
||||
gradtext
|
||||
drawlooper
|
||||
emptypath
|
||||
lcdtext
|
||||
matrixconvolution
|
||||
typefacestyles
|
||||
morphology
|
||||
downsamplebitmap_text_low_72.00pt
|
||||
fontmgr_match
|
||||
lighting
|
||||
imagemagnifier
|
||||
xfermodes2
|
||||
downsamplebitmap_text_none_72.00pt
|
||||
displacement
|
||||
xfermodes
|
||||
shadertext
|
||||
arithmode
|
||||
verttext
|
||||
bitmapsource
|
||||
xfermodes3
|
||||
typeface
|
||||
twopointconical
|
||||
stroketext
|
||||
complexclip_aa
|
||||
complexclip_bw
|
||||
stroke-fill
|
||||
tileimagefilter
|
||||
getpostextpath
|
||||
drawbitmaprect
|
||||
simpleaaclip_aaclip
|
||||
simpleaaclip_path
|
||||
simpleaaclip_rect
|
||||
shadertext2
|
||||
blurs
|
||||
complexclip_aa_layer
|
||||
complexclip_bw_layer
|
||||
scaled_tilemodes_npot
|
||||
tilemodes
|
||||
tilemodes_npot
|
||||
scaled_tilemodes
|
||||
bitmapfilters
|
||||
imagefiltersbase
|
||||
pictureimagefilter
|
||||
srcmode
|
||||
image-surface
|
||||
scaled_tilemode_bitmap
|
||||
scaled_tilemode_gradient
|
||||
tilemode_bitmap
|
||||
tilemode_gradient
|
||||
xfermodeimagefilter
|
||||
dropshadowimagefilter
|
||||
internal_links
|
||||
offsetimagefilter
|
||||
bitmapcopy
|
||||
samplerstress
|
||||
imagefilterscropped
|
||||
poly2poly
|
||||
# senorblanco:
|
||||
# Needs rebaselining after improved perlin noise scaling
|
||||
perlinnoise
|
||||
perlinnoise_localmatrix
|
||||
imagefiltersscaled
|
||||
|
@ -1778,15 +1778,19 @@ void SkScalerContext::PostMakeRec(const SkPaint&, SkScalerContext::Rec* rec) {
|
||||
case SkMask::kA8_Format: {
|
||||
// filter down the luminance to a single component, since A8 can't
|
||||
// use per-component information
|
||||
|
||||
SkColor color = rec->getLuminanceColor();
|
||||
#ifdef SK_IGNORE_FASTER_TEXT_FIX
|
||||
U8CPU lum = SkColorSpaceLuminance::computeLuminance(rec->getPaintGamma(), color);
|
||||
//If we are asked to look like LCD, look like LCD.
|
||||
if (!(rec->fFlags & SkScalerContext::kGenA8FromLCD_Flag)) {
|
||||
// HACK: Prevents green from being pre-blended as white.
|
||||
lum -= ((255 - lum) * lum) / 255;
|
||||
}
|
||||
|
||||
#else
|
||||
U8CPU lum = SkComputeLuminance(SkColorGetR(color),
|
||||
SkColorGetG(color),
|
||||
SkColorGetB(color));
|
||||
#endif
|
||||
// reduce to our finite number of bits
|
||||
color = SkColorSetRGB(lum, lum, lum);
|
||||
rec->setLuminanceColor(SkMaskGamma::CanonicalColor(color));
|
||||
|
Loading…
Reference in New Issue
Block a user