| 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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 WebLayer* platformLayer() const override; | 459 WebLayer* platformLayer() const override; |
| 460 void stop() override; | 460 void stop() override; |
| 461 | 461 |
| 462 void addSharedObject(WebGLSharedObject*); | 462 void addSharedObject(WebGLSharedObject*); |
| 463 void addContextObject(WebGLContextObject*); | 463 void addContextObject(WebGLContextObject*); |
| 464 void detachAndRemoveAllObjects(); | 464 void detachAndRemoveAllObjects(); |
| 465 | 465 |
| 466 void destroyContext(); | 466 void destroyContext(); |
| 467 void markContextChanged(ContentChangeType); | 467 void markContextChanged(ContentChangeType); |
| 468 | 468 |
| 469 void onErrorMessage(const char*, int32_t id); |
| 470 |
| 469 void notifyCanvasContextChanged(); | 471 void notifyCanvasContextChanged(); |
| 470 | 472 |
| 471 // Query if depth_stencil buffer is supported. | 473 // Query if depth_stencil buffer is supported. |
| 472 bool isDepthStencilSupported() { return m_isDepthStencilSupported; } | 474 bool isDepthStencilSupported() { return m_isDepthStencilSupported; } |
| 473 | 475 |
| 474 // Helper to return the size in bytes of OpenGL data types | 476 // Helper to return the size in bytes of OpenGL data types |
| 475 // like GL_FLOAT, GL_INT, etc. | 477 // like GL_FLOAT, GL_INT, etc. |
| 476 unsigned sizeInBytes(GLenum type) const; | 478 unsigned sizeInBytes(GLenum type) const; |
| 477 | 479 |
| 478 // Check if each enabled vertex attribute is bound to a buffer. | 480 // Check if each enabled vertex attribute is bound to a buffer. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 507 // This is used for synthetic, WEBGL_lose_context and real context losses. F
or real ones, it's | 509 // This is used for synthetic, WEBGL_lose_context and real context losses. F
or real ones, it's |
| 508 // likely that there's no JavaScript on the stack, but that might be depende
nt | 510 // likely that there's no JavaScript on the stack, but that might be depende
nt |
| 509 // on how exactly the platform discovers that the context was lost. For bett
er | 511 // on how exactly the platform discovers that the context was lost. For bett
er |
| 510 // portability we always defer the dispatch of the event. | 512 // portability we always defer the dispatch of the event. |
| 511 Timer<WebGLRenderingContextBase> m_dispatchContextLostEventTimer; | 513 Timer<WebGLRenderingContextBase> m_dispatchContextLostEventTimer; |
| 512 bool m_restoreAllowed; | 514 bool m_restoreAllowed; |
| 513 Timer<WebGLRenderingContextBase> m_restoreTimer; | 515 Timer<WebGLRenderingContextBase> m_restoreTimer; |
| 514 | 516 |
| 515 bool m_markedCanvasDirty; | 517 bool m_markedCanvasDirty; |
| 516 HeapHashSet<WeakMember<WebGLContextObject>> m_contextObjects; | 518 HeapHashSet<WeakMember<WebGLContextObject>> m_contextObjects; |
| 517 Member<WebGLRenderingContextErrorMessageCallback> m_errorMessageCallbackAdap
ter; | |
| 518 | 519 |
| 519 // List of bound VBO's. Used to maintain info about sizes for ARRAY_BUFFER a
nd stored values for ELEMENT_ARRAY_BUFFER | 520 // List of bound VBO's. Used to maintain info about sizes for ARRAY_BUFFER a
nd stored values for ELEMENT_ARRAY_BUFFER |
| 520 Member<WebGLBuffer> m_boundArrayBuffer; | 521 Member<WebGLBuffer> m_boundArrayBuffer; |
| 521 | 522 |
| 522 Member<WebGLVertexArrayObjectBase> m_defaultVertexArrayObject; | 523 Member<WebGLVertexArrayObjectBase> m_defaultVertexArrayObject; |
| 523 Member<WebGLVertexArrayObjectBase> m_boundVertexArrayObject; | 524 Member<WebGLVertexArrayObjectBase> m_boundVertexArrayObject; |
| 524 bool m_preservedDefaultVAOObjectWrapper; | 525 bool m_preservedDefaultVAOObjectWrapper; |
| 525 void setBoundVertexArrayObject(ScriptState*, WebGLVertexArrayObjectBase*); | 526 void setBoundVertexArrayObject(ScriptState*, WebGLVertexArrayObjectBase*); |
| 526 | 527 |
| 527 enum VertexAttribValueType { | 528 enum VertexAttribValueType { |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1081 CrossThreadWeakPersistentThisPointer<WebGLRenderingContextBase> createWeakTh
isPointer() { return CrossThreadWeakPersistentThisPointer<WebGLRenderingContextB
ase>(this); } | 1082 CrossThreadWeakPersistentThisPointer<WebGLRenderingContextBase> createWeakTh
isPointer() { return CrossThreadWeakPersistentThisPointer<WebGLRenderingContextB
ase>(this); } |
| 1082 }; | 1083 }; |
| 1083 | 1084 |
| 1084 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); | 1085 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); |
| 1085 | 1086 |
| 1086 } // namespace blink | 1087 } // namespace blink |
| 1087 | 1088 |
| 1088 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); | 1089 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); |
| 1089 | 1090 |
| 1090 #endif // WebGLRenderingContextBase_h | 1091 #endif // WebGLRenderingContextBase_h |
| OLD | NEW |