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

Unified Diff: src/effects/SkColorCubeFilter.cpp

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/SkColorCubeFilter.cpp
diff --git a/src/effects/SkColorCubeFilter.cpp b/src/effects/SkColorCubeFilter.cpp
index d9e51127a4df8b530f537e872f674e2c21b73124..fdf571cbf3745b06c7a985d99512bf853c0d87b2 100644
--- a/src/effects/SkColorCubeFilter.cpp
+++ b/src/effects/SkColorCubeFilter.cpp
@@ -67,8 +67,7 @@ uint32_t SkColorCubeFilter::getFlags() const {
}
SkColorCubeFilter::ColorCubeProcesingCache::ColorCubeProcesingCache(int cubeDimension)
- : fCubeDimension(cubeDimension)
- , fLutsInited(false) {
+ : fCubeDimension(cubeDimension) {
fColorToIndex[0] = fColorToIndex[1] = nullptr;
fColorToFactors[0] = fColorToFactors[1] = nullptr;
fColorToScalar = nullptr;
@@ -77,8 +76,8 @@ SkColorCubeFilter::ColorCubeProcesingCache::ColorCubeProcesingCache(int cubeDime
void SkColorCubeFilter::ColorCubeProcesingCache::getProcessingLuts(
const int* (*colorToIndex)[2], const SkScalar* (*colorToFactors)[2],
const SkScalar** colorToScalar) {
- SkOnce(&fLutsInited, &fLutsMutex,
- SkColorCubeFilter::ColorCubeProcesingCache::initProcessingLuts, this);
+ fLutsInitOnce(SkColorCubeFilter::ColorCubeProcesingCache::initProcessingLuts, this);
+
SkASSERT((fColorToIndex[0] != nullptr) &&
(fColorToIndex[1] != nullptr) &&
(fColorToFactors[0] != nullptr) &&

Powered by Google App Engine
This is Rietveld 408576698