fix SkFixed build (I hope)
git-svn-id: http://skia.googlecode.com/svn/trunk@3201 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
20e542e00e
commit
48b481bc22
@ -92,10 +92,13 @@ SkFlattenable::Factory SkTableMaskFilter::getFactory() {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void SkTableMaskFilter::MakeGammaTable(uint8_t table[256], SkScalar gamma) {
|
||||
float x = 0;
|
||||
const float dx = 1 / 255.0f;
|
||||
const float g = SkScalarToFloat(gamma);
|
||||
|
||||
float x = 0;
|
||||
for (int i = 0; i < 256; i++) {
|
||||
table[i] = SkPin32(SkScalarRound(powf(x, gamma) * 255), 0, 255);
|
||||
float ee = powf(x, g) * 255;
|
||||
table[i] = SkPin32(sk_float_round2int(powf(x, g) * 255), 0, 255);
|
||||
x += dx;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user