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

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

Issue 1214603003: Revert of Remove SkThread.h, include SkMutex.h or SkAtomics.h as appropriate. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 5 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/SkClipStack.cpp ('k') | src/core/SkDrawable.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 2012 Google Inc. 2 * Copyright 2012 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 8
9 #include "SkDeviceProfile.h" 9 #include "SkDeviceProfile.h"
10 #include "SkMutex.h" 10 #include "SkThread.h"
11 11
12 #define DEFAULT_GAMMAEXP 2.2f 12 #define DEFAULT_GAMMAEXP 2.2f
13 #define DEFAULT_CONTRASTSCALE 0.5f 13 #define DEFAULT_CONTRASTSCALE 0.5f
14 #define DEFAULT_LCDCONFIG SkDeviceProfile::kNone_LCDConfig 14 #define DEFAULT_LCDCONFIG SkDeviceProfile::kNone_LCDConfig
15 #define DEFAULT_FONTHINTLEVEL SkDeviceProfile::kSlight_FontHintLevel 15 #define DEFAULT_FONTHINTLEVEL SkDeviceProfile::kSlight_FontHintLevel
16 16
17 static float pin(float value, float min, float max) { 17 static float pin(float value, float min, float max) {
18 if (value < min) { 18 if (value < min) {
19 value = min; 19 value = min;
20 } else if (value > max) { 20 } else if (value > max) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 gGlobalProfile->ref(); 69 gGlobalProfile->ref();
70 return gGlobalProfile; 70 return gGlobalProfile;
71 } 71 }
72 72
73 void SkDeviceProfile::SetGlobal(SkDeviceProfile* profile) { 73 void SkDeviceProfile::SetGlobal(SkDeviceProfile* profile) {
74 SkAutoMutexAcquire amc(gMutex); 74 SkAutoMutexAcquire amc(gMutex);
75 75
76 SkRefCnt_SafeAssign(gGlobalProfile, profile); 76 SkRefCnt_SafeAssign(gGlobalProfile, profile);
77 } 77 }
OLDNEW
« no previous file with comments | « src/core/SkClipStack.cpp ('k') | src/core/SkDrawable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698