| 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 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 GL_CALL(DeleteFramebuffers(1, &desc->fRTFBOID)); | 884 GL_CALL(DeleteFramebuffers(1, &desc->fRTFBOID)); |
| 885 } | 885 } |
| 886 if (desc->fTexFBOID) { | 886 if (desc->fTexFBOID) { |
| 887 GL_CALL(DeleteFramebuffers(1, &desc->fTexFBOID)); | 887 GL_CALL(DeleteFramebuffers(1, &desc->fTexFBOID)); |
| 888 } | 888 } |
| 889 return false; | 889 return false; |
| 890 } | 890 } |
| 891 | 891 |
| 892 // good to set a break-point here to know when createTexture fails | 892 // good to set a break-point here to know when createTexture fails |
| 893 static GrTexture* return_null_texture() { | 893 static GrTexture* return_null_texture() { |
| 894 // SkASSERT(!"null texture"); | 894 // SkDEBUGFAIL("null texture"); |
| 895 return NULL; | 895 return NULL; |
| 896 } | 896 } |
| 897 | 897 |
| 898 #if 0 && GR_DEBUG | 898 #if 0 && GR_DEBUG |
| 899 static size_t as_size_t(int x) { | 899 static size_t as_size_t(int x) { |
| 900 return x; | 900 return x; |
| 901 } | 901 } |
| 902 #endif | 902 #endif |
| 903 | 903 |
| 904 GrTexture* GrGpuGL::onCreateTexture(const GrTextureDesc& desc, | 904 GrTexture* GrGpuGL::onCreateTexture(const GrTextureDesc& desc, |
| (...skipping 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2559 this->setVertexArrayID(gpu, 0); | 2559 this->setVertexArrayID(gpu, 0); |
| 2560 } | 2560 } |
| 2561 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2561 int attrCount = gpu->glCaps().maxVertexAttributes(); |
| 2562 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2562 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
| 2563 fDefaultVertexArrayAttribState.resize(attrCount); | 2563 fDefaultVertexArrayAttribState.resize(attrCount); |
| 2564 } | 2564 } |
| 2565 attribState = &fDefaultVertexArrayAttribState; | 2565 attribState = &fDefaultVertexArrayAttribState; |
| 2566 } | 2566 } |
| 2567 return attribState; | 2567 return attribState; |
| 2568 } | 2568 } |
| OLD | NEW |