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

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

Issue 2130643004: drawTextRSXform (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update util canvases Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 "SkBigPicture.h" 8 #include "SkBigPicture.h"
9 #include "SkCanvasPriv.h" 9 #include "SkCanvasPriv.h"
10 #include "SkPatchUtils.h" 10 #include "SkPatchUtils.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 void SkRecorder::onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path, 271 void SkRecorder::onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path,
272 const SkMatrix* matrix, const SkPaint& paint) { 272 const SkMatrix* matrix, const SkPaint& paint) {
273 APPEND(DrawTextOnPath, 273 APPEND(DrawTextOnPath,
274 paint, 274 paint,
275 this->copy((const char*)text, byteLength), 275 this->copy((const char*)text, byteLength),
276 byteLength, 276 byteLength,
277 path, 277 path,
278 matrix ? *matrix : SkMatrix::I()); 278 matrix ? *matrix : SkMatrix::I());
279 } 279 }
280 280
281 void SkRecorder::onDrawTextRSXform(const void* text, size_t byteLength, const Sk RSXform xform[],
282 const SkRect* cull, const SkPaint& paint) {
283 APPEND(DrawTextRSXform,
284 paint,
285 this->copy((const char*)text, byteLength),
286 byteLength,
287 this->copy(xform, paint.countText(text, byteLength)),
288 this->copy(cull));
289 }
290
281 void SkRecorder::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, 291 void SkRecorder::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
282 const SkPaint& paint) { 292 const SkPaint& paint) {
283 TRY_MINIRECORDER(drawTextBlob, blob, x, y, paint); 293 TRY_MINIRECORDER(drawTextBlob, blob, x, y, paint);
284 APPEND(DrawTextBlob, paint, blob, x, y); 294 APPEND(DrawTextBlob, paint, blob, x, y);
285 } 295 }
286 296
287 void SkRecorder::onDrawPicture(const SkPicture* pic, const SkMatrix* matrix, con st SkPaint* paint) { 297 void SkRecorder::onDrawPicture(const SkPicture* pic, const SkMatrix* matrix, con st SkPaint* paint) {
288 if (fDrawPictureMode == Record_DrawPictureMode) { 298 if (fDrawPictureMode == Record_DrawPictureMode) {
289 fApproxBytesUsedBySubPictures += SkPictureUtils::ApproximateBytesUsed(pi c); 299 fApproxBytesUsedBySubPictures += SkPictureUtils::ApproximateBytesUsed(pi c);
290 APPEND(DrawPicture, this->copy(paint), pic, matrix ? *matrix : SkMatrix: :I()); 300 APPEND(DrawPicture, this->copy(paint), pic, matrix ? *matrix : SkMatrix: :I());
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 } 388 }
379 389
380 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 390 void SkRecorder::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
381 INHERITED(onClipRegion, deviceRgn, op); 391 INHERITED(onClipRegion, deviceRgn, op);
382 APPEND(ClipRegion, this->devBounds(), deviceRgn, op); 392 APPEND(ClipRegion, this->devBounds(), deviceRgn, op);
383 } 393 }
384 394
385 sk_sp<SkSurface> SkRecorder::onNewSurface(const SkImageInfo&, const SkSurfacePro ps&) { 395 sk_sp<SkSurface> SkRecorder::onNewSurface(const SkImageInfo&, const SkSurfacePro ps&) {
386 return nullptr; 396 return nullptr;
387 } 397 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698