Descriptioncc: Use SkPMColor consistently on readback.
There are three pixel formats used in Chromium:
- SkColor (non-premultiplied, BGRA)
- SkPMColor (premultiplied, BGRA on desktop and RGBA on Android)
- OpenGL (on readback, premultiplied and RBGA -- in textures, same as SkPMColor)
Raw pixels inside SkBitmaps are of type SkPMColor, not SkColor. This patch fixes
two cases that cause inconsistencies on Android:
1. SkColor was used in bitmaps in SoftwareRendererTest. Use Skia methods
instead of raw pixels in the test so that the correct format is used automatically.
2. GLRenderer's readback also swizzled consistently to BGRA instead of considering the
Skia settings; switch that to use the platform's SkPMColor definition instead.
This is a no-op change on non-Android.
NOTRY=true
BUG=154528
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=199043
Patch Set 1 #Patch Set 2 : Premultiply #Patch Set 3 : Switch to type SkPMColor #Patch Set 4 : Change GLRenderer to also emit SkPMColor #
Total comments: 2
Patch Set 5 : Use SkBitmap in SoftwareRendererTest instead of doing raw pixel manipulation #Messages
Total messages: 11 (0 generated)
|