Gray8 is supported on GPU, remove incorrect comments & check
BUG=skia: Change-Id: I3e5cb94b1e903d1b6ebbc36675d1c4082aef6841 Reviewed-on: https://skia-review.googlesource.com/9899 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
f9bd468325
commit
628999dd99
@ -135,8 +135,6 @@ static void show_mips_only(SkCanvas* canvas, SkImage* img) {
|
||||
*
|
||||
* Ensure that in S32 drawing mode, all images/mips look the same, and look correct (i.e.
|
||||
* the mip levels match the original in brightness).
|
||||
*
|
||||
* This test also verifies handling of Gray_8 data in Ganesh, which is not done natively.
|
||||
*/
|
||||
DEF_SIMPLE_GM(mipmap_gray8_srgb, canvas, 260, 230) {
|
||||
sk_sp<SkImage> limg = make_g8_gradient(nullptr);
|
||||
|
@ -238,15 +238,6 @@ GrTexture* GrGenerateMipMapsAndUploadToTexture(GrContext* ctx, const SkBitmap& b
|
||||
|
||||
GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(bitmap.info(), *ctx->caps());
|
||||
|
||||
// We don't support Gray8 directly in the GL backend, so fail-over to GrUploadBitmapToTexture.
|
||||
// That will transform the Gray8 to 8888, then use the driver/GPU to build mipmaps. If we build
|
||||
// the mips on the CPU here, they'll all be Gray8, which isn't useful. (They get treated as A8).
|
||||
// TODO: A better option might be to transform the initial bitmap here to 8888, then run the
|
||||
// CPU mip-mapper on that data before uploading. This is much less code for a rare case though:
|
||||
if (kGray_8_SkColorType == bitmap.colorType()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SkAutoPixmapUnlock srcUnlocker;
|
||||
if (!bitmap.requestLock(&srcUnlocker)) {
|
||||
return nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user