| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 | 309 |
| 310 WebGLFramebuffer::WebGLAttachment* WebGLFramebuffer::GetAttachment( | 310 WebGLFramebuffer::WebGLAttachment* WebGLFramebuffer::GetAttachment( |
| 311 GLenum attachment) const { | 311 GLenum attachment) const { |
| 312 const AttachmentMap::const_iterator it = attachments_.find(attachment); | 312 const AttachmentMap::const_iterator it = attachments_.find(attachment); |
| 313 return (it != attachments_.end()) ? it->value.Get() : 0; | 313 return (it != attachments_.end()) ? it->value.Get() : 0; |
| 314 } | 314 } |
| 315 | 315 |
| 316 void WebGLFramebuffer::RemoveAttachmentFromBoundFramebuffer( | 316 void WebGLFramebuffer::RemoveAttachmentFromBoundFramebuffer( |
| 317 GLenum target, | 317 GLenum target, |
| 318 WebGLSharedObject* attachment) { | 318 WebGLSharedObject* attachment) { |
| 319 ASSERT(IsBound(target)); | 319 DCHECK(IsBound(target)); |
| 320 if (!object_) | 320 if (!object_) |
| 321 return; | 321 return; |
| 322 if (!attachment) | 322 if (!attachment) |
| 323 return; | 323 return; |
| 324 | 324 |
| 325 bool check_more = true; | 325 bool check_more = true; |
| 326 bool is_web_gl1 = !Context()->IsWebGL2OrHigher(); | 326 bool is_web_gl1 = !Context()->IsWebGL2OrHigher(); |
| 327 bool check_web_gl1_depth_stencil = false; | 327 bool check_web_gl1_depth_stencil = false; |
| 328 while (check_more) { | 328 while (check_more) { |
| 329 check_more = false; | 329 check_more = false; |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 } | 547 } |
| 548 | 548 |
| 549 DEFINE_TRACE_WRAPPERS(WebGLFramebuffer) { | 549 DEFINE_TRACE_WRAPPERS(WebGLFramebuffer) { |
| 550 for (const auto& attachment : attachments_) { | 550 for (const auto& attachment : attachments_) { |
| 551 visitor->TraceWrappers(attachment.value); | 551 visitor->TraceWrappers(attachment.value); |
| 552 } | 552 } |
| 553 WebGLContextObject::TraceWrappers(visitor); | 553 WebGLContextObject::TraceWrappers(visitor); |
| 554 } | 554 } |
| 555 | 555 |
| 556 } // namespace blink | 556 } // namespace blink |
| OLD | NEW |