OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "gl/GrGLInterface.h" | 10 #include "gl/GrGLInterface.h" |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 GrRenderBufferObj *buffer = GR_FIND(renderBuffers[i], | 361 GrRenderBufferObj *buffer = GR_FIND(renderBuffers[i], |
362 GrRenderBufferObj, | 362 GrRenderBufferObj, |
363 GrDebugGL::kRenderBuffer_ObjTypes); | 363 GrDebugGL::kRenderBuffer_ObjTypes); |
364 GrAlwaysAssert(buffer); | 364 GrAlwaysAssert(buffer); |
365 | 365 |
366 // OpenGL gives no guarantees if a render buffer is deleted | 366 // OpenGL gives no guarantees if a render buffer is deleted |
367 // while attached to something other than the currently | 367 // while attached to something other than the currently |
368 // bound frame buffer | 368 // bound frame buffer |
369 GrAlwaysAssert(!buffer->getColorBound()); | 369 GrAlwaysAssert(!buffer->getColorBound()); |
370 GrAlwaysAssert(!buffer->getDepthBound()); | 370 GrAlwaysAssert(!buffer->getDepthBound()); |
371 GrAlwaysAssert(!buffer->getStencilBound()); | 371 // However, at GrContext destroy time we release all GrRsources and so
stencil buffers |
| 372 // may get deleted before FBOs that refer to them. |
| 373 //GrAlwaysAssert(!buffer->getStencilBound()); |
372 | 374 |
373 GrAlwaysAssert(!buffer->getDeleted()); | 375 GrAlwaysAssert(!buffer->getDeleted()); |
374 buffer->deleteAction(); | 376 buffer->deleteAction(); |
375 } | 377 } |
376 } | 378 } |
377 | 379 |
378 GrGLvoid GR_GL_FUNCTION_TYPE debugGLFramebufferRenderbuffer(GrGLenum target, | 380 GrGLvoid GR_GL_FUNCTION_TYPE debugGLFramebufferRenderbuffer(GrGLenum target, |
379 GrGLenum attachment
, | 381 GrGLenum attachment
, |
380 GrGLenum renderbuff
ertarget, | 382 GrGLenum renderbuff
ertarget, |
381 GrGLuint renderBuff
erID) { | 383 GrGLuint renderBuff
erID) { |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
903 interface->fBlitFramebuffer = noOpGLBlitFramebuffer; | 905 interface->fBlitFramebuffer = noOpGLBlitFramebuffer; |
904 interface->fResolveMultisampleFramebuffer = | 906 interface->fResolveMultisampleFramebuffer = |
905 noOpGLResolveMultisampleFramebuffer; | 907 noOpGLResolveMultisampleFramebuffer; |
906 interface->fMapBuffer = debugGLMapBuffer; | 908 interface->fMapBuffer = debugGLMapBuffer; |
907 interface->fUnmapBuffer = debugGLUnmapBuffer; | 909 interface->fUnmapBuffer = debugGLUnmapBuffer; |
908 interface->fBindFragDataLocationIndexed = | 910 interface->fBindFragDataLocationIndexed = |
909 noOpGLBindFragDataLocationIndexed; | 911 noOpGLBindFragDataLocationIndexed; |
910 | 912 |
911 return interface; | 913 return interface; |
912 } | 914 } |
OLD | NEW |