Chromium Code Reviews| Index: src/gpu/gl/GrGLCaps.cpp |
| =================================================================== |
| --- src/gpu/gl/GrGLCaps.cpp (revision 8915) |
| +++ src/gpu/gl/GrGLCaps.cpp (working copy) |
| @@ -219,12 +219,14 @@ |
| GrGLint numFormats; |
| GR_GL_GetIntegerv(gli, GR_GL_NUM_COMPRESSED_TEXTURE_FORMATS, &numFormats); |
| - SkAutoSTMalloc<10, GrGLint> formats(numFormats); |
| - GR_GL_GetIntegerv(gli, GR_GL_COMPRESSED_TEXTURE_FORMATS, formats); |
| - for (int i = 0; i < numFormats; ++i) { |
| - if (formats[i] == GR_GL_PALETTE8_RGBA8) { |
| - f8BitPaletteSupport = true; |
| - break; |
| + if (numFormats) { |
|
bungeman-skia
2013/04/29 22:59:06
The 'debug' gl context sets numFormats to 0.
|
| + SkAutoSTMalloc<10, GrGLint> formats(numFormats); |
|
bungeman-skia
2013/04/29 22:59:06
The new SkAutoSTMalloc fPtr is NULL when construct
|
| + GR_GL_GetIntegerv(gli, GR_GL_COMPRESSED_TEXTURE_FORMATS, formats); |
|
bungeman-skia
2013/04/29 22:59:06
The first thing GR_GL_GetIntegerv does is
*format
|
| + for (int i = 0; i < numFormats; ++i) { |
| + if (formats[i] == GR_GL_PALETTE8_RGBA8) { |
| + f8BitPaletteSupport = true; |
| + break; |
| + } |
| } |
| } |