| 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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 // Dispatches a context lost event once it is determined that one is needed. | 505 // Dispatches a context lost event once it is determined that one is needed. |
| 506 // This is used for synthetic, WEBGL_lose_context and real context losses. F
or real ones, it's | 506 // This is used for synthetic, WEBGL_lose_context and real context losses. F
or real ones, it's |
| 507 // likely that there's no JavaScript on the stack, but that might be depende
nt | 507 // likely that there's no JavaScript on the stack, but that might be depende
nt |
| 508 // on how exactly the platform discovers that the context was lost. For bett
er | 508 // on how exactly the platform discovers that the context was lost. For bett
er |
| 509 // portability we always defer the dispatch of the event. | 509 // portability we always defer the dispatch of the event. |
| 510 Timer<WebGLRenderingContextBase> m_dispatchContextLostEventTimer; | 510 Timer<WebGLRenderingContextBase> m_dispatchContextLostEventTimer; |
| 511 bool m_restoreAllowed; | 511 bool m_restoreAllowed; |
| 512 Timer<WebGLRenderingContextBase> m_restoreTimer; | 512 Timer<WebGLRenderingContextBase> m_restoreTimer; |
| 513 | 513 |
| 514 bool m_markedCanvasDirty; | 514 bool m_markedCanvasDirty; |
| 515 PersistentHeapHashSetWillBeHeapHashSet<WeakMember<WebGLContextObject>> m_con
textObjects; | 515 #if ENABLE(OILPAN) |
| 516 HeapHashSet<WeakMember<WebGLContextObject>> m_contextObjects; |
| 517 #else |
| 518 // The hash set isn't traced, hence the references are effectively |
| 519 // weakly kept. Each WebGLContextObject is responsible for detaching |
| 520 // itself upon finalization if the WebGLRenderingContextBase hasn't been |
| 521 // finalized already and detached them via detachAndRemoveAllObjects(). |
| 522 GC_PLUGIN_IGNORE("534524") |
| 523 HashSet<WebGLContextObject*> m_contextObjects; |
| 524 #endif |
| 516 | 525 |
| 517 PersistentWillBeMember<WebGLRenderingContextLostCallback> m_contextLostCallb
ackAdapter; | 526 PersistentWillBeMember<WebGLRenderingContextLostCallback> m_contextLostCallb
ackAdapter; |
| 518 PersistentWillBeMember<WebGLRenderingContextErrorMessageCallback> m_errorMes
sageCallbackAdapter; | 527 PersistentWillBeMember<WebGLRenderingContextErrorMessageCallback> m_errorMes
sageCallbackAdapter; |
| 519 | 528 |
| 520 // List of bound VBO's. Used to maintain info about sizes for ARRAY_BUFFER a
nd stored values for ELEMENT_ARRAY_BUFFER | 529 // List of bound VBO's. Used to maintain info about sizes for ARRAY_BUFFER a
nd stored values for ELEMENT_ARRAY_BUFFER |
| 521 PersistentWillBeMember<WebGLBuffer> m_boundArrayBuffer; | 530 PersistentWillBeMember<WebGLBuffer> m_boundArrayBuffer; |
| 522 | 531 |
| 523 PersistentWillBeMember<WebGLVertexArrayObjectBase> m_defaultVertexArrayObjec
t; | 532 PersistentWillBeMember<WebGLVertexArrayObjectBase> m_defaultVertexArrayObjec
t; |
| 524 PersistentWillBeMember<WebGLVertexArrayObjectBase> m_boundVertexArrayObject; | 533 PersistentWillBeMember<WebGLVertexArrayObjectBase> m_boundVertexArrayObject; |
| 525 void setBoundVertexArrayObject(WebGLVertexArrayObjectBase* arrayObject) | 534 void setBoundVertexArrayObject(WebGLVertexArrayObjectBase* arrayObject) |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1106 static IntSize oldestContextSize(); | 1115 static IntSize oldestContextSize(); |
| 1107 }; | 1116 }; |
| 1108 | 1117 |
| 1109 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); | 1118 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); |
| 1110 | 1119 |
| 1111 } // namespace blink | 1120 } // namespace blink |
| 1112 | 1121 |
| 1113 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); | 1122 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); |
| 1114 | 1123 |
| 1115 #endif // WebGLRenderingContextBase_h | 1124 #endif // WebGLRenderingContextBase_h |
| OLD | NEW |