| 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 GrAlwaysAssert(!buffer->getDeleted()); | 375 GrAlwaysAssert(!buffer->getDeleted()); |
| 376 buffer->deleteAction(); | 376 buffer->deleteAction(); |
| 377 } | 377 } |
| 378 } | 378 } |
| 379 | 379 |
| 380 GrGLvoid GR_GL_FUNCTION_TYPE debugGLFramebufferRenderbuffer(GrGLenum target, | 380 GrGLvoid GR_GL_FUNCTION_TYPE debugGLFramebufferRenderbuffer(GrGLenum target, |
| 381 GrGLenum attachment
, | 381 GrGLenum attachment
, |
| 382 GrGLenum renderbuff
ertarget, | 382 GrGLenum renderbuff
ertarget, |
| 383 GrGLuint renderBuff
erID) { | 383 GrGLuint renderBuff
erID) { |
| 384 | 384 |
| 385 GrAlwaysAssert(GR_GL_FRAMEBUFFER == target); | 385 GrAlwaysAssert(GR_GL_FRAMEBUFFER == target || GR_GL_READ_FRAMEBUFFER == targ
et || |
| 386 GR_GL_DRAW_FRAMEBUFFER == target); |
| 386 GrAlwaysAssert(GR_GL_COLOR_ATTACHMENT0 == attachment || | 387 GrAlwaysAssert(GR_GL_COLOR_ATTACHMENT0 == attachment || |
| 387 GR_GL_DEPTH_ATTACHMENT == attachment || | 388 GR_GL_DEPTH_ATTACHMENT == attachment || |
| 388 GR_GL_STENCIL_ATTACHMENT == attachment); | 389 GR_GL_STENCIL_ATTACHMENT == attachment); |
| 389 GrAlwaysAssert(GR_GL_RENDERBUFFER == renderbuffertarget); | 390 GrAlwaysAssert(GR_GL_RENDERBUFFER == renderbuffertarget); |
| 390 | 391 |
| 391 GrFrameBufferObj *framebuffer = GrDebugGL::getInstance()->getFrameBuffer(); | 392 GrFrameBufferObj *framebuffer = GrDebugGL::getInstance()->getFrameBuffer(); |
| 392 // A render buffer cannot be attached to the default framebuffer | 393 // A render buffer cannot be attached to the default framebuffer |
| 393 GrAlwaysAssert(framebuffer); | 394 GrAlwaysAssert(framebuffer); |
| 394 | 395 |
| 395 // a renderBufferID of 0 is acceptable - it unbinds the current | 396 // a renderBufferID of 0 is acceptable - it unbinds the current |
| (...skipping 19 matching lines...) Expand all Loading... |
| 415 | 416 |
| 416 } | 417 } |
| 417 | 418 |
| 418 ///////////////////////////////////////////////////////////////////////////////
/ | 419 ///////////////////////////////////////////////////////////////////////////////
/ |
| 419 GrGLvoid GR_GL_FUNCTION_TYPE debugGLFramebufferTexture2D(GrGLenum target, | 420 GrGLvoid GR_GL_FUNCTION_TYPE debugGLFramebufferTexture2D(GrGLenum target, |
| 420 GrGLenum attachment, | 421 GrGLenum attachment, |
| 421 GrGLenum textarget, | 422 GrGLenum textarget, |
| 422 GrGLuint textureID, | 423 GrGLuint textureID, |
| 423 GrGLint level) { | 424 GrGLint level) { |
| 424 | 425 |
| 425 GrAlwaysAssert(GR_GL_FRAMEBUFFER == target); | 426 GrAlwaysAssert(GR_GL_FRAMEBUFFER == target || GR_GL_READ_FRAMEBUFFER == targ
et || |
| 427 GR_GL_DRAW_FRAMEBUFFER == target); |
| 426 GrAlwaysAssert(GR_GL_COLOR_ATTACHMENT0 == attachment || | 428 GrAlwaysAssert(GR_GL_COLOR_ATTACHMENT0 == attachment || |
| 427 GR_GL_DEPTH_ATTACHMENT == attachment || | 429 GR_GL_DEPTH_ATTACHMENT == attachment || |
| 428 GR_GL_STENCIL_ATTACHMENT == attachment); | 430 GR_GL_STENCIL_ATTACHMENT == attachment); |
| 429 GrAlwaysAssert(GR_GL_TEXTURE_2D == textarget); | 431 GrAlwaysAssert(GR_GL_TEXTURE_2D == textarget); |
| 430 | 432 |
| 431 GrFrameBufferObj *framebuffer = GrDebugGL::getInstance()->getFrameBuffer(); | 433 GrFrameBufferObj *framebuffer = GrDebugGL::getInstance()->getFrameBuffer(); |
| 432 // A texture cannot be attached to the default framebuffer | 434 // A texture cannot be attached to the default framebuffer |
| 433 GrAlwaysAssert(framebuffer); | 435 GrAlwaysAssert(framebuffer); |
| 434 | 436 |
| 435 // A textureID of 0 is allowed - it unbinds the currently bound texture | 437 // A textureID of 0 is allowed - it unbinds the currently bound texture |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 functions->fMatrixLoadIdentity = noOpGLMatrixLoadIdentity; | 978 functions->fMatrixLoadIdentity = noOpGLMatrixLoadIdentity; |
| 977 | 979 |
| 978 functions->fBindFragDataLocationIndexed = | 980 functions->fBindFragDataLocationIndexed = |
| 979 noOpGLBindFragDataLocationIndexed; | 981 noOpGLBindFragDataLocationIndexed; |
| 980 | 982 |
| 981 interface->fExtensions.init(kGL_GrGLStandard, functions->fGetString, functio
ns->fGetStringi, | 983 interface->fExtensions.init(kGL_GrGLStandard, functions->fGetString, functio
ns->fGetStringi, |
| 982 functions->fGetIntegerv); | 984 functions->fGetIntegerv); |
| 983 | 985 |
| 984 return interface; | 986 return interface; |
| 985 } | 987 } |
| OLD | NEW |