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

Side by Side Diff: include/core/SkUtils.h

Issue 47513017: More Windows 64b compilation warning fixes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fix linux & mac builds Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « bench/benchmain.cpp ('k') | src/gpu/SkGpuDevice.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 #ifndef SkUtils_DEFINED 8 #ifndef SkUtils_DEFINED
9 #define SkUtils_DEFINED 9 #define SkUtils_DEFINED
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 or 0 if uni is illegal. 64 or 0 if uni is illegal.
65 */ 65 */
66 size_t SkUTF8_FromUnichar(SkUnichar uni, char utf8[] = NULL); 66 size_t SkUTF8_FromUnichar(SkUnichar uni, char utf8[] = NULL);
67 67
68 /////////////////////////////////////////////////////////////////////////////// 68 ///////////////////////////////////////////////////////////////////////////////
69 69
70 #define SkUTF16_IsHighSurrogate(c) (((c) & 0xFC00) == 0xD800) 70 #define SkUTF16_IsHighSurrogate(c) (((c) & 0xFC00) == 0xD800)
71 #define SkUTF16_IsLowSurrogate(c) (((c) & 0xFC00) == 0xDC00) 71 #define SkUTF16_IsLowSurrogate(c) (((c) & 0xFC00) == 0xDC00)
72 72
73 int SkUTF16_CountUnichars(const uint16_t utf16[]); 73 int SkUTF16_CountUnichars(const uint16_t utf16[]);
74 int SkUTF16_CountUnichars(const uint16_t utf16[], 74 int SkUTF16_CountUnichars(const uint16_t utf16[], int numberOf16BitValues);
75 int numberOf16BitValues);
76 // returns the current unichar and then moves past it (*p++) 75 // returns the current unichar and then moves past it (*p++)
77 SkUnichar SkUTF16_NextUnichar(const uint16_t**); 76 SkUnichar SkUTF16_NextUnichar(const uint16_t**);
78 // this guy backs up to the previus unichar value, and returns it (*--p) 77 // this guy backs up to the previus unichar value, and returns it (*--p)
79 SkUnichar SkUTF16_PrevUnichar(const uint16_t**); 78 SkUnichar SkUTF16_PrevUnichar(const uint16_t**);
80 size_t SkUTF16_FromUnichar(SkUnichar uni, uint16_t utf16[] = NULL); 79 size_t SkUTF16_FromUnichar(SkUnichar uni, uint16_t utf16[] = NULL);
81 80
82 size_t SkUTF16_ToUTF8(const uint16_t utf16[], int numberOf16BitValues, 81 size_t SkUTF16_ToUTF8(const uint16_t utf16[], int numberOf16BitValues,
83 char utf8[] = NULL); 82 char utf8[] = NULL);
84 83
85 inline bool SkUnichar_IsVariationSelector(SkUnichar uni) { 84 inline bool SkUnichar_IsVariationSelector(SkUnichar uni) {
86 /* The 'true' ranges are: 85 /* The 'true' ranges are:
87 * 0x180B <= uni <= 0x180D 86 * 0x180B <= uni <= 0x180D
88 * 0xFE00 <= uni <= 0xFE0F 87 * 0xFE00 <= uni <= 0xFE0F
89 * 0xE0100 <= uni <= 0xE01EF 88 * 0xE0100 <= uni <= 0xE01EF
90 */ 89 */
91 if (uni < 0x180B || uni > 0xE01EF) { 90 if (uni < 0x180B || uni > 0xE01EF) {
92 return false; 91 return false;
93 } 92 }
(...skipping 15 matching lines...) Expand all
109 } 108 }
110 ~SkAutoTrace() { 109 ~SkAutoTrace() {
111 SkDebugf("--- trace: %s Leave\n", fLabel); 110 SkDebugf("--- trace: %s Leave\n", fLabel);
112 } 111 }
113 private: 112 private:
114 const char* fLabel; 113 const char* fLabel;
115 }; 114 };
116 #define SkAutoTrace(...) SK_REQUIRE_LOCAL_VAR(SkAutoTrace) 115 #define SkAutoTrace(...) SK_REQUIRE_LOCAL_VAR(SkAutoTrace)
117 116
118 #endif 117 #endif
OLDNEW
« no previous file with comments | « bench/benchmain.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698