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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLProgram.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 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void increaseLinkCount(); 51 void increaseLinkCount();
52 52
53 unsigned activeTransformFeedbackCount() const { return m_activeTransformFeed backCount; } 53 unsigned activeTransformFeedbackCount() const { return m_activeTransformFeed backCount; }
54 void increaseActiveTransformFeedbackCount(); 54 void increaseActiveTransformFeedbackCount();
55 void decreaseActiveTransformFeedbackCount(); 55 void decreaseActiveTransformFeedbackCount();
56 56
57 WebGLShader* getAttachedShader(GLenum); 57 WebGLShader* getAttachedShader(GLenum);
58 bool attachShader(WebGLShader*); 58 bool attachShader(WebGLShader*);
59 bool detachShader(WebGLShader*); 59 bool detachShader(WebGLShader*);
60 60
61 V8CopyablePersistent<v8::Array>* getPersistentCache();
62
61 DECLARE_VIRTUAL_TRACE(); 63 DECLARE_VIRTUAL_TRACE();
62 64
63 protected: 65 protected:
64 explicit WebGLProgram(WebGLRenderingContextBase*); 66 explicit WebGLProgram(WebGLRenderingContextBase*);
65 67
66 void deleteObjectImpl(gpu::gles2::GLES2Interface*) override; 68 void deleteObjectImpl(gpu::gles2::GLES2Interface*) override;
67 69
68 private: 70 private:
69 bool isProgram() const override { return true; } 71 bool isProgram() const override { return true; }
70 72
71 void cacheInfoIfNeeded(WebGLRenderingContextBase*); 73 void cacheInfoIfNeeded(WebGLRenderingContextBase*);
72 74
73 GLint m_linkStatus; 75 GLint m_linkStatus;
74 76
75 // This is used to track whether a WebGLUniformLocation belongs to this 77 // This is used to track whether a WebGLUniformLocation belongs to this
76 // program or not. 78 // program or not.
77 unsigned m_linkCount; 79 unsigned m_linkCount;
78 80
79 // This is used to track the program being used by active transform 81 // This is used to track the program being used by active transform
80 // feedback objects. 82 // feedback objects.
81 unsigned m_activeTransformFeedbackCount; 83 unsigned m_activeTransformFeedbackCount;
82 84
83 Member<WebGLShader> m_vertexShader; 85 Member<WebGLShader> m_vertexShader;
84 Member<WebGLShader> m_fragmentShader; 86 Member<WebGLShader> m_fragmentShader;
85 87
86 bool m_infoValid; 88 bool m_infoValid;
89
90 V8CopyablePersistent<v8::Array> m_shaderWrappers;
87 }; 91 };
88 92
89 } // namespace blink 93 } // namespace blink
90 94
91 #endif // WebGLProgram_h 95 #endif // WebGLProgram_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698