Once the information is in GrTextContext everything is good. Getting that information is more difficult. ...
11 years, 6 months ago
(2012-10-30 20:04:40 UTC)
#1
Once the information is in GrTextContext everything is good. Getting that
information is more difficult.
The current steps in creating a glyph mask are (logically):
0. Get something to render the text.
1. Convert this to a linear mask, if needed. (This may include undoing gamma
correction or pulling down from three channel to single channel.)
2. Apply contrast.
3. Apply pre-blend / gamma.
The ugly is in (1) signalling that the device can apply the last N steps itself
and (2) allowing the device to discover the parameters (gamma, contrast, etc)
for the steps it will apply. This change handles (1) with
SkDevice::wantsLinearMasks() which states that the device will apply steps 2 and
3. This change handles (2) by allowing SkGpuDevice to call
SkPaint.descriptorProc(...) with its own proc in order to read out what the
SkScalerContext::Rec would have been had it not requested linear masks. Both of
these approaches could probably use some implementation improvement.
Issue 6818058: Gpu to apply mask gamma.
Created 11 years, 6 months ago by bungeman
Modified 10 years ago
Reviewers: bsalomon, reed1
Base URL: http://skia.googlecode.com/svn/trunk/
Comments: 8