OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #include "GrGpuGL.h" | 9 #include "GrGpuGL.h" |
10 #include "GrGLStencilBuffer.h" | 10 #include "GrGLStencilBuffer.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 // On ES we can only hope for R8 | 211 // On ES we can only hope for R8 |
212 fConfigRenderSupport[kAlpha_8_GrPixelConfig] = | 212 fConfigRenderSupport[kAlpha_8_GrPixelConfig] = |
213 this->glCaps().textureRedSupport(); | 213 this->glCaps().textureRedSupport(); |
214 } | 214 } |
215 | 215 |
216 if (kDesktop_GrGLBinding != this->glBinding()) { | 216 if (kDesktop_GrGLBinding != this->glBinding()) { |
217 // only available in ES | 217 // only available in ES |
218 fConfigRenderSupport[kRGB_565_GrPixelConfig] = true; | 218 fConfigRenderSupport[kRGB_565_GrPixelConfig] = true; |
219 } | 219 } |
220 | 220 |
221 // Pre 3.0, Ganesh relies on either GL_ARB_framebuffer_object or | 221 // we no longer support 444 as a render target |
222 // GL_EXT_framebuffer_object for FBO support. Both of these | 222 fConfigRenderSupport[kRGBA_4444_GrPixelConfig] = false; |
223 // allow RGBA4 render targets so this is always supported. | |
224 fConfigRenderSupport[kRGBA_4444_GrPixelConfig] = true; | |
225 | 223 |
226 if (this->glCaps().rgba8RenderbufferSupport()) { | 224 if (this->glCaps().rgba8RenderbufferSupport()) { |
227 fConfigRenderSupport[kRGBA_8888_GrPixelConfig] = true; | 225 fConfigRenderSupport[kRGBA_8888_GrPixelConfig] = true; |
228 } | 226 } |
229 | 227 |
230 if (this->glCaps().bgraFormatSupport()) { | 228 if (this->glCaps().bgraFormatSupport()) { |
231 fConfigRenderSupport[kBGRA_8888_GrPixelConfig] = true; | 229 fConfigRenderSupport[kBGRA_8888_GrPixelConfig] = true; |
232 } | 230 } |
233 } | 231 } |
234 | 232 |
(...skipping 2260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2495 this->setVertexArrayID(gpu, 0); | 2493 this->setVertexArrayID(gpu, 0); |
2496 } | 2494 } |
2497 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2495 int attrCount = gpu->glCaps().maxVertexAttributes(); |
2498 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2496 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
2499 fDefaultVertexArrayAttribState.resize(attrCount); | 2497 fDefaultVertexArrayAttribState.resize(attrCount); |
2500 } | 2498 } |
2501 attribState = &fDefaultVertexArrayAttribState; | 2499 attribState = &fDefaultVertexArrayAttribState; |
2502 } | 2500 } |
2503 return attribState; | 2501 return attribState; |
2504 } | 2502 } |
OLD | NEW |