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

Unified Diff: src/effects/gradients/SkGradientShaderPriv.h

Issue 1894893002: Modernize and trim down SkOnce. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: might as well class Created 4 years, 8 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: src/effects/gradients/SkGradientShaderPriv.h
diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h
index 881f1eb836d5d8622c691892d19aa66fc6accf6e..0677cf0fd361913bc8501d0d9aef249b199941f2 100644
--- a/src/effects/gradients/SkGradientShaderPriv.h
+++ b/src/effects/gradients/SkGradientShaderPriv.h
@@ -142,8 +142,8 @@ public:
const SkGradientShaderBase& fShader;
// Make sure we only initialize the caches once.
- bool fCache16Inited, fCache32Inited;
- SkMutex fCache16Mutex, fCache32Mutex;
+ SkOnce fCache16InitOnce,
+ fCache32InitOnce;
static void initCache16(GradientShaderCache* cache);
static void initCache32(GradientShaderCache* cache);

Powered by Google App Engine
This is Rietveld 408576698