| OLD | NEW |
| 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 15 matching lines...) Expand all Loading... |
| 26 #ifndef WebGLRenderingContextBase_h | 26 #ifndef WebGLRenderingContextBase_h |
| 27 #define WebGLRenderingContextBase_h | 27 #define WebGLRenderingContextBase_h |
| 28 | 28 |
| 29 #include "bindings/core/v8/Nullable.h" | 29 #include "bindings/core/v8/Nullable.h" |
| 30 #include "bindings/core/v8/ScriptState.h" | 30 #include "bindings/core/v8/ScriptState.h" |
| 31 #include "bindings/core/v8/ScriptValue.h" | 31 #include "bindings/core/v8/ScriptValue.h" |
| 32 #include "bindings/core/v8/ScriptWrappable.h" | 32 #include "bindings/core/v8/ScriptWrappable.h" |
| 33 #include "core/dom/ActiveDOMObject.h" | 33 #include "core/dom/ActiveDOMObject.h" |
| 34 #include "core/dom/DOMTypedArray.h" | 34 #include "core/dom/DOMTypedArray.h" |
| 35 #include "core/html/canvas/CanvasRenderingContext.h" | 35 #include "core/html/canvas/CanvasRenderingContext.h" |
| 36 #include "core/html/canvas/WebGLContextAttributes.h" |
| 36 #include "core/html/canvas/WebGLExtensionName.h" | 37 #include "core/html/canvas/WebGLExtensionName.h" |
| 37 #include "core/html/canvas/WebGLVertexArrayObjectOES.h" | 38 #include "core/html/canvas/WebGLVertexArrayObjectOES.h" |
| 38 #include "core/page/Page.h" | 39 #include "core/page/Page.h" |
| 39 #include "core/rendering/RenderBoxModelObject.h" | 40 #include "core/rendering/RenderBoxModelObject.h" |
| 40 #include "platform/Timer.h" | 41 #include "platform/Timer.h" |
| 41 #include "platform/graphics/GraphicsTypes3D.h" | 42 #include "platform/graphics/GraphicsTypes3D.h" |
| 42 #include "platform/graphics/ImageBuffer.h" | 43 #include "platform/graphics/ImageBuffer.h" |
| 43 #include "platform/graphics/gpu/DrawingBuffer.h" | 44 #include "platform/graphics/gpu/DrawingBuffer.h" |
| 44 #include "platform/graphics/gpu/Extensions3DUtil.h" | 45 #include "platform/graphics/gpu/Extensions3DUtil.h" |
| 45 #include "platform/graphics/gpu/WebGLImageConversion.h" | 46 #include "platform/graphics/gpu/WebGLImageConversion.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 73 class OESTextureFloatLinear; | 74 class OESTextureFloatLinear; |
| 74 class OESTextureHalfFloat; | 75 class OESTextureHalfFloat; |
| 75 class OESTextureHalfFloatLinear; | 76 class OESTextureHalfFloatLinear; |
| 76 class OESVertexArrayObject; | 77 class OESVertexArrayObject; |
| 77 class WebGLActiveInfo; | 78 class WebGLActiveInfo; |
| 78 class WebGLBuffer; | 79 class WebGLBuffer; |
| 79 class WebGLCompressedTextureATC; | 80 class WebGLCompressedTextureATC; |
| 80 class WebGLCompressedTextureETC1; | 81 class WebGLCompressedTextureETC1; |
| 81 class WebGLCompressedTexturePVRTC; | 82 class WebGLCompressedTexturePVRTC; |
| 82 class WebGLCompressedTextureS3TC; | 83 class WebGLCompressedTextureS3TC; |
| 83 class WebGLContextAttributes; | |
| 84 class WebGLContextGroup; | 84 class WebGLContextGroup; |
| 85 class WebGLContextObject; | 85 class WebGLContextObject; |
| 86 class WebGLDebugRendererInfo; | 86 class WebGLDebugRendererInfo; |
| 87 class WebGLDebugShaders; | 87 class WebGLDebugShaders; |
| 88 class WebGLDepthTexture; | 88 class WebGLDepthTexture; |
| 89 class WebGLDrawBuffers; | 89 class WebGLDrawBuffers; |
| 90 class WebGLExtension; | 90 class WebGLExtension; |
| 91 class WebGLFramebuffer; | 91 class WebGLFramebuffer; |
| 92 class WebGLLoseContext; | 92 class WebGLLoseContext; |
| 93 class WebGLObject; | 93 class WebGLObject; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 void framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget
, WebGLTexture*, GLint level); | 187 void framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget
, WebGLTexture*, GLint level); |
| 188 void frontFace(GLenum mode); | 188 void frontFace(GLenum mode); |
| 189 void generateMipmap(GLenum target); | 189 void generateMipmap(GLenum target); |
| 190 | 190 |
| 191 PassRefPtrWillBeRawPtr<WebGLActiveInfo> getActiveAttrib(WebGLProgram*, GLuin
t index); | 191 PassRefPtrWillBeRawPtr<WebGLActiveInfo> getActiveAttrib(WebGLProgram*, GLuin
t index); |
| 192 PassRefPtrWillBeRawPtr<WebGLActiveInfo> getActiveUniform(WebGLProgram*, GLui
nt index); | 192 PassRefPtrWillBeRawPtr<WebGLActiveInfo> getActiveUniform(WebGLProgram*, GLui
nt index); |
| 193 bool getAttachedShaders(WebGLProgram*, WillBeHeapVector<RefPtrWillBeMember<W
ebGLShader>>&); | 193 bool getAttachedShaders(WebGLProgram*, WillBeHeapVector<RefPtrWillBeMember<W
ebGLShader>>&); |
| 194 Nullable<WillBeHeapVector<RefPtrWillBeMember<WebGLShader>>> getAttachedShade
rs(WebGLProgram*); | 194 Nullable<WillBeHeapVector<RefPtrWillBeMember<WebGLShader>>> getAttachedShade
rs(WebGLProgram*); |
| 195 GLint getAttribLocation(WebGLProgram*, const String& name); | 195 GLint getAttribLocation(WebGLProgram*, const String& name); |
| 196 ScriptValue getBufferParameter(ScriptState*, GLenum target, GLenum pname); | 196 ScriptValue getBufferParameter(ScriptState*, GLenum target, GLenum pname); |
| 197 PassRefPtrWillBeRawPtr<WebGLContextAttributes> getContextAttributes(); | 197 void getContextAttributes(Nullable<WebGLContextAttributes>&); |
| 198 GLenum getError(); | 198 GLenum getError(); |
| 199 PassRefPtrWillBeRawPtr<WebGLExtension> getExtension(const String& name); | 199 PassRefPtrWillBeRawPtr<WebGLExtension> getExtension(const String& name); |
| 200 ScriptValue getFramebufferAttachmentParameter(ScriptState*, GLenum target, G
Lenum attachment, GLenum pname); | 200 ScriptValue getFramebufferAttachmentParameter(ScriptState*, GLenum target, G
Lenum attachment, GLenum pname); |
| 201 ScriptValue getParameter(ScriptState*, GLenum pname); | 201 ScriptValue getParameter(ScriptState*, GLenum pname); |
| 202 ScriptValue getProgramParameter(ScriptState*, WebGLProgram*, GLenum pname); | 202 ScriptValue getProgramParameter(ScriptState*, WebGLProgram*, GLenum pname); |
| 203 String getProgramInfoLog(WebGLProgram*); | 203 String getProgramInfoLog(WebGLProgram*); |
| 204 ScriptValue getRenderbufferParameter(ScriptState*, GLenum target, GLenum pna
me); | 204 ScriptValue getRenderbufferParameter(ScriptState*, GLenum target, GLenum pna
me); |
| 205 ScriptValue getShaderParameter(ScriptState*, WebGLShader*, GLenum pname); | 205 ScriptValue getShaderParameter(ScriptState*, WebGLShader*, GLenum pname); |
| 206 String getShaderInfoLog(WebGLShader*); | 206 String getShaderInfoLog(WebGLShader*); |
| 207 PassRefPtrWillBeRawPtr<WebGLShaderPrecisionFormat> getShaderPrecisionFormat(
GLenum shaderType, GLenum precisionType); | 207 PassRefPtrWillBeRawPtr<WebGLShaderPrecisionFormat> getShaderPrecisionFormat(
GLenum shaderType, GLenum precisionType); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 friend class OESVertexArrayObject; | 392 friend class OESVertexArrayObject; |
| 393 friend class WebGLDebugShaders; | 393 friend class WebGLDebugShaders; |
| 394 friend class WebGLCompressedTextureATC; | 394 friend class WebGLCompressedTextureATC; |
| 395 friend class WebGLCompressedTextureETC1; | 395 friend class WebGLCompressedTextureETC1; |
| 396 friend class WebGLCompressedTexturePVRTC; | 396 friend class WebGLCompressedTexturePVRTC; |
| 397 friend class WebGLCompressedTextureS3TC; | 397 friend class WebGLCompressedTextureS3TC; |
| 398 friend class WebGLRenderingContextErrorMessageCallback; | 398 friend class WebGLRenderingContextErrorMessageCallback; |
| 399 friend class WebGLVertexArrayObjectOES; | 399 friend class WebGLVertexArrayObjectOES; |
| 400 friend class ScopedTexture2DRestorer; | 400 friend class ScopedTexture2DRestorer; |
| 401 | 401 |
| 402 WebGLRenderingContextBase(HTMLCanvasElement*, PassOwnPtr<blink::WebGraphicsC
ontext3D>, WebGLContextAttributes*); | 402 WebGLRenderingContextBase(HTMLCanvasElement*, PassOwnPtr<blink::WebGraphicsC
ontext3D>, const WebGLContextAttributes&); |
| 403 PassRefPtr<DrawingBuffer> createDrawingBuffer(PassOwnPtr<blink::WebGraphicsC
ontext3D>); | 403 PassRefPtr<DrawingBuffer> createDrawingBuffer(PassOwnPtr<blink::WebGraphicsC
ontext3D>); |
| 404 void initializeNewContext(); | 404 void initializeNewContext(); |
| 405 void setupFlags(); | 405 void setupFlags(); |
| 406 | 406 |
| 407 #if ENABLE(OILPAN) | 407 #if ENABLE(OILPAN) |
| 408 PassRefPtr<WebGLSharedWebGraphicsContext3D> sharedWebGraphicsContext3D() con
st; | 408 PassRefPtr<WebGLSharedWebGraphicsContext3D> sharedWebGraphicsContext3D() con
st; |
| 409 #endif | 409 #endif |
| 410 | 410 |
| 411 // CanvasRenderingContext implementation. | 411 // CanvasRenderingContext implementation. |
| 412 virtual bool is3d() const override { return true; } | 412 virtual bool is3d() const override { return true; } |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 GLint m_maxColorAttachments; | 549 GLint m_maxColorAttachments; |
| 550 GLenum m_backDrawBuffer; | 550 GLenum m_backDrawBuffer; |
| 551 bool m_drawBuffersWebGLRequirementsChecked; | 551 bool m_drawBuffersWebGLRequirementsChecked; |
| 552 bool m_drawBuffersSupported; | 552 bool m_drawBuffersSupported; |
| 553 | 553 |
| 554 GLint m_packAlignment; | 554 GLint m_packAlignment; |
| 555 GLint m_unpackAlignment; | 555 GLint m_unpackAlignment; |
| 556 bool m_unpackFlipY; | 556 bool m_unpackFlipY; |
| 557 bool m_unpackPremultiplyAlpha; | 557 bool m_unpackPremultiplyAlpha; |
| 558 GLenum m_unpackColorspaceConversion; | 558 GLenum m_unpackColorspaceConversion; |
| 559 RefPtrWillBeMember<WebGLContextAttributes> m_requestedAttributes; | 559 WebGLContextAttributes m_requestedAttributes; |
| 560 | 560 |
| 561 GLfloat m_clearColor[4]; | 561 GLfloat m_clearColor[4]; |
| 562 bool m_scissorEnabled; | 562 bool m_scissorEnabled; |
| 563 GLfloat m_clearDepth; | 563 GLfloat m_clearDepth; |
| 564 GLint m_clearStencil; | 564 GLint m_clearStencil; |
| 565 GLboolean m_colorMask[4]; | 565 GLboolean m_colorMask[4]; |
| 566 GLboolean m_depthMask; | 566 GLboolean m_depthMask; |
| 567 | 567 |
| 568 bool m_stencilEnabled; | 568 bool m_stencilEnabled; |
| 569 GLuint m_stencilMask, m_stencilMaskBack; | 569 GLuint m_stencilMask, m_stencilMaskBack; |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 static IntSize oldestContextSize(); | 975 static IntSize oldestContextSize(); |
| 976 }; | 976 }; |
| 977 | 977 |
| 978 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); | 978 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); |
| 979 | 979 |
| 980 } // namespace blink | 980 } // namespace blink |
| 981 | 981 |
| 982 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); | 982 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); |
| 983 | 983 |
| 984 #endif // WebGLRenderingContextBase_h | 984 #endif // WebGLRenderingContextBase_h |
| OLD | NEW |