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

Side by Side Diff: src/core/SkPaint.cpp

Issue 1945353003: Revert of SK_DECLARE_STATIC_MUTEX -> static SkMutex (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« no previous file with comments | « src/core/SkDeviceProfile.cpp ('k') | src/core/SkResourceCache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkPaint.h" 8 #include "SkPaint.h"
9 #include "SkAutoKern.h" 9 #include "SkAutoKern.h"
10 #include "SkChecksum.h" 10 #include "SkChecksum.h"
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1450 typeface->onFilterRec(rec); 1450 typeface->onFilterRec(rec);
1451 1451
1452 // be sure to call PostMakeRec(rec) before you actually use it! 1452 // be sure to call PostMakeRec(rec) before you actually use it!
1453 } 1453 }
1454 1454
1455 /** 1455 /**
1456 * In order to call cachedDeviceLuminance, cachedPaintLuminance, or 1456 * In order to call cachedDeviceLuminance, cachedPaintLuminance, or
1457 * cachedMaskGamma the caller must hold the gMaskGammaCacheMutex and continue 1457 * cachedMaskGamma the caller must hold the gMaskGammaCacheMutex and continue
1458 * to hold it until the returned pointer is refed or forgotten. 1458 * to hold it until the returned pointer is refed or forgotten.
1459 */ 1459 */
1460 static SkMutex gMaskGammaCacheMutex; 1460 SK_DECLARE_STATIC_MUTEX(gMaskGammaCacheMutex);
1461 1461
1462 static SkMaskGamma* gLinearMaskGamma = nullptr; 1462 static SkMaskGamma* gLinearMaskGamma = nullptr;
1463 static SkMaskGamma* gMaskGamma = nullptr; 1463 static SkMaskGamma* gMaskGamma = nullptr;
1464 static SkScalar gContrast = SK_ScalarMin; 1464 static SkScalar gContrast = SK_ScalarMin;
1465 static SkScalar gPaintGamma = SK_ScalarMin; 1465 static SkScalar gPaintGamma = SK_ScalarMin;
1466 static SkScalar gDeviceGamma = SK_ScalarMin; 1466 static SkScalar gDeviceGamma = SK_ScalarMin;
1467 /** 1467 /**
1468 * The caller must hold the gMaskGammaCacheMutex and continue to hold it until 1468 * The caller must hold the gMaskGammaCacheMutex and continue to hold it until
1469 * the returned SkMaskGamma pointer is refed or forgotten. 1469 * the returned SkMaskGamma pointer is refed or forgotten.
1470 */ 1470 */
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
2320 } 2320 }
2321 2321
2322 uint32_t SkPaint::getHash() const { 2322 uint32_t SkPaint::getHash() const {
2323 // We're going to hash 10 pointers and 7 32-bit values, finishing up with fB itfields, 2323 // We're going to hash 10 pointers and 7 32-bit values, finishing up with fB itfields,
2324 // so fBitfields should be 10 pointers and 6 32-bit values from the start. 2324 // so fBitfields should be 10 pointers and 6 32-bit values from the start.
2325 static_assert(offsetof(SkPaint, fBitfields) == 9 * sizeof(void*) + 6 * sizeo f(uint32_t), 2325 static_assert(offsetof(SkPaint, fBitfields) == 9 * sizeof(void*) + 6 * sizeo f(uint32_t),
2326 "SkPaint_notPackedTightly"); 2326 "SkPaint_notPackedTightly");
2327 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this), 2327 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this),
2328 offsetof(SkPaint, fBitfields) + sizeof(fBitfields )); 2328 offsetof(SkPaint, fBitfields) + sizeof(fBitfields ));
2329 } 2329 }
OLDNEW
« no previous file with comments | « src/core/SkDeviceProfile.cpp ('k') | src/core/SkResourceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698