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

Side by Side Diff: src/fonts/SkTestScalerContext.cpp

Issue 1948193002: 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/effects/gradients/SkGradientShader.cpp ('k') | src/lazy/SkDiscardableMemoryPool.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 2014 Google Inc. 2 * Copyright 2014 Google Inc.
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 "SkAdvancedTypefaceMetrics.h" 8 #include "SkAdvancedTypefaceMetrics.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 25 matching lines...) Expand all
36 SkTestFont::~SkTestFont() { 36 SkTestFont::~SkTestFont() {
37 for (unsigned index = 0; index < fCharCodesCount; ++index) { 37 for (unsigned index = 0; index < fCharCodesCount; ++index) {
38 delete fPaths[index]; 38 delete fPaths[index];
39 } 39 }
40 delete[] fPaths; 40 delete[] fPaths;
41 } 41 }
42 42
43 #ifdef SK_DEBUG 43 #ifdef SK_DEBUG
44 44
45 #include "SkMutex.h" 45 #include "SkMutex.h"
46 SK_DECLARE_STATIC_MUTEX(gUsedCharsMutex); 46 static SkMutex gUsedCharsMutex;
47 47
48 #endif 48 #endif
49 49
50 int SkTestFont::codeToIndex(SkUnichar charCode) const { 50 int SkTestFont::codeToIndex(SkUnichar charCode) const {
51 #ifdef SK_DEBUG // detect missing test font data 51 #ifdef SK_DEBUG // detect missing test font data
52 { 52 {
53 SkAutoMutexAcquire ac(gUsedCharsMutex); 53 SkAutoMutexAcquire ac(gUsedCharsMutex);
54 if (charCode >= ' ' && charCode <= '~') { 54 if (charCode >= ' ' && charCode <= '~') {
55 int bitOffset = charCode - ' '; 55 int bitOffset = charCode - ' ';
56 fDebugBits[bitOffset >> 3] |= 1 << (bitOffset & 7); 56 fDebugBits[bitOffset >> 3] |= 1 << (bitOffset & 7);
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 281
282 private: 282 private:
283 SkTestTypeface* fFace; 283 SkTestTypeface* fFace;
284 SkMatrix fMatrix; 284 SkMatrix fMatrix;
285 }; 285 };
286 286
287 SkScalerContext* SkTestTypeface::onCreateScalerContext(const SkScalerContextEffe cts& effects, 287 SkScalerContext* SkTestTypeface::onCreateScalerContext(const SkScalerContextEffe cts& effects,
288 const SkDescriptor* desc) const { 288 const SkDescriptor* desc) const {
289 return new SkTestScalerContext(const_cast<SkTestTypeface*>(this), effects, d esc); 289 return new SkTestScalerContext(const_cast<SkTestTypeface*>(this), effects, d esc);
290 } 290 }
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/lazy/SkDiscardableMemoryPool.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698