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 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 static void willDestroyContext(WebGLRenderingContextBase*); | 1081 static void willDestroyContext(WebGLRenderingContextBase*); |
1082 static void forciblyLoseOldestContext(const String& reason); | 1082 static void forciblyLoseOldestContext(const String& reason); |
1083 // Return the least recently used context's position in the active context v
ector. | 1083 // Return the least recently used context's position in the active context v
ector. |
1084 // If the vector is empty, return the maximum allowed active context number. | 1084 // If the vector is empty, return the maximum allowed active context number. |
1085 static WebGLRenderingContextBase* oldestContext(); | 1085 static WebGLRenderingContextBase* oldestContext(); |
1086 static WebGLRenderingContextBase* oldestEvictedContext(); | 1086 static WebGLRenderingContextBase* oldestEvictedContext(); |
1087 | 1087 |
1088 CrossThreadWeakPersistentThisPointer<WebGLRenderingContextBase> createWeakTh
isPointer() { return CrossThreadWeakPersistentThisPointer<WebGLRenderingContextB
ase>(this); } | 1088 CrossThreadWeakPersistentThisPointer<WebGLRenderingContextBase> createWeakTh
isPointer() { return CrossThreadWeakPersistentThisPointer<WebGLRenderingContextB
ase>(this); } |
1089 | 1089 |
1090 ImageBitmap* transferToImageBitmapBase(); | 1090 ImageBitmap* transferToImageBitmapBase(); |
| 1091 |
| 1092 // Helper functions for tex(Sub)Image2D && texSubImage3D |
| 1093 void texImageHelperDOMArrayBufferView(const char*, GLenum, GLint, GLint, GLs
izei, GLsizei, GLint, GLenum, GLenum, GLsizei, GLint, GLint, GLint, DOMArrayBuff
erView*); |
| 1094 void texImageHelperImageData(const char*, GLenum, GLint, GLint, GLint, GLenu
m, GLenum, GLsizei, GLint, GLint, GLint, ImageData*); |
| 1095 bool texImageHelperHTMLImageElement(const char*, GLenum, GLint, GLint, GLenu
m, GLenum, GLint, GLint, GLint, HTMLImageElement*, ExceptionState&); |
| 1096 WebGLTexture* texImageHelperHTMLCanvasElement(const char*, GLenum, GLint, GL
int, GLenum, GLenum, GLint, GLint, GLint, HTMLCanvasElement*, ExceptionState&); |
| 1097 WebGLTexture* texImageHelperHTMLVideoElement(const char*, GLenum, GLint, GLi
nt, GLenum, GLenum, GLint, GLint, GLint, HTMLVideoElement*, ExceptionState&); |
| 1098 void texImageHelperImageBitmap(const char*, GLenum, GLint, GLint, GLenum, GL
enum, GLint, GLint, GLint, ImageBitmap*, ExceptionState&); |
| 1099 |
1091 private: | 1100 private: |
1092 WebGLRenderingContextBase(HTMLCanvasElement*, OffscreenCanvas*, PassOwnPtr<W
ebGraphicsContext3DProvider>, const WebGLContextAttributes&); | 1101 WebGLRenderingContextBase(HTMLCanvasElement*, OffscreenCanvas*, PassOwnPtr<W
ebGraphicsContext3DProvider>, const WebGLContextAttributes&); |
1093 static PassOwnPtr<WebGraphicsContext3DProvider> createContextProviderInterna
l(HTMLCanvasElement*, ScriptState*, WebGLContextAttributes, unsigned); | 1102 static PassOwnPtr<WebGraphicsContext3DProvider> createContextProviderInterna
l(HTMLCanvasElement*, ScriptState*, WebGLContextAttributes, unsigned); |
1094 }; | 1103 }; |
1095 | 1104 |
1096 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); | 1105 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); |
1097 | 1106 |
1098 } // namespace blink | 1107 } // namespace blink |
1099 | 1108 |
1100 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); | 1109 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); |
1101 | 1110 |
1102 #endif // WebGLRenderingContextBase_h | 1111 #endif // WebGLRenderingContextBase_h |
OLD | NEW |