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

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

Issue 933483002: add Method param to drawTextOnPath, supporting SVG spec Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 10 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/SkCanvas.cpp ('k') | src/core/SkPictureData.h » ('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 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
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
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
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkPictureData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698