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

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

Issue 1192413005: Remove distance field flag from SkPaint (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | « include/core/SkPaint.h ('k') | src/core/SkTextBlob.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 "SkAnnotation.h" 9 #include "SkAnnotation.h"
10 #include "SkAutoKern.h" 10 #include "SkAutoKern.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 222 }
223 223
224 void SkPaint::setFakeBoldText(bool doFakeBold) { 224 void SkPaint::setFakeBoldText(bool doFakeBold) {
225 this->setFlags(SkSetClearMask(fBitfields.fFlags, doFakeBold, kFakeBoldText_F lag)); 225 this->setFlags(SkSetClearMask(fBitfields.fFlags, doFakeBold, kFakeBoldText_F lag));
226 } 226 }
227 227
228 void SkPaint::setDevKernText(bool doDevKern) { 228 void SkPaint::setDevKernText(bool doDevKern) {
229 this->setFlags(SkSetClearMask(fBitfields.fFlags, doDevKern, kDevKernText_Fla g)); 229 this->setFlags(SkSetClearMask(fBitfields.fFlags, doDevKern, kDevKernText_Fla g));
230 } 230 }
231 231
232 void SkPaint::setDistanceFieldTextTEMP(bool doDistanceFieldText) {
233 this->setFlags(SkSetClearMask(fBitfields.fFlags, doDistanceFieldText, kDista nceFieldTextTEMP_Flag));
234 }
235
236 void SkPaint::setStyle(Style style) { 232 void SkPaint::setStyle(Style style) {
237 if ((unsigned)style < kStyleCount) { 233 if ((unsigned)style < kStyleCount) {
238 fBitfields.fStyle = style; 234 fBitfields.fStyle = style;
239 } else { 235 } else {
240 #ifdef SK_REPORT_API_RANGE_CHECK 236 #ifdef SK_REPORT_API_RANGE_CHECK
241 SkDebugf("SkPaint::setStyle(%d) out of range\n", style); 237 SkDebugf("SkPaint::setStyle(%d) out of range\n", style);
242 #endif 238 #endif
243 } 239 }
244 } 240 }
245 241
(...skipping 2180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2426 } 2422 }
2427 2423
2428 uint32_t SkPaint::getHash() const { 2424 uint32_t SkPaint::getHash() const {
2429 // We're going to hash 10 pointers and 7 32-bit values, finishing up with fB itfields, 2425 // We're going to hash 10 pointers and 7 32-bit values, finishing up with fB itfields,
2430 // so fBitfields should be 10 pointers and 6 32-bit values from the start. 2426 // so fBitfields should be 10 pointers and 6 32-bit values from the start.
2431 SK_COMPILE_ASSERT(offsetof(SkPaint, fBitfields) == 10 * sizeof(void*) + 6 * sizeof(uint32_t), 2427 SK_COMPILE_ASSERT(offsetof(SkPaint, fBitfields) == 10 * sizeof(void*) + 6 * sizeof(uint32_t),
2432 SkPaint_notPackedTightly); 2428 SkPaint_notPackedTightly);
2433 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this), 2429 return SkChecksum::Murmur3(reinterpret_cast<const uint32_t*>(this),
2434 offsetof(SkPaint, fBitfields) + sizeof(fBitfields )); 2430 offsetof(SkPaint, fBitfields) + sizeof(fBitfields ));
2435 } 2431 }
OLDNEW
« no previous file with comments | « include/core/SkPaint.h ('k') | src/core/SkTextBlob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698