| 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 18 matching lines...) Expand all Loading... |
| 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/CoreExport.h" | 33 #include "core/CoreExport.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/WebGLContextAttributes.h" |
| 37 #include "core/html/canvas/WebGLExtensionName.h" | 37 #include "core/html/canvas/WebGLExtensionName.h" |
| 38 #include "core/html/canvas/WebGLTexture.h" | 38 #include "core/html/canvas/WebGLTexture.h" |
| 39 #include "core/html/canvas/WebGLVertexArrayObjectOES.h" | 39 #include "core/html/canvas/WebGLVertexArrayObjectBase.h" |
| 40 #include "core/layout/LayoutBoxModelObject.h" | 40 #include "core/layout/LayoutBoxModelObject.h" |
| 41 #include "core/page/Page.h" | 41 #include "core/page/Page.h" |
| 42 #include "platform/Timer.h" | 42 #include "platform/Timer.h" |
| 43 #include "platform/graphics/GraphicsTypes3D.h" | 43 #include "platform/graphics/GraphicsTypes3D.h" |
| 44 #include "platform/graphics/ImageBuffer.h" | 44 #include "platform/graphics/ImageBuffer.h" |
| 45 #include "platform/graphics/gpu/DrawingBuffer.h" | 45 #include "platform/graphics/gpu/DrawingBuffer.h" |
| 46 #include "platform/graphics/gpu/Extensions3DUtil.h" | 46 #include "platform/graphics/gpu/Extensions3DUtil.h" |
| 47 #include "platform/graphics/gpu/WebGLImageConversion.h" | 47 #include "platform/graphics/gpu/WebGLImageConversion.h" |
| 48 #include "public/platform/WebGraphicsContext3D.h" | 48 #include "public/platform/WebGraphicsContext3D.h" |
| 49 #include "wtf/OwnPtr.h" | 49 #include "wtf/OwnPtr.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 class WebGLFramebuffer; | 92 class WebGLFramebuffer; |
| 93 class WebGLLoseContext; | 93 class WebGLLoseContext; |
| 94 class WebGLObject; | 94 class WebGLObject; |
| 95 class WebGLProgram; | 95 class WebGLProgram; |
| 96 class WebGLRenderbuffer; | 96 class WebGLRenderbuffer; |
| 97 class WebGLShader; | 97 class WebGLShader; |
| 98 class WebGLShaderPrecisionFormat; | 98 class WebGLShaderPrecisionFormat; |
| 99 class WebGLSharedObject; | 99 class WebGLSharedObject; |
| 100 class WebGLSharedWebGraphicsContext3D; | 100 class WebGLSharedWebGraphicsContext3D; |
| 101 class WebGLUniformLocation; | 101 class WebGLUniformLocation; |
| 102 class WebGLVertexArrayObjectOES; | 102 class WebGLVertexArrayObjectBase; |
| 103 | 103 |
| 104 class WebGLRenderingContextLostCallback; | 104 class WebGLRenderingContextLostCallback; |
| 105 class WebGLRenderingContextErrorMessageCallback; | 105 class WebGLRenderingContextErrorMessageCallback; |
| 106 | 106 |
| 107 class CORE_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext, pub
lic Page::MultisamplingChangedObserver, public ScriptWrappable { | 107 class CORE_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext, pub
lic Page::MultisamplingChangedObserver, public ScriptWrappable { |
| 108 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WebGLRenderingContextBase); | 108 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(WebGLRenderingContextBase); |
| 109 public: | 109 public: |
| 110 virtual ~WebGLRenderingContextBase(); | 110 virtual ~WebGLRenderingContextBase(); |
| 111 | 111 |
| 112 virtual unsigned version() const = 0; | 112 virtual unsigned version() const = 0; |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 friend class WebGLFramebuffer; | 398 friend class WebGLFramebuffer; |
| 399 friend class WebGLObject; | 399 friend class WebGLObject; |
| 400 friend class WebGLContextObject; | 400 friend class WebGLContextObject; |
| 401 friend class OESVertexArrayObject; | 401 friend class OESVertexArrayObject; |
| 402 friend class WebGLDebugShaders; | 402 friend class WebGLDebugShaders; |
| 403 friend class WebGLCompressedTextureATC; | 403 friend class WebGLCompressedTextureATC; |
| 404 friend class WebGLCompressedTextureETC1; | 404 friend class WebGLCompressedTextureETC1; |
| 405 friend class WebGLCompressedTexturePVRTC; | 405 friend class WebGLCompressedTexturePVRTC; |
| 406 friend class WebGLCompressedTextureS3TC; | 406 friend class WebGLCompressedTextureS3TC; |
| 407 friend class WebGLRenderingContextErrorMessageCallback; | 407 friend class WebGLRenderingContextErrorMessageCallback; |
| 408 friend class WebGLVertexArrayObjectOES; | 408 friend class WebGLVertexArrayObjectBase; |
| 409 friend class ScopedTexture2DRestorer; | 409 friend class ScopedTexture2DRestorer; |
| 410 friend class ScopedFramebufferRestorer; | 410 friend class ScopedFramebufferRestorer; |
| 411 | 411 |
| 412 WebGLRenderingContextBase(HTMLCanvasElement*, PassOwnPtr<WebGraphicsContext3
D>, const WebGLContextAttributes&); | 412 WebGLRenderingContextBase(HTMLCanvasElement*, PassOwnPtr<WebGraphicsContext3
D>, const WebGLContextAttributes&); |
| 413 PassRefPtr<DrawingBuffer> createDrawingBuffer(PassOwnPtr<WebGraphicsContext3
D>); | 413 PassRefPtr<DrawingBuffer> createDrawingBuffer(PassOwnPtr<WebGraphicsContext3
D>); |
| 414 void setupFlags(); | 414 void setupFlags(); |
| 415 | 415 |
| 416 #if ENABLE(OILPAN) | 416 #if ENABLE(OILPAN) |
| 417 PassRefPtr<WebGLSharedWebGraphicsContext3D> sharedWebGraphicsContext3D() con
st; | 417 PassRefPtr<WebGLSharedWebGraphicsContext3D> sharedWebGraphicsContext3D() con
st; |
| 418 #endif | 418 #endif |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 | 480 |
| 481 bool m_markedCanvasDirty; | 481 bool m_markedCanvasDirty; |
| 482 WillBeHeapHashSet<RawPtrWillBeWeakMember<WebGLContextObject>> m_contextObjec
ts; | 482 WillBeHeapHashSet<RawPtrWillBeWeakMember<WebGLContextObject>> m_contextObjec
ts; |
| 483 | 483 |
| 484 OwnPtrWillBeMember<WebGLRenderingContextLostCallback> m_contextLostCallbackA
dapter; | 484 OwnPtrWillBeMember<WebGLRenderingContextLostCallback> m_contextLostCallbackA
dapter; |
| 485 OwnPtrWillBeMember<WebGLRenderingContextErrorMessageCallback> m_errorMessage
CallbackAdapter; | 485 OwnPtrWillBeMember<WebGLRenderingContextErrorMessageCallback> m_errorMessage
CallbackAdapter; |
| 486 | 486 |
| 487 // List of bound VBO's. Used to maintain info about sizes for ARRAY_BUFFER a
nd stored values for ELEMENT_ARRAY_BUFFER | 487 // List of bound VBO's. Used to maintain info about sizes for ARRAY_BUFFER a
nd stored values for ELEMENT_ARRAY_BUFFER |
| 488 RefPtrWillBeMember<WebGLBuffer> m_boundArrayBuffer; | 488 RefPtrWillBeMember<WebGLBuffer> m_boundArrayBuffer; |
| 489 | 489 |
| 490 RefPtrWillBeMember<WebGLVertexArrayObjectOES> m_defaultVertexArrayObject; | 490 RefPtrWillBeMember<WebGLVertexArrayObjectBase> m_defaultVertexArrayObject; |
| 491 RefPtrWillBeMember<WebGLVertexArrayObjectOES> m_boundVertexArrayObject; | 491 RefPtrWillBeMember<WebGLVertexArrayObjectBase> m_boundVertexArrayObject; |
| 492 void setBoundVertexArrayObject(PassRefPtrWillBeRawPtr<WebGLVertexArrayObject
OES> arrayObject) | 492 void setBoundVertexArrayObject(PassRefPtrWillBeRawPtr<WebGLVertexArrayObject
Base> arrayObject) |
| 493 { | 493 { |
| 494 if (arrayObject) | 494 if (arrayObject) |
| 495 m_boundVertexArrayObject = arrayObject; | 495 m_boundVertexArrayObject = arrayObject; |
| 496 else | 496 else |
| 497 m_boundVertexArrayObject = m_defaultVertexArrayObject; | 497 m_boundVertexArrayObject = m_defaultVertexArrayObject; |
| 498 } | 498 } |
| 499 | 499 |
| 500 enum VertexAttribValueType { | 500 enum VertexAttribValueType { |
| 501 Float32ArrayType, | 501 Float32ArrayType, |
| 502 Int32ArrayType, | 502 Int32ArrayType, |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 static IntSize oldestContextSize(); | 1015 static IntSize oldestContextSize(); |
| 1016 }; | 1016 }; |
| 1017 | 1017 |
| 1018 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); | 1018 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); |
| 1019 | 1019 |
| 1020 } // namespace blink | 1020 } // namespace blink |
| 1021 | 1021 |
| 1022 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); | 1022 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); |
| 1023 | 1023 |
| 1024 #endif // WebGLRenderingContextBase_h | 1024 #endif // WebGLRenderingContextBase_h |
| OLD | NEW |