Skip to content
Commit b9a6515e authored by Nicolas Capens's avatar Nicolas Capens
Browse files

Fix texture image internalformat/type validation.

checkInternalFormat() was not properly checking that the Skia bitmap
color type matches the OpenGL format and type combination. In some
cases this would lead to visual artifacts (e.g. when a 565 type is
uploaded to a 4444 type), while in other cases it would cause reading
out of bounds (e.g. when uploading Alpha_8 with a GL_RGBA format).

Note that valid Bitmap formats are documented at
https://developer.android.com/reference/android/graphics/Bitmap.Config.html
checkInternalFormat() now also matches getInternalFormat() and
getType().

Bug: 73084222

Change-Id: I47cb08657c7d03723d3318c99e0da94434d80ee6
parent 64265d4d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment