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

Side by Side Diff: Source/core/html/canvas/OESVertexArrayObject.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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 18 matching lines...) Expand all
29 29
30 #include "core/html/canvas/WebGLRenderingContext.h" 30 #include "core/html/canvas/WebGLRenderingContext.h"
31 #include "core/html/canvas/WebGLVertexArrayObjectOES.h" 31 #include "core/html/canvas/WebGLVertexArrayObjectOES.h"
32 #include "core/platform/graphics/Extensions3D.h" 32 #include "core/platform/graphics/Extensions3D.h"
33 33
34 namespace WebCore { 34 namespace WebCore {
35 35
36 OESVertexArrayObject::OESVertexArrayObject(WebGLRenderingContext* context) 36 OESVertexArrayObject::OESVertexArrayObject(WebGLRenderingContext* context)
37 : WebGLExtension(context) 37 : WebGLExtension(context)
38 { 38 {
39 ScriptWrappable::init(this);
39 context->graphicsContext3D()->getExtensions()->ensureEnabled("GL_OES_vertex_ array_object"); 40 context->graphicsContext3D()->getExtensions()->ensureEnabled("GL_OES_vertex_ array_object");
40 } 41 }
41 42
42 OESVertexArrayObject::~OESVertexArrayObject() 43 OESVertexArrayObject::~OESVertexArrayObject()
43 { 44 {
44 } 45 }
45 46
46 WebGLExtension::ExtensionName OESVertexArrayObject::getName() const 47 WebGLExtension::ExtensionName OESVertexArrayObject::getName() const
47 { 48 {
48 return OESVertexArrayObjectName; 49 return OESVertexArrayObjectName;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 Extensions3D* extensions = context->graphicsContext3D()->getExtensions(); 115 Extensions3D* extensions = context->graphicsContext3D()->getExtensions();
115 return extensions->supports("GL_OES_vertex_array_object"); 116 return extensions->supports("GL_OES_vertex_array_object");
116 } 117 }
117 118
118 const char* OESVertexArrayObject::getExtensionName() 119 const char* OESVertexArrayObject::getExtensionName()
119 { 120 {
120 return "OES_vertex_array_object"; 121 return "OES_vertex_array_object";
121 } 122 }
122 123
123 } // namespace WebCore 124 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/canvas/OESVertexArrayObject.h ('k') | Source/core/html/canvas/WebGLActiveInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698