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 193163003: Enable use of distance fields via SkPaint flag. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Change HACK to TEMP Created 6 years, 9 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/gpu/GrBitmapTextContext.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkPaint.h" 9 #include "SkPaint.h"
10 #include "SkAnnotation.h" 10 #include "SkAnnotation.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 } 300 }
301 301
302 void SkPaint::setFakeBoldText(bool doFakeBold) { 302 void SkPaint::setFakeBoldText(bool doFakeBold) {
303 this->setFlags(SkSetClearMask(fFlags, doFakeBold, kFakeBoldText_Flag)); 303 this->setFlags(SkSetClearMask(fFlags, doFakeBold, kFakeBoldText_Flag));
304 } 304 }
305 305
306 void SkPaint::setDevKernText(bool doDevKern) { 306 void SkPaint::setDevKernText(bool doDevKern) {
307 this->setFlags(SkSetClearMask(fFlags, doDevKern, kDevKernText_Flag)); 307 this->setFlags(SkSetClearMask(fFlags, doDevKern, kDevKernText_Flag));
308 } 308 }
309 309
310 void SkPaint::setDistanceFieldTextTEMP(bool doDistanceFieldText) {
311 this->setFlags(SkSetClearMask(fFlags, doDistanceFieldText, kDistanceFieldTex tTEMP_Flag));
312 }
313
310 void SkPaint::setStyle(Style style) { 314 void SkPaint::setStyle(Style style) {
311 if ((unsigned)style < kStyleCount) { 315 if ((unsigned)style < kStyleCount) {
312 GEN_ID_INC_EVAL((unsigned)style != fStyle); 316 GEN_ID_INC_EVAL((unsigned)style != fStyle);
313 fStyle = style; 317 fStyle = style;
314 fDirtyBits |= kBitfields_DirtyBit; 318 fDirtyBits |= kBitfields_DirtyBit;
315 } else { 319 } else {
316 #ifdef SK_REPORT_API_RANGE_CHECK 320 #ifdef SK_REPORT_API_RANGE_CHECK
317 SkDebugf("SkPaint::setStyle(%d) out of range\n", style); 321 SkDebugf("SkPaint::setStyle(%d) out of range\n", style);
318 #endif 322 #endif
319 } 323 }
(...skipping 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after
2654 } 2658 }
2655 #ifdef SK_BUILD_FOR_ANDROID 2659 #ifdef SK_BUILD_FOR_ANDROID
2656 if (dirty & kPaintOptionsAndroid_DirtyBit) { 2660 if (dirty & kPaintOptionsAndroid_DirtyBit) {
2657 SkPaintOptionsAndroid options; 2661 SkPaintOptionsAndroid options;
2658 options.unflatten(buffer); 2662 options.unflatten(buffer);
2659 paint->setPaintOptionsAndroid(options); 2663 paint->setPaintOptionsAndroid(options);
2660 } 2664 }
2661 #endif 2665 #endif
2662 SkASSERT(dirty == paint->fDirtyBits); 2666 SkASSERT(dirty == paint->fDirtyBits);
2663 } 2667 }
OLDNEW
« no previous file with comments | « include/core/SkPaint.h ('k') | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698