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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h

Issue 1974713003: Speed up fix for expando-loss conformance test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add V8CopyablePersistent alias to avoid incorrect usage. 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
index 5cdf864c651079ab294c6786dbdaa4ad0dd3db8b..9a6c5ac949a96a4955670f73df8083ec11c0be00 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
@@ -37,6 +37,7 @@
#include "core/layout/LayoutBoxModelObject.h"
#include "modules/webgl/WebGLContextAttributes.h"
#include "modules/webgl/WebGLExtensionName.h"
+#include "modules/webgl/WebGLObject.h"
#include "modules/webgl/WebGLTexture.h"
#include "modules/webgl/WebGLVertexArrayObjectBase.h"
#include "platform/Timer.h"
@@ -1039,7 +1040,28 @@ protected:
// latched into the context's state, or which are implicitly
// linked together (like programs and their attached shaders), are
// not garbage collected before they should be.
- static void preserveObjectWrapper(ScriptState*, ScriptWrappable* sourceObject, const char* baseName, unsigned long index, ScriptWrappable* targetObject);
+ V8CopyablePersistent<v8::Array> m_2DTextureWrappers;
+ V8CopyablePersistent<v8::Array> m_2DArrayTextureWrappers;
+ V8CopyablePersistent<v8::Array> m_3DTextureWrappers;
+ V8CopyablePersistent<v8::Array> m_cubeMapTextureWrappers;
+ V8CopyablePersistent<v8::Array> m_extensionWrappers;
+
+ // The "catch-all" array for the rest of the preserved object
+ // wrappers. The enum below defines how the indices in this array
+ // are used.
+ enum PreservedWrapperIndex {
+ PreservedArrayBuffer,
+ PreservedElementArrayBuffer,
+ PreservedFramebuffer,
+ PreservedProgram,
+ PreservedRenderbuffer,
+ PreservedDefaultVAO,
+ PreservedVAO,
+ };
+ V8CopyablePersistent<v8::Array> m_miscWrappers;
+
+ static void preserveObjectWrapper(ScriptState*, ScriptWrappable* sourceObject, v8::Local<v8::String> hiddenValueName, V8CopyablePersistent<v8::Array>* persistentCache, uint32_t index, ScriptWrappable* targetObject);
+
// Called to lazily instantiate the wrapper for the default VAO
// during calls to bindBuffer and vertexAttribPointer (from
// JavaScript).

Powered by Google App Engine
This is Rietveld 408576698