Chromium Code Reviews| Index: src/gpu/gl/GrGpuGL.cpp |
| diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp |
| index a22988b01bbb8a117ea1262099dc8a934c076b25..0ae12468e50caaf258c4cbea8fb186bcd6b93ed8 100644 |
| --- a/src/gpu/gl/GrGpuGL.cpp |
| +++ b/src/gpu/gl/GrGpuGL.cpp |
| @@ -558,15 +558,10 @@ bool GrGpuGL::uploadTexData(const GrSurfaceDesc& desc, |
| GrGLenum externalFormat = 0x0; // suprress warning |
| GrGLenum externalType = 0x0;// suprress warning |
| - // glTexStorage requires sized internal formats on both desktop and ES. ES2 requires an unsized |
| - // format for glTexImage, unlike ES3 and desktop. However, we allow the driver to decide the |
| - // size of the internal format whenever possible and so only use a sized internal format when |
| - // using texture storage. |
| + // glTexStorage requires sized internal formats on both desktop and ES. |
| bool useSizedFormat = useTexStorage; |
|
bsalomon
2014/12/15 22:20:00
maybe just change to usf = useTexStorage || glstd
|
| - // Many versions of the ES3 drivers on various platforms will not accept GL_RED in |
| - // glTexImage2D for the internal format but will accept GL_R8. |
| - if (kGLES_GrGLStandard == this->glStandard() && this->glVersion() >= GR_GL_VER(3, 0) && |
| - kAlpha_8_GrPixelConfig == dataConfig) { |
| + // ES2 requires an unsized format for glTexImage. On ES3 and desktop we default to sized. |
| + if (kGL_GrGLStandard == this->glStandard() || this->glVersion() >= GR_GL_VER(3, 0)) { |
| useSizedFormat = true; |
| } |
| if (!this->configToGLFormats(dataConfig, useSizedFormat, &internalFormat, |