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

Side by Side Diff: Source/core/html/canvas/WebGLProgram.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/WebGLProgram.h ('k') | Source/core/html/canvas/WebGLRenderbuffer.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 25 matching lines...) Expand all
36 { 36 {
37 return adoptRef(new WebGLProgram(ctx)); 37 return adoptRef(new WebGLProgram(ctx));
38 } 38 }
39 39
40 WebGLProgram::WebGLProgram(WebGLRenderingContext* ctx) 40 WebGLProgram::WebGLProgram(WebGLRenderingContext* ctx)
41 : WebGLSharedObject(ctx) 41 : WebGLSharedObject(ctx)
42 , m_linkStatus(false) 42 , m_linkStatus(false)
43 , m_linkCount(0) 43 , m_linkCount(0)
44 , m_infoValid(true) 44 , m_infoValid(true)
45 { 45 {
46 ScriptWrappable::init(this);
46 setObject(ctx->graphicsContext3D()->createProgram()); 47 setObject(ctx->graphicsContext3D()->createProgram());
47 } 48 }
48 49
49 WebGLProgram::~WebGLProgram() 50 WebGLProgram::~WebGLProgram()
50 { 51 {
51 deleteObject(0); 52 deleteObject(0);
52 } 53 }
53 54
54 void WebGLProgram::deleteObjectImpl(GraphicsContext3D* context3d, Platform3DObje ct obj) 55 void WebGLProgram::deleteObjectImpl(GraphicsContext3D* context3d, Platform3DObje ct obj)
55 { 56 {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 return; 186 return;
186 GC3Dint linkStatus = 0; 187 GC3Dint linkStatus = 0;
187 context->getProgramiv(object(), GraphicsContext3D::LINK_STATUS, &linkStatus) ; 188 context->getProgramiv(object(), GraphicsContext3D::LINK_STATUS, &linkStatus) ;
188 m_linkStatus = linkStatus; 189 m_linkStatus = linkStatus;
189 if (m_linkStatus) 190 if (m_linkStatus)
190 cacheActiveAttribLocations(context); 191 cacheActiveAttribLocations(context);
191 m_infoValid = true; 192 m_infoValid = true;
192 } 193 }
193 194
194 } 195 }
OLDNEW
« no previous file with comments | « Source/core/html/canvas/WebGLProgram.h ('k') | Source/core/html/canvas/WebGLRenderbuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698