Further work on sRGB support.
Fix some caps. Add framebuffer enum. BUG=skia:3856 Review URL: https://codereview.chromium.org/1152563003
This commit is contained in:
parent
3b8d9f776e
commit
99babf2848
@ -590,9 +590,9 @@ GrPixelConfig SkImageInfo2GrPixelConfig(SkColorType ct, SkAlphaType, SkColorProf
|
||||
case kARGB_4444_SkColorType:
|
||||
return kRGBA_4444_GrPixelConfig;
|
||||
case kRGBA_8888_SkColorType:
|
||||
// if (kSRGB_SkColorProfileType == pt) {
|
||||
// return kSRGBA_8888_GrPixelConfig;
|
||||
// }
|
||||
//if (kSRGB_SkColorProfileType == pt) {
|
||||
// return kSRGBA_8888_GrPixelConfig;
|
||||
//}
|
||||
return kRGBA_8888_GrPixelConfig;
|
||||
case kBGRA_8888_SkColorType:
|
||||
return kBGRA_8888_GrPixelConfig;
|
||||
|
@ -154,6 +154,7 @@
|
||||
#define GR_GL_INDEX_LOGIC_OP 0x0BF1
|
||||
#define GR_GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
|
||||
#define GR_GL_LINE_STIPPLE 0x0B24
|
||||
#define GR_GL_FRAMEBUFFER_SRGB 0x8DB9
|
||||
|
||||
/* ErrorCode */
|
||||
#define GR_GL_NO_ERROR 0
|
||||
|
@ -2384,10 +2384,17 @@ bool GrGLGpu::configToGLFormats(GrPixelConfig config,
|
||||
case kSRGBA_8888_GrPixelConfig:
|
||||
*internalFormat = GR_GL_SRGB_ALPHA;
|
||||
*externalFormat = GR_GL_SRGB_ALPHA;
|
||||
if (getSizedInternalFormat) {
|
||||
if (getSizedInternalFormat || kGL_GrGLStandard == this->glStandard()) {
|
||||
// desktop or ES 3.0
|
||||
SkASSERT(this->glVersion() >= GR_GL_VER(3, 0));
|
||||
*internalFormat = GR_GL_SRGB8_ALPHA8;
|
||||
*externalFormat = GR_GL_RGBA;
|
||||
} else {
|
||||
// ES 2.0 with EXT_sRGB
|
||||
SkASSERT(kGL_GrGLStandard != this->glStandard() &&
|
||||
this->glVersion() < GR_GL_VER(3, 0));
|
||||
*internalFormat = GR_GL_SRGB_ALPHA;
|
||||
*externalFormat = GR_GL_SRGB_ALPHA;
|
||||
}
|
||||
*externalType = GR_GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user