| 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 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 static void removeFromEvictedList(WebGLRenderingContextBase*); | 1084 static void removeFromEvictedList(WebGLRenderingContextBase*); |
| 1085 static void willDestroyContext(WebGLRenderingContextBase*); | 1085 static void willDestroyContext(WebGLRenderingContextBase*); |
| 1086 static void forciblyLoseOldestContext(const String& reason); | 1086 static void forciblyLoseOldestContext(const String& reason); |
| 1087 // Return the least recently used context's position in the active context v
ector. | 1087 // Return the least recently used context's position in the active context v
ector. |
| 1088 // If the vector is empty, return the maximum allowed active context number. | 1088 // If the vector is empty, return the maximum allowed active context number. |
| 1089 static WebGLRenderingContextBase* oldestContext(); | 1089 static WebGLRenderingContextBase* oldestContext(); |
| 1090 static WebGLRenderingContextBase* oldestEvictedContext(); | 1090 static WebGLRenderingContextBase* oldestEvictedContext(); |
| 1091 | 1091 |
| 1092 CrossThreadWeakPersistentThisPointer<WebGLRenderingContextBase> createWeakTh
isPointer() { return CrossThreadWeakPersistentThisPointer<WebGLRenderingContextB
ase>(this); } | 1092 CrossThreadWeakPersistentThisPointer<WebGLRenderingContextBase> createWeakTh
isPointer() { return CrossThreadWeakPersistentThisPointer<WebGLRenderingContextB
ase>(this); } |
| 1093 | 1093 |
| 1094 ImageBitmap* transferToImageBitmapBase(); |
| 1094 private: | 1095 private: |
| 1095 WebGLRenderingContextBase(HTMLCanvasElement*, OffscreenCanvas*, PassOwnPtr<W
ebGraphicsContext3DProvider>, const WebGLContextAttributes&); | 1096 WebGLRenderingContextBase(HTMLCanvasElement*, OffscreenCanvas*, PassOwnPtr<W
ebGraphicsContext3DProvider>, const WebGLContextAttributes&); |
| 1096 static PassOwnPtr<WebGraphicsContext3DProvider> createContextProviderInterna
l(HTMLCanvasElement*, ScriptState*, WebGLContextAttributes, unsigned); | 1097 static PassOwnPtr<WebGraphicsContext3DProvider> createContextProviderInterna
l(HTMLCanvasElement*, ScriptState*, WebGLContextAttributes, unsigned); |
| 1097 class ContextProviderCreationInfo; | 1098 class ContextProviderCreationInfo; |
| 1098 static void createContextProviderOnMainThread(ContextProviderCreationInfo*,
WaitableEvent*); | 1099 static void createContextProviderOnMainThread(ContextProviderCreationInfo*,
WaitableEvent*); |
| 1099 static PassOwnPtr<WebGraphicsContext3DProvider> createContextProviderOnWorke
rThread(Platform::ContextAttributes, Platform::GraphicsInfo, ScriptState*); | 1100 static PassOwnPtr<WebGraphicsContext3DProvider> createContextProviderOnWorke
rThread(Platform::ContextAttributes, Platform::GraphicsInfo, ScriptState*); |
| 1100 }; | 1101 }; |
| 1101 | 1102 |
| 1102 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); | 1103 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); |
| 1103 | 1104 |
| 1104 } // namespace blink | 1105 } // namespace blink |
| 1105 | 1106 |
| 1106 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); | 1107 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); |
| 1107 | 1108 |
| 1108 #endif // WebGLRenderingContextBase_h | 1109 #endif // WebGLRenderingContextBase_h |
| OLD | NEW |