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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 | 271 |
272 PassRefPtrWillBeRawPtr<WebGLFramebuffer> WebGLFramebuffer::create(WebGLRendering
ContextBase* ctx) | 272 PassRefPtrWillBeRawPtr<WebGLFramebuffer> WebGLFramebuffer::create(WebGLRendering
ContextBase* ctx) |
273 { | 273 { |
274 return adoptRefWillBeNoop(new WebGLFramebuffer(ctx)); | 274 return adoptRefWillBeNoop(new WebGLFramebuffer(ctx)); |
275 } | 275 } |
276 | 276 |
277 WebGLFramebuffer::WebGLFramebuffer(WebGLRenderingContextBase* ctx) | 277 WebGLFramebuffer::WebGLFramebuffer(WebGLRenderingContextBase* ctx) |
278 : WebGLContextObject(ctx) | 278 : WebGLContextObject(ctx) |
279 , m_hasEverBeenBound(false) | 279 , m_hasEverBeenBound(false) |
280 { | 280 { |
281 ScriptWrappable::init(this); | |
282 setObject(ctx->webContext()->createFramebuffer()); | 281 setObject(ctx->webContext()->createFramebuffer()); |
283 } | 282 } |
284 | 283 |
285 WebGLFramebuffer::~WebGLFramebuffer() | 284 WebGLFramebuffer::~WebGLFramebuffer() |
286 { | 285 { |
287 // Delete the platform framebuffer resource. Explicit detachment | 286 // Delete the platform framebuffer resource. Explicit detachment |
288 // is for the benefit of Oilpan, where the framebuffer object | 287 // is for the benefit of Oilpan, where the framebuffer object |
289 // isn't detached when it and the WebGLRenderingContextBase object | 288 // isn't detached when it and the WebGLRenderingContextBase object |
290 // it is registered with are both finalized. Without Oilpan, the | 289 // it is registered with are both finalized. Without Oilpan, the |
291 // object will have been detached. | 290 // object will have been detached. |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 | 629 |
631 void WebGLFramebuffer::trace(Visitor* visitor) | 630 void WebGLFramebuffer::trace(Visitor* visitor) |
632 { | 631 { |
633 #if ENABLE(OILPAN) | 632 #if ENABLE(OILPAN) |
634 visitor->trace(m_attachments); | 633 visitor->trace(m_attachments); |
635 #endif | 634 #endif |
636 WebGLContextObject::trace(visitor); | 635 WebGLContextObject::trace(visitor); |
637 } | 636 } |
638 | 637 |
639 } | 638 } |
OLD | NEW |