| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 GLenum WebGLFramebuffer::getDrawBuffer(GLenum drawBuffer) { | 524 GLenum WebGLFramebuffer::getDrawBuffer(GLenum drawBuffer) { |
| 525 int index = static_cast<int>(drawBuffer - GL_DRAW_BUFFER0_EXT); | 525 int index = static_cast<int>(drawBuffer - GL_DRAW_BUFFER0_EXT); |
| 526 ASSERT(index >= 0); | 526 ASSERT(index >= 0); |
| 527 if (index < static_cast<int>(m_drawBuffers.size())) | 527 if (index < static_cast<int>(m_drawBuffers.size())) |
| 528 return m_drawBuffers[index]; | 528 return m_drawBuffers[index]; |
| 529 if (drawBuffer == GL_DRAW_BUFFER0_EXT) | 529 if (drawBuffer == GL_DRAW_BUFFER0_EXT) |
| 530 return GL_COLOR_ATTACHMENT0; | 530 return GL_COLOR_ATTACHMENT0; |
| 531 return GL_NONE; | 531 return GL_NONE; |
| 532 } | 532 } |
| 533 | 533 |
| 534 void WebGLFramebuffer::visitChildDOMWrappers( | |
| 535 v8::Isolate* isolate, | |
| 536 const v8::Persistent<v8::Object>& wrapper) { | |
| 537 for (const auto& attachment : m_attachments) { | |
| 538 DOMWrapperWorld::setWrapperReferencesInAllWorlds( | |
| 539 wrapper, attachment.value->object(), isolate); | |
| 540 } | |
| 541 } | |
| 542 | |
| 543 DEFINE_TRACE(WebGLFramebuffer) { | 534 DEFINE_TRACE(WebGLFramebuffer) { |
| 544 visitor->trace(m_attachments); | 535 visitor->trace(m_attachments); |
| 545 WebGLContextObject::trace(visitor); | 536 WebGLContextObject::trace(visitor); |
| 546 } | 537 } |
| 547 | 538 |
| 548 DEFINE_TRACE_WRAPPERS(WebGLFramebuffer) { | 539 DEFINE_TRACE_WRAPPERS(WebGLFramebuffer) { |
| 549 for (const auto& attachment : m_attachments) { | 540 for (const auto& attachment : m_attachments) { |
| 550 visitor->traceWrappers(attachment.value); | 541 visitor->traceWrappers(attachment.value); |
| 551 } | 542 } |
| 552 WebGLContextObject::traceWrappers(visitor); | 543 WebGLContextObject::traceWrappers(visitor); |
| 553 } | 544 } |
| 554 | 545 |
| 555 } // namespace blink | 546 } // namespace blink |
| OLD | NEW |