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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 GLenum attachment, | 429 GLenum attachment, |
430 GLenum texTarget, | 430 GLenum texTarget, |
431 WebGLTexture* texture, | 431 WebGLTexture* texture, |
432 GLint level, | 432 GLint level, |
433 GLint layer) { | 433 GLint layer) { |
434 DCHECK(isBound(target)); | 434 DCHECK(isBound(target)); |
435 DCHECK(m_object); | 435 DCHECK(m_object); |
436 removeAttachmentInternal(target, attachment); | 436 removeAttachmentInternal(target, attachment); |
437 if (texture && texture->object()) { | 437 if (texture && texture->object()) { |
438 m_attachments.insert( | 438 m_attachments.insert( |
439 attachment, TraceWrapperMember<WebGLAttachment>( | 439 attachment, |
440 this, WebGLTextureAttachment::create(texture, texTarget, | 440 TraceWrapperMember<WebGLAttachment>( |
441 level, layer))); | 441 this, |
| 442 WebGLTextureAttachment::create(texture, texTarget, level, layer))); |
442 drawBuffersIfNecessary(false); | 443 drawBuffersIfNecessary(false); |
443 texture->onAttached(); | 444 texture->onAttached(); |
444 } | 445 } |
445 } | 446 } |
446 | 447 |
447 void WebGLFramebuffer::setAttachmentInternal(GLenum target, | 448 void WebGLFramebuffer::setAttachmentInternal(GLenum target, |
448 GLenum attachment, | 449 GLenum attachment, |
449 WebGLRenderbuffer* renderbuffer) { | 450 WebGLRenderbuffer* renderbuffer) { |
450 DCHECK(isBound(target)); | 451 DCHECK(isBound(target)); |
451 DCHECK(m_object); | 452 DCHECK(m_object); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 } | 550 } |
550 | 551 |
551 DEFINE_TRACE_WRAPPERS(WebGLFramebuffer) { | 552 DEFINE_TRACE_WRAPPERS(WebGLFramebuffer) { |
552 for (const auto& attachment : m_attachments) { | 553 for (const auto& attachment : m_attachments) { |
553 visitor->traceWrappers(attachment.value); | 554 visitor->traceWrappers(attachment.value); |
554 } | 555 } |
555 WebGLContextObject::traceWrappers(visitor); | 556 WebGLContextObject::traceWrappers(visitor); |
556 } | 557 } |
557 | 558 |
558 } // namespace blink | 559 } // namespace blink |
OLD | NEW |