Merge "Fix CTS : BitmapRGBAF16Test#testSetPixel failure" into oc-dr1-dev
am: c025347cf2
Change-Id: I67be64383eeac28ea84ae02a351a92d078b4dac8
This commit is contained in:
@@ -328,11 +328,12 @@ static void FromColor_F16_Raw(void* dst, const SkColor src[], int width,
|
|||||||
uint64_t* d = (uint64_t*)dst;
|
uint64_t* d = (uint64_t*)dst;
|
||||||
|
|
||||||
for (int i = 0; i < width; i++) {
|
for (int i = 0; i < width; i++) {
|
||||||
const float* color = SkColor4f::FromColor(*src++).vec();
|
const SkColor4f color = SkColor4f::FromColor(*src++);
|
||||||
uint16_t* scratch = reinterpret_cast<uint16_t*>(d++);
|
uint16_t* scratch = reinterpret_cast<uint16_t*>(d++);
|
||||||
for (int i = 0; i < 4; ++i) {
|
scratch[0] = SkFloatToHalf(color.fR);
|
||||||
scratch[i] = SkFloatToHalf(color[i]);
|
scratch[1] = SkFloatToHalf(color.fG);
|
||||||
}
|
scratch[2] = SkFloatToHalf(color.fB);
|
||||||
|
scratch[3] = SkFloatToHalf(color.fA);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user