| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkDevice.h" | 8 #include "SkDevice.h" |
| 9 #include "SkDeviceProperties.h" | 9 #include "SkDeviceProperties.h" |
| 10 #include "SkDraw.h" | 10 #include "SkDraw.h" |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 break; | 285 break; |
| 286 default: | 286 default: |
| 287 SkDEBUGFAIL("unknown verb"); | 287 SkDEBUGFAIL("unknown verb"); |
| 288 break; | 288 break; |
| 289 } | 289 } |
| 290 } | 290 } |
| 291 } | 291 } |
| 292 | 292 |
| 293 void SkBaseDevice::drawTextOnPath(const SkDraw& draw, const void* text, size_t b
yteLength, | 293 void SkBaseDevice::drawTextOnPath(const SkDraw& draw, const void* text, size_t b
yteLength, |
| 294 const SkPath& follow, const SkMatrix* matrix, | 294 const SkPath& follow, const SkMatrix* matrix, |
| 295 const SkPaint& paint) { | 295 SK_SUPPORT_LEGACY_DRAWTEXTONPATH_PARAM const S
kPaint& paint) { |
| 296 SkASSERT(byteLength == 0 || text != NULL); | 296 SkASSERT(byteLength == 0 || text != NULL); |
| 297 | 297 |
| 298 // nothing to draw | 298 // nothing to draw |
| 299 if (text == NULL || byteLength == 0 || draw.fRC->isEmpty()) { | 299 if (text == NULL || byteLength == 0 || draw.fRC->isEmpty()) { |
| 300 return; | 300 return; |
| 301 } | 301 } |
| 302 | 302 |
| 303 SkTextToPathIter iter((const char*)text, byteLength, paint, true); | 303 SkTextToPathIter iter((const char*)text, byteLength, paint, true); |
| 304 SkPathMeasure meas(follow, false); | 304 SkPathMeasure meas(follow, false); |
| 305 SkScalar hOffset = 0; | 305 SkScalar hOffset = 0; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 if (kUnknown_SkPixelGeometry == fLeakyProperties->pixelGeometry() | 348 if (kUnknown_SkPixelGeometry == fLeakyProperties->pixelGeometry() |
| 349 || this->onShouldDisableLCD(paint)) { | 349 || this->onShouldDisableLCD(paint)) { |
| 350 | 350 |
| 351 flags &= ~SkPaint::kLCDRenderText_Flag; | 351 flags &= ~SkPaint::kLCDRenderText_Flag; |
| 352 flags |= SkPaint::kGenA8FromLCD_Flag; | 352 flags |= SkPaint::kGenA8FromLCD_Flag; |
| 353 } | 353 } |
| 354 | 354 |
| 355 return flags; | 355 return flags; |
| 356 } | 356 } |
| 357 | 357 |
| OLD | NEW |