Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: Source/core/html/canvas/WebGLFramebuffer.cpp

Issue 15481002: Make WebGL objects scriptwrappable so that binding integrity checks may be applied to them. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix WebGLProgram really really. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/canvas/WebGLFramebuffer.h ('k') | Source/core/html/canvas/WebGLLoseContext.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 PassRefPtr<WebGLFramebuffer> WebGLFramebuffer::create(WebGLRenderingContext* ctx ) 270 PassRefPtr<WebGLFramebuffer> WebGLFramebuffer::create(WebGLRenderingContext* ctx )
271 { 271 {
272 return adoptRef(new WebGLFramebuffer(ctx)); 272 return adoptRef(new WebGLFramebuffer(ctx));
273 } 273 }
274 274
275 WebGLFramebuffer::WebGLFramebuffer(WebGLRenderingContext* ctx) 275 WebGLFramebuffer::WebGLFramebuffer(WebGLRenderingContext* ctx)
276 : WebGLContextObject(ctx) 276 : WebGLContextObject(ctx)
277 , m_hasEverBeenBound(false) 277 , m_hasEverBeenBound(false)
278 { 278 {
279 ScriptWrappable::init(this);
279 setObject(ctx->graphicsContext3D()->createFramebuffer()); 280 setObject(ctx->graphicsContext3D()->createFramebuffer());
280 } 281 }
281 282
282 WebGLFramebuffer::~WebGLFramebuffer() 283 WebGLFramebuffer::~WebGLFramebuffer()
283 { 284 {
284 deleteObject(0); 285 deleteObject(0);
285 } 286 }
286 287
287 void WebGLFramebuffer::setAttachmentForBoundFramebuffer(GC3Denum attachment, GC3 Denum texTarget, WebGLTexture* texture, GC3Dint level) 288 void WebGLFramebuffer::setAttachmentForBoundFramebuffer(GC3Denum attachment, GC3 Denum texTarget, WebGLTexture* texture, GC3Dint level)
288 { 289 {
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 int index = static_cast<int>(drawBuffer - Extensions3D::DRAW_BUFFER0_EXT); 539 int index = static_cast<int>(drawBuffer - Extensions3D::DRAW_BUFFER0_EXT);
539 ASSERT(index >= 0); 540 ASSERT(index >= 0);
540 if (index < static_cast<int>(m_drawBuffers.size())) 541 if (index < static_cast<int>(m_drawBuffers.size()))
541 return m_drawBuffers[index]; 542 return m_drawBuffers[index];
542 if (drawBuffer == Extensions3D::DRAW_BUFFER0_EXT) 543 if (drawBuffer == Extensions3D::DRAW_BUFFER0_EXT)
543 return GraphicsContext3D::COLOR_ATTACHMENT0; 544 return GraphicsContext3D::COLOR_ATTACHMENT0;
544 return GraphicsContext3D::NONE; 545 return GraphicsContext3D::NONE;
545 } 546 }
546 547
547 } 548 }
OLDNEW
« no previous file with comments | « Source/core/html/canvas/WebGLFramebuffer.h ('k') | Source/core/html/canvas/WebGLLoseContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698