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

Side by Side Diff: Source/core/html/canvas/WebGLShader.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
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 24 matching lines...) Expand all
35 PassRefPtr<WebGLShader> WebGLShader::create(WebGLRenderingContext* ctx, GC3Denum type) 35 PassRefPtr<WebGLShader> WebGLShader::create(WebGLRenderingContext* ctx, GC3Denum type)
36 { 36 {
37 return adoptRef(new WebGLShader(ctx, type)); 37 return adoptRef(new WebGLShader(ctx, type));
38 } 38 }
39 39
40 WebGLShader::WebGLShader(WebGLRenderingContext* ctx, GC3Denum type) 40 WebGLShader::WebGLShader(WebGLRenderingContext* ctx, GC3Denum type)
41 : WebGLSharedObject(ctx) 41 : WebGLSharedObject(ctx)
42 , m_type(type) 42 , m_type(type)
43 , m_source("") 43 , m_source("")
44 { 44 {
45 ScriptWrappable::init(this);
45 setObject(ctx->graphicsContext3D()->createShader(type)); 46 setObject(ctx->graphicsContext3D()->createShader(type));
46 } 47 }
47 48
48 WebGLShader::~WebGLShader() 49 WebGLShader::~WebGLShader()
49 { 50 {
50 deleteObject(0); 51 deleteObject(0);
51 } 52 }
52 53
53 void WebGLShader::deleteObjectImpl(GraphicsContext3D* context3d, Platform3DObjec t object) 54 void WebGLShader::deleteObjectImpl(GraphicsContext3D* context3d, Platform3DObjec t object)
54 { 55 {
55 context3d->deleteShader(object); 56 context3d->deleteShader(object);
56 } 57 }
57 58
58 } 59 }
OLDNEW
« no previous file with comments | « Source/core/html/canvas/WebGLShader.h ('k') | Source/core/html/canvas/WebGLShaderPrecisionFormat.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698