| 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 26 matching lines...) Expand all Loading... |
| 37 #include "core/layout/LayoutBoxModelObject.h" | 37 #include "core/layout/LayoutBoxModelObject.h" |
| 38 #include "modules/webgl/WebGLContextAttributes.h" | 38 #include "modules/webgl/WebGLContextAttributes.h" |
| 39 #include "modules/webgl/WebGLExtensionName.h" | 39 #include "modules/webgl/WebGLExtensionName.h" |
| 40 #include "modules/webgl/WebGLTexture.h" | 40 #include "modules/webgl/WebGLTexture.h" |
| 41 #include "modules/webgl/WebGLVertexArrayObjectBase.h" | 41 #include "modules/webgl/WebGLVertexArrayObjectBase.h" |
| 42 #include "platform/Timer.h" | 42 #include "platform/Timer.h" |
| 43 #include "platform/graphics/ImageBuffer.h" | 43 #include "platform/graphics/ImageBuffer.h" |
| 44 #include "platform/graphics/gpu/DrawingBuffer.h" | 44 #include "platform/graphics/gpu/DrawingBuffer.h" |
| 45 #include "platform/graphics/gpu/Extensions3DUtil.h" | 45 #include "platform/graphics/gpu/Extensions3DUtil.h" |
| 46 #include "platform/graphics/gpu/WebGLImageConversion.h" | 46 #include "platform/graphics/gpu/WebGLImageConversion.h" |
| 47 #include "public/platform/Platform.h" |
| 48 #include "public/platform/WebGraphicsContext3DProvider.h" |
| 47 #include "third_party/khronos/GLES2/gl2.h" | 49 #include "third_party/khronos/GLES2/gl2.h" |
| 48 #include "wtf/OwnPtr.h" | 50 #include "wtf/OwnPtr.h" |
| 49 #include "wtf/text/WTFString.h" | 51 #include "wtf/text/WTFString.h" |
| 50 | 52 |
| 51 #include <set> | 53 #include <set> |
| 52 | 54 |
| 53 namespace blink { | 55 namespace blink { |
| 54 class WebLayer; | 56 class WebLayer; |
| 55 } | 57 } |
| 56 | 58 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 76 class ImageBuffer; | 78 class ImageBuffer; |
| 77 class ImageData; | 79 class ImageData; |
| 78 class IntSize; | 80 class IntSize; |
| 79 class OESElementIndexUint; | 81 class OESElementIndexUint; |
| 80 class OESStandardDerivatives; | 82 class OESStandardDerivatives; |
| 81 class OESTextureFloat; | 83 class OESTextureFloat; |
| 82 class OESTextureFloatLinear; | 84 class OESTextureFloatLinear; |
| 83 class OESTextureHalfFloat; | 85 class OESTextureHalfFloat; |
| 84 class OESTextureHalfFloatLinear; | 86 class OESTextureHalfFloatLinear; |
| 85 class OESVertexArrayObject; | 87 class OESVertexArrayObject; |
| 88 class WaitableEvent; |
| 86 class WebGLActiveInfo; | 89 class WebGLActiveInfo; |
| 87 class WebGLBuffer; | 90 class WebGLBuffer; |
| 88 class WebGLCompressedTextureASTC; | 91 class WebGLCompressedTextureASTC; |
| 89 class WebGLCompressedTextureATC; | 92 class WebGLCompressedTextureATC; |
| 90 class WebGLCompressedTextureETC1; | 93 class WebGLCompressedTextureETC1; |
| 91 class WebGLCompressedTexturePVRTC; | 94 class WebGLCompressedTexturePVRTC; |
| 92 class WebGLCompressedTextureS3TC; | 95 class WebGLCompressedTextureS3TC; |
| 93 class WebGLContextGroup; | 96 class WebGLContextGroup; |
| 94 class WebGLContextObject; | 97 class WebGLContextObject; |
| 95 class WebGLDebugRendererInfo; | 98 class WebGLDebugRendererInfo; |
| (...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 static void forciblyLoseOldestContext(const String& reason); | 1086 static void forciblyLoseOldestContext(const String& reason); |
| 1084 // 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. |
| 1085 // 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. |
| 1086 static WebGLRenderingContextBase* oldestContext(); | 1089 static WebGLRenderingContextBase* oldestContext(); |
| 1087 static WebGLRenderingContextBase* oldestEvictedContext(); | 1090 static WebGLRenderingContextBase* oldestEvictedContext(); |
| 1088 | 1091 |
| 1089 CrossThreadWeakPersistentThisPointer<WebGLRenderingContextBase> createWeakTh
isPointer() { return CrossThreadWeakPersistentThisPointer<WebGLRenderingContextB
ase>(this); } | 1092 CrossThreadWeakPersistentThisPointer<WebGLRenderingContextBase> createWeakTh
isPointer() { return CrossThreadWeakPersistentThisPointer<WebGLRenderingContextB
ase>(this); } |
| 1090 | 1093 |
| 1091 private: | 1094 private: |
| 1092 WebGLRenderingContextBase(HTMLCanvasElement*, OffscreenCanvas*, PassOwnPtr<W
ebGraphicsContext3DProvider>, const WebGLContextAttributes&); | 1095 WebGLRenderingContextBase(HTMLCanvasElement*, OffscreenCanvas*, PassOwnPtr<W
ebGraphicsContext3DProvider>, const WebGLContextAttributes&); |
| 1096 static PassOwnPtr<WebGraphicsContext3DProvider> createContextProviderInterna
l(HTMLCanvasElement*, ScriptState*, WebGLContextAttributes, unsigned); |
| 1097 class ContextProviderCreationInfo; |
| 1098 static void createContextProviderOnMainThread(ContextProviderCreationInfo*,
WaitableEvent*); |
| 1099 static PassOwnPtr<WebGraphicsContext3DProvider> createContextProviderOnWorke
rThread(Platform::ContextAttributes, Platform::GraphicsInfo, ScriptState*); |
| 1093 }; | 1100 }; |
| 1094 | 1101 |
| 1095 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); | 1102 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co
ntext->is3d(), context.is3d()); |
| 1096 | 1103 |
| 1097 } // namespace blink | 1104 } // namespace blink |
| 1098 | 1105 |
| 1099 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); | 1106 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(blink::WebGLRenderingContextB
ase::TextureUnitState); |
| 1100 | 1107 |
| 1101 #endif // WebGLRenderingContextBase_h | 1108 #endif // WebGLRenderingContextBase_h |
| OLD | NEW |