Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WebGL2RenderingContextBase_h | 5 #ifndef WebGL2RenderingContextBase_h |
| 6 #define WebGL2RenderingContextBase_h | 6 #define WebGL2RenderingContextBase_h |
| 7 | 7 |
| 8 #include "modules/webgl/WebGLExtension.h" | 8 #include "modules/webgl/WebGLExtension.h" |
| 9 #include "modules/webgl/WebGLRenderingContextBase.h" | 9 #include "modules/webgl/WebGLRenderingContextBase.h" |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 ScriptValue getInternalformatParameter(ScriptState*, GLenum, GLenum, GLenum) ; | 50 ScriptValue getInternalformatParameter(ScriptState*, GLenum, GLenum, GLenum) ; |
| 51 void invalidateFramebuffer(GLenum, const Vector<GLenum>&); | 51 void invalidateFramebuffer(GLenum, const Vector<GLenum>&); |
| 52 void invalidateSubFramebuffer(GLenum, const Vector<GLenum>&, GLint, GLint, G Lsizei, GLsizei); | 52 void invalidateSubFramebuffer(GLenum, const Vector<GLenum>&, GLint, GLint, G Lsizei, GLsizei); |
| 53 void readBuffer(GLenum); | 53 void readBuffer(GLenum); |
| 54 | 54 |
| 55 /* Renderbuffer objects */ | 55 /* Renderbuffer objects */ |
| 56 void renderbufferStorageMultisample(GLenum, GLsizei, GLenum, GLsizei, GLsize i); | 56 void renderbufferStorageMultisample(GLenum, GLsizei, GLenum, GLsizei, GLsize i); |
| 57 | 57 |
| 58 /* Texture objects */ | 58 /* Texture objects */ |
| 59 void texImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenu m, GLintptr); | 59 void texImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenu m, GLintptr); |
| 60 void texImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenu m, ImageData*); | |
| 61 void texImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenu m, HTMLImageElement*, ExceptionState&); | |
| 62 void texImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenu m, HTMLCanvasElement*, ExceptionState&); | |
| 63 void texImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenu m, HTMLVideoElement*, ExceptionState&); | |
| 64 void texImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenu m, ImageBitmap*, ExceptionState&); | |
| 65 void texImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenu m, DOMArrayBufferView*, GLuint); | |
| 66 | |
| 60 void texSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GL enum, GLintptr); | 67 void texSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GL enum, GLintptr); |
| 68 void texSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GL enum, ImageData*); | |
| 69 void texSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GL enum, HTMLImageElement*, ExceptionState&); | |
| 70 void texSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GL enum, HTMLCanvasElement*, ExceptionState&); | |
| 71 void texSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GL enum, HTMLVideoElement*, ExceptionState&); | |
| 72 void texSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GL enum, ImageBitmap*, ExceptionState&); | |
| 73 void texSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GL enum, DOMArrayBufferView*, GLuint); | |
| 74 | |
| 61 // Have to re-declare/re-define the following tex{Sub}Image2D functions from base class. | 75 // Have to re-declare/re-define the following tex{Sub}Image2D functions from base class. |
| 62 // This is because the above tex{Sub}Image2D() hides the name from base clas s. | 76 // This is because the above tex{Sub}Image2D() hides the name from base clas s. |
| 63 void texImage2D(GLenum target, GLint level, GLint internalformat, | 77 void texImage2D(GLenum, GLint, GLint, GLenum, GLenum, ImageData*); |
| 64 GLsizei width, GLsizei height, GLint border, | 78 void texImage2D(GLenum, GLint, GLint, GLenum, GLenum, HTMLImageElement*, Exc eptionState&); |
| 65 GLenum format, GLenum type, DOMArrayBufferView*); | 79 void texImage2D(GLenum, GLint, GLint, GLenum, GLenum, HTMLCanvasElement*, Ex ceptionState&); |
| 66 void texImage2D(GLenum target, GLint level, GLint internalformat, | 80 void texImage2D(GLenum, GLint, GLint, GLenum, GLenum, HTMLVideoElement*, Exc eptionState&); |
| 67 GLenum format, GLenum type, ImageData*); | 81 void texImage2D(GLenum, GLint, GLint, GLenum, GLenum, ImageBitmap*, Exceptio nState&); |
| 68 void texImage2D(GLenum target, GLint level, GLint internalformat, | 82 void texSubImage2D(GLenum, GLint, GLint, GLint, GLenum, GLenum, ImageData*); |
| 69 GLenum format, GLenum type, HTMLImageElement*, ExceptionState&); | 83 void texSubImage2D(GLenum, GLint, GLint, GLint, GLenum, GLenum, HTMLImageEle ment*, ExceptionState&); |
| 70 void texImage2D(GLenum target, GLint level, GLint internalformat, | 84 void texSubImage2D(GLenum, GLint, GLint, GLint, GLenum, GLenum, HTMLCanvasEl ement*, ExceptionState&); |
| 71 GLenum format, GLenum type, HTMLCanvasElement*, ExceptionState&); | 85 void texSubImage2D(GLenum, GLint, GLint, GLint, GLenum, GLenum, HTMLVideoEle ment*, ExceptionState&); |
| 72 void texImage2D(GLenum target, GLint level, GLint internalformat, | 86 void texSubImage2D(GLenum, GLint, GLint, GLint, GLenum, GLenum, ImageBitmap* , ExceptionState&); |
| 73 GLenum format, GLenum type, HTMLVideoElement*, ExceptionState&); | |
| 74 void texImage2D(GLenum target, GLint level, GLint internalformat, | |
| 75 GLenum format, GLenum type, ImageBitmap*, ExceptionState&); | |
| 76 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, | |
| 77 GLsizei width, GLsizei height, | |
| 78 GLenum format, GLenum type, DOMArrayBufferView*); | |
| 79 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, | |
| 80 GLenum format, GLenum type, ImageData*); | |
| 81 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, | |
| 82 GLenum format, GLenum type, HTMLImageElement*, ExceptionState&); | |
| 83 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, | |
| 84 GLenum format, GLenum type, HTMLCanvasElement*, ExceptionState&); | |
| 85 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, | |
| 86 GLenum format, GLenum type, HTMLVideoElement*, ExceptionState&); | |
| 87 void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, | |
| 88 GLenum format, GLenum type, ImageBitmap*, ExceptionState&); | |
| 89 | 87 |
| 90 void texStorage2D(GLenum, GLsizei, GLenum, GLsizei, GLsizei); | 88 void texStorage2D(GLenum, GLsizei, GLenum, GLsizei, GLsizei); |
| 91 void texStorage3D(GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei); | 89 void texStorage3D(GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei); |
| 92 void texImage3D(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLen um, GLenum, DOMArrayBufferView*); | 90 void texImage3D(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLen um, GLenum, DOMArrayBufferView*, GLuint); |
| 91 void texImage3D(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLen um, GLenum, ImageData*); | |
| 92 void texImage3D(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLen um, GLenum, HTMLImageElement*, ExceptionState&); | |
| 93 void texImage3D(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLen um, GLenum, HTMLCanvasElement*, ExceptionState&); | |
| 94 void texImage3D(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLen um, GLenum, HTMLVideoElement*, ExceptionState&); | |
| 95 void texImage3D(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLen um, GLenum, ImageBitmap*, ExceptionState&); | |
| 93 void texImage3D(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLen um, GLenum, GLintptr); | 96 void texImage3D(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLen um, GLenum, GLintptr); |
| 94 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLs izei, GLenum, GLenum, DOMArrayBufferView*); | 97 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLs izei, GLenum, GLenum, DOMArrayBufferView*, GLuint); |
| 95 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLs izei, GLenum, GLenum, GLintptr); | 98 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLs izei, GLenum, GLenum, GLintptr); |
| 99 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLs izei, GLenum, GLenum, ImageData*); | |
| 100 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLs izei, GLenum, GLenum, HTMLImageElement*, ExceptionState&); | |
| 101 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLs izei, GLenum, GLenum, HTMLCanvasElement*, ExceptionState&); | |
| 102 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLs izei, GLenum, GLenum, HTMLVideoElement*, ExceptionState&); | |
| 103 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLs izei, GLenum, GLenum, ImageBitmap*, ExceptionState&); | |
| 104 | |
| 105 // TODO(zmo): Obsoltete, remove after WebGL2 conformance tests are updated. | |
|
Ken Russell (switch to Gerrit)
2016/08/23 22:03:20
typo: obsolete. Here and below.
Zhenyao Mo
2016/08/23 22:13:40
Done.
| |
| 106 void texImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenu m, DOMArrayBufferView*); | |
| 107 void texSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GL enum, DOMArrayBufferView*); | |
| 96 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLenum, GLenum, Image Data*); | 108 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLenum, GLenum, Image Data*); |
| 97 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLenum, GLenum, HTMLI mageElement*, ExceptionState&); | 109 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLenum, GLenum, HTMLI mageElement*, ExceptionState&); |
| 98 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLenum, GLenum, HTMLC anvasElement*, ExceptionState&); | 110 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLenum, GLenum, HTMLC anvasElement*, ExceptionState&); |
| 99 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLenum, GLenum, HTMLV ideoElement*, ExceptionState&); | 111 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLenum, GLenum, HTMLV ideoElement*, ExceptionState&); |
| 100 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLenum, GLenum, Image Bitmap*, ExceptionState&); | 112 void texSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLenum, GLenum, Image Bitmap*, ExceptionState&); |
| 113 | |
| 101 void copyTexSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLs izei, GLsizei); | 114 void copyTexSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLs izei, GLsizei); |
| 102 void compressedTexImage3D(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, DOMArrayBufferView*); | 115 void compressedTexImage3D(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, DOMArrayBufferView*); |
| 103 void compressedTexSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLsizei, GL sizei, GLsizei, GLenum, DOMArrayBufferView*); | 116 void compressedTexSubImage3D(GLenum, GLint, GLint, GLint, GLint, GLsizei, GL sizei, GLsizei, GLenum, DOMArrayBufferView*); |
| 104 | 117 |
| 105 /* Programs and shaders */ | 118 /* Programs and shaders */ |
| 106 GLint getFragDataLocation(WebGLProgram*, const String&); | 119 GLint getFragDataLocation(WebGLProgram*, const String&); |
| 107 | 120 |
| 108 /* Uniforms and attributes */ | 121 /* Uniforms and attributes */ |
| 109 void uniform1ui(const WebGLUniformLocation*, GLuint); | 122 void uniform1ui(const WebGLUniformLocation*, GLuint); |
| 110 void uniform2ui(const WebGLUniformLocation*, GLuint, GLuint); | 123 void uniform2ui(const WebGLUniformLocation*, GLuint, GLuint); |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 328 ScopedPersistent<v8::Array> m_queryWrappers; | 341 ScopedPersistent<v8::Array> m_queryWrappers; |
| 329 }; | 342 }; |
| 330 | 343 |
| 331 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, | 344 DEFINE_TYPE_CASTS(WebGL2RenderingContextBase, CanvasRenderingContext, context, |
| 332 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, | 345 context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) >= 2, |
| 333 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2) ; | 346 context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) >= 2) ; |
| 334 | 347 |
| 335 } // namespace blink | 348 } // namespace blink |
| 336 | 349 |
| 337 #endif | 350 #endif |
| OLD | NEW |