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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2326633002: Adds filter support for offscreen canvas (Closed)
Patch Set: Working version of filters on offscreen canvas Created 4 years, 3 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/core/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index a3f659a41fe1b3f9ff0251d9893730b1ff95ac0c..4599ef51fc2f6a888c06bb0d67f00391827c269e 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -383,20 +383,25 @@ protected:
private:
// TODO(sashab): Move these to the bottom of ComputedStyle.
- ALWAYS_INLINE ComputedStyle();
+ ComputedStyle();
enum InitialStyleTag {
InitialStyle
};
- ALWAYS_INLINE explicit ComputedStyle(InitialStyleTag);
- ALWAYS_INLINE ComputedStyle(const ComputedStyle&);
+ explicit ComputedStyle(InitialStyleTag);
+ ComputedStyle(const ComputedStyle&);
static PassRefPtr<ComputedStyle> createInitialStyle();
- static inline ComputedStyle& mutableInitialStyle()
+ static ComputedStyle& mutableInitialStyle()
{
LEAK_SANITIZER_DISABLED_SCOPE;
- DEFINE_STATIC_REF(ComputedStyle, s_initialStyle, (ComputedStyle::createInitialStyle()));
- return *s_initialStyle;
+
+ DEFINE_THREAD_SAFE_STATIC_LOCAL(ThreadSpecific<ComputedStyle*>, s_initialStyle,
+ new ThreadSpecific<ComputedStyle*>());
esprehn 2016/09/12 20:53:12 Can't put TLS here, it's too slow
+ if (!*s_initialStyle) {
+ *s_initialStyle = PassRefPtr<ComputedStyle>(ComputedStyle::createInitialStyle()).leakRef();
+ }
+ return **s_initialStyle;
}
public:

Powered by Google App Engine
This is Rietveld 408576698