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

Unified Diff: src/core/SkPictureRecord.cpp

Issue 933483002: add Method param to drawTextOnPath, supporting SVG spec Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add guard for android 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 side-by-side diff with in-line comments
Download patch
Index: src/core/SkPictureRecord.cpp
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index 53ecdd0be68c08e332c93cc8598d92b32b76b264..1c4623f87b6b41cd9dda9ade250ba4b37b5d4d29 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -641,16 +641,20 @@ void SkPictureRecord::onDrawPosTextH(const void* text, size_t byteLength, const
}
void SkPictureRecord::onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path,
- const SkMatrix* matrix, const SkPaint& paint) {
- // op + paint index + length + 'length' worth of data + path index + matrix
+ const SkMatrix* matrix,
+ SK_SUPPORT_LEGACY_DRAWTEXTONPATH_PARAM const SkPaint& paint) {
f(malita) 2015/02/16 15:31:50 indentation
+ // op + paint index + length + 'length' worth of data + path index + matrix + method
const SkMatrix& m = matrix ? *matrix : SkMatrix::I();
- size_t size = 3 * kUInt32Size + SkAlign4(byteLength) + kUInt32Size + m.writeToMemory(NULL);
+ size_t size = 3 * kUInt32Size + SkAlign4(byteLength) + kUInt32Size + m.writeToMemory(NULL)
+ + sizeof(int32_t); // method
+ SK_SUPPORT_LEGACY_DRAWTEXTONPATH_DEFAULT_METHOD
size_t initialOffset = this->addDraw(DRAW_TEXT_ON_PATH, &size);
SkASSERT(initialOffset+get_paint_offset(DRAW_TEXT_ON_PATH, size) == fWriter.bytesWritten());
this->addPaint(paint);
this->addText(text, byteLength);
this->addPath(path);
this->addMatrix(m);
+ this->addInt(method);
this->validate(initialOffset, size);
}

Powered by Google App Engine
This is Rietveld 408576698