Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h

Issue 1914233006: Implement offscreenCanvas.getContext('webgl') on a worker thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 18 matching lines...) Expand all
29 #include "bindings/core/v8/Nullable.h" 29 #include "bindings/core/v8/Nullable.h"
30 #include "bindings/core/v8/ScriptState.h" 30 #include "bindings/core/v8/ScriptState.h"
31 #include "bindings/core/v8/ScriptValue.h" 31 #include "bindings/core/v8/ScriptValue.h"
32 #include "bindings/core/v8/ScriptWrappable.h" 32 #include "bindings/core/v8/ScriptWrappable.h"
33 #include "core/CoreExport.h" 33 #include "core/CoreExport.h"
34 #include "core/dom/DOMTypedArray.h" 34 #include "core/dom/DOMTypedArray.h"
35 #include "core/dom/TypedFlexibleArrayBufferView.h" 35 #include "core/dom/TypedFlexibleArrayBufferView.h"
36 #include "core/html/canvas/CanvasRenderingContext.h" 36 #include "core/html/canvas/CanvasRenderingContext.h"
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/WebGLContextProviderCreationInfo.h"
39 #include "modules/webgl/WebGLExtensionName.h" 40 #include "modules/webgl/WebGLExtensionName.h"
40 #include "modules/webgl/WebGLTexture.h" 41 #include "modules/webgl/WebGLTexture.h"
41 #include "modules/webgl/WebGLVertexArrayObjectBase.h" 42 #include "modules/webgl/WebGLVertexArrayObjectBase.h"
42 #include "platform/Timer.h" 43 #include "platform/Timer.h"
43 #include "platform/graphics/ImageBuffer.h" 44 #include "platform/graphics/ImageBuffer.h"
44 #include "platform/graphics/gpu/DrawingBuffer.h" 45 #include "platform/graphics/gpu/DrawingBuffer.h"
45 #include "platform/graphics/gpu/Extensions3DUtil.h" 46 #include "platform/graphics/gpu/Extensions3DUtil.h"
46 #include "platform/graphics/gpu/WebGLImageConversion.h" 47 #include "platform/graphics/gpu/WebGLImageConversion.h"
48 #include "public/platform/Platform.h"
49 #include "public/platform/WebGraphicsContext3DProvider.h"
47 #include "third_party/khronos/GLES2/gl2.h" 50 #include "third_party/khronos/GLES2/gl2.h"
48 #include "wtf/OwnPtr.h" 51 #include "wtf/OwnPtr.h"
49 #include "wtf/text/WTFString.h" 52 #include "wtf/text/WTFString.h"
50 53
51 #include <set> 54 #include <set>
52 55
53 namespace blink { 56 namespace blink {
54 class WebLayer; 57 class WebLayer;
55 } 58 }
56 59
(...skipping 19 matching lines...) Expand all
76 class ImageBuffer; 79 class ImageBuffer;
77 class ImageData; 80 class ImageData;
78 class IntSize; 81 class IntSize;
79 class OESElementIndexUint; 82 class OESElementIndexUint;
80 class OESStandardDerivatives; 83 class OESStandardDerivatives;
81 class OESTextureFloat; 84 class OESTextureFloat;
82 class OESTextureFloatLinear; 85 class OESTextureFloatLinear;
83 class OESTextureHalfFloat; 86 class OESTextureHalfFloat;
84 class OESTextureHalfFloatLinear; 87 class OESTextureHalfFloatLinear;
85 class OESVertexArrayObject; 88 class OESVertexArrayObject;
89 class WaitableEvent;
86 class WebGLActiveInfo; 90 class WebGLActiveInfo;
87 class WebGLBuffer; 91 class WebGLBuffer;
88 class WebGLCompressedTextureASTC; 92 class WebGLCompressedTextureASTC;
89 class WebGLCompressedTextureATC; 93 class WebGLCompressedTextureATC;
90 class WebGLCompressedTextureETC1; 94 class WebGLCompressedTextureETC1;
91 class WebGLCompressedTexturePVRTC; 95 class WebGLCompressedTexturePVRTC;
92 class WebGLCompressedTextureS3TC; 96 class WebGLCompressedTextureS3TC;
93 class WebGLContextGroup; 97 class WebGLContextGroup;
94 class WebGLContextObject; 98 class WebGLContextObject;
95 class WebGLDebugRendererInfo; 99 class WebGLDebugRendererInfo;
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 static void forciblyLoseOldestContext(const String& reason); 1087 static void forciblyLoseOldestContext(const String& reason);
1084 // Return the least recently used context's position in the active context v ector. 1088 // 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. 1089 // If the vector is empty, return the maximum allowed active context number.
1086 static WebGLRenderingContextBase* oldestContext(); 1090 static WebGLRenderingContextBase* oldestContext();
1087 static WebGLRenderingContextBase* oldestEvictedContext(); 1091 static WebGLRenderingContextBase* oldestEvictedContext();
1088 1092
1089 CrossThreadWeakPersistentThisPointer<WebGLRenderingContextBase> createWeakTh isPointer() { return CrossThreadWeakPersistentThisPointer<WebGLRenderingContextB ase>(this); } 1093 CrossThreadWeakPersistentThisPointer<WebGLRenderingContextBase> createWeakTh isPointer() { return CrossThreadWeakPersistentThisPointer<WebGLRenderingContextB ase>(this); }
1090 1094
1091 private: 1095 private:
1092 WebGLRenderingContextBase(HTMLCanvasElement*, OffscreenCanvas*, PassOwnPtr<W ebGraphicsContext3DProvider>, const WebGLContextAttributes&); 1096 WebGLRenderingContextBase(HTMLCanvasElement*, OffscreenCanvas*, PassOwnPtr<W ebGraphicsContext3DProvider>, const WebGLContextAttributes&);
1097 static PassOwnPtr<WebGraphicsContext3DProvider> createContextProviderInterna l(HTMLCanvasElement*, ScriptState*, WebGLContextAttributes, unsigned);
1098 static void createContextProviderOnMainThread(WebGLContextProviderCreationIn fo*, 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698