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