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

Side by Side Diff: Source/bindings/v8/custom/V8WebGLRenderingContextCustom.cpp

Issue 17230006: Implement WEBGL_shared_resources Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "V8WebGLCompressedTextureS3TC.h" 60 #include "V8WebGLCompressedTextureS3TC.h"
61 #include "V8WebGLDebugRendererInfo.h" 61 #include "V8WebGLDebugRendererInfo.h"
62 #include "V8WebGLDebugShaders.h" 62 #include "V8WebGLDebugShaders.h"
63 #include "V8WebGLDepthTexture.h" 63 #include "V8WebGLDepthTexture.h"
64 #include "V8WebGLDrawBuffers.h" 64 #include "V8WebGLDrawBuffers.h"
65 #include "V8WebGLFramebuffer.h" 65 #include "V8WebGLFramebuffer.h"
66 #include "V8WebGLLoseContext.h" 66 #include "V8WebGLLoseContext.h"
67 #include "V8WebGLProgram.h" 67 #include "V8WebGLProgram.h"
68 #include "V8WebGLRenderbuffer.h" 68 #include "V8WebGLRenderbuffer.h"
69 #include "V8WebGLShader.h" 69 #include "V8WebGLShader.h"
70 #include "V8WebGLSharedResources.h"
70 #include "V8WebGLTexture.h" 71 #include "V8WebGLTexture.h"
71 #include "V8WebGLUniformLocation.h" 72 #include "V8WebGLUniformLocation.h"
72 #include "V8WebGLVertexArrayObjectOES.h" 73 #include "V8WebGLVertexArrayObjectOES.h"
73 #include "bindings/v8/V8Binding.h" 74 #include "bindings/v8/V8Binding.h"
74 #include "bindings/v8/V8HiddenPropertyName.h" 75 #include "bindings/v8/V8HiddenPropertyName.h"
75 #include "core/dom/ExceptionCode.h" 76 #include "core/dom/ExceptionCode.h"
76 #include "core/html/canvas/WebGLRenderingContext.h" 77 #include "core/html/canvas/WebGLRenderingContext.h"
77 #include "core/platform/NotImplemented.h" 78 #include "core/platform/NotImplemented.h"
78 #include <limits> 79 #include <limits>
79 #include "wtf/FastMalloc.h" 80 #include "wtf/FastMalloc.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 extensionObject = toV8(static_cast<WebGLDepthTexture*>(extension), conte xtObject, isolate); 243 extensionObject = toV8(static_cast<WebGLDepthTexture*>(extension), conte xtObject, isolate);
243 referenceName = "webGLDepthTextureName"; 244 referenceName = "webGLDepthTextureName";
244 break; 245 break;
245 case WebGLExtension::WebGLDrawBuffersName: 246 case WebGLExtension::WebGLDrawBuffersName:
246 extensionObject = toV8(static_cast<WebGLDrawBuffers*>(extension), contex tObject, isolate); 247 extensionObject = toV8(static_cast<WebGLDrawBuffers*>(extension), contex tObject, isolate);
247 referenceName = "webGLDrawBuffersName"; 248 referenceName = "webGLDrawBuffersName";
248 break; 249 break;
249 case WebGLExtension::WebGLLoseContextName: 250 case WebGLExtension::WebGLLoseContextName:
250 extensionObject = toV8(static_cast<WebGLLoseContext*>(extension), contex tObject, isolate); 251 extensionObject = toV8(static_cast<WebGLLoseContext*>(extension), contex tObject, isolate);
251 referenceName = "webGLLoseContextName"; 252 referenceName = "webGLLoseContextName";
253 case WebGLExtension::WebGLSharedResourcesName:
254 extensionObject = toV8(static_cast<WebGLSharedResources*>(extension), co ntextObject, isolate);
255 referenceName = "webGLSharedResourcesName";
252 break; 256 break;
253 } 257 }
254 ASSERT(!extensionObject.IsEmpty()); 258 ASSERT(!extensionObject.IsEmpty());
255 V8HiddenPropertyName::setNamedHiddenReference(contextObject, referenceName, extensionObject); 259 V8HiddenPropertyName::setNamedHiddenReference(contextObject, referenceName, extensionObject);
256 return extensionObject; 260 return extensionObject;
257 } 261 }
258 262
259 enum ObjectType { 263 enum ObjectType {
260 kBuffer, kRenderbuffer, kTexture, kVertexAttrib 264 kBuffer, kRenderbuffer, kTexture, kVertexAttrib
261 }; 265 };
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 { 832 {
829 vertexAttribAndUniformHelperf(args, kVertexAttrib3v); 833 vertexAttribAndUniformHelperf(args, kVertexAttrib3v);
830 } 834 }
831 835
832 void V8WebGLRenderingContext::vertexAttrib4fvMethodCustom(const v8::FunctionCall backInfo<v8::Value>& args) 836 void V8WebGLRenderingContext::vertexAttrib4fvMethodCustom(const v8::FunctionCall backInfo<v8::Value>& args)
833 { 837 {
834 vertexAttribAndUniformHelperf(args, kVertexAttrib4v); 838 vertexAttribAndUniformHelperf(args, kVertexAttrib4v);
835 } 839 }
836 840
837 } // namespace WebCore 841 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698