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

Side by Side Diff: src/utils/debugger/SkDebugCanvas.cpp

Issue 917933002: Revert of Remove SkPictureFlat.h include from SkDrawCommands.h (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/utils/debugger/SkDebugCanvas.h ('k') | src/utils/debugger/SkDrawCommand.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
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 9
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 389
390 void SkDebugCanvas::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeS tyle edgeStyle) { 390 void SkDebugCanvas::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeS tyle edgeStyle) {
391 this->addDrawCommand(new SkClipRRectCommand(rrect, op, kSoft_ClipEdgeStyle = = edgeStyle)); 391 this->addDrawCommand(new SkClipRRectCommand(rrect, op, kSoft_ClipEdgeStyle = = edgeStyle));
392 } 392 }
393 393
394 void SkDebugCanvas::onClipRegion(const SkRegion& region, SkRegion::Op op) { 394 void SkDebugCanvas::onClipRegion(const SkRegion& region, SkRegion::Op op) {
395 this->addDrawCommand(new SkClipRegionCommand(region, op)); 395 this->addDrawCommand(new SkClipRegionCommand(region, op));
396 } 396 }
397 397
398 void SkDebugCanvas::didConcat(const SkMatrix& matrix) { 398 void SkDebugCanvas::didConcat(const SkMatrix& matrix) {
399 this->addDrawCommand(new SkConcatCommand(matrix)); 399 switch (matrix.getType()) {
400 case SkMatrix::kTranslate_Mask:
401 this->addDrawCommand(new SkTranslateCommand(matrix.getTranslateX(),
402 matrix.getTranslateY())) ;
403 break;
404 case SkMatrix::kScale_Mask:
405 this->addDrawCommand(new SkScaleCommand(matrix.getScaleX(),
406 matrix.getScaleY()));
407 break;
408 default:
409 this->addDrawCommand(new SkConcatCommand(matrix));
410 break;
411 }
412
400 this->INHERITED::didConcat(matrix); 413 this->INHERITED::didConcat(matrix);
401 } 414 }
402 415
403 void SkDebugCanvas::onDrawBitmap(const SkBitmap& bitmap, SkScalar left, 416 void SkDebugCanvas::onDrawBitmap(const SkBitmap& bitmap, SkScalar left,
404 SkScalar top, const SkPaint* paint) { 417 SkScalar top, const SkPaint* paint) {
405 this->addDrawCommand(new SkDrawBitmapCommand(bitmap, left, top, paint)); 418 this->addDrawCommand(new SkDrawBitmapCommand(bitmap, left, top, paint));
406 } 419 }
407 420
408 void SkDebugCanvas::onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst, 421 void SkDebugCanvas::onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst,
409 const SkPaint* paint, DrawBitmapRectFlags f lags) { 422 const SkPaint* paint, DrawBitmapRectFlags f lags) {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 const SkMatrix* matrix, const SkPaint& pain t) { 511 const SkMatrix* matrix, const SkPaint& pain t) {
499 this->addDrawCommand( 512 this->addDrawCommand(
500 new SkDrawTextOnPathCommand(text, byteLength, path, matrix, paint)); 513 new SkDrawTextOnPathCommand(text, byteLength, path, matrix, paint));
501 } 514 }
502 515
503 void SkDebugCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, 516 void SkDebugCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
504 const SkPaint& paint) { 517 const SkPaint& paint) {
505 this->addDrawCommand(new SkDrawTextBlobCommand(blob, x, y, paint)); 518 this->addDrawCommand(new SkDrawTextBlobCommand(blob, x, y, paint));
506 } 519 }
507 520
508 void SkDebugCanvas::onDrawPatch(const SkPoint cubics[12], const SkColor colors[4 ],
509 const SkPoint texCoords[4], SkXfermode* xmode,
510 const SkPaint& paint) {
511 this->addDrawCommand(new SkDrawPatchCommand(cubics, colors, texCoords, xmode , paint));
512 }
513
514 void SkDebugCanvas::onDrawVertices(VertexMode vmode, int vertexCount, const SkPo int vertices[], 521 void SkDebugCanvas::onDrawVertices(VertexMode vmode, int vertexCount, const SkPo int vertices[],
515 const SkPoint texs[], const SkColor colors[], 522 const SkPoint texs[], const SkColor colors[],
516 SkXfermode*, const uint16_t indices[], int in dexCount, 523 SkXfermode*, const uint16_t indices[], int in dexCount,
517 const SkPaint& paint) { 524 const SkPaint& paint) {
518 this->addDrawCommand(new SkDrawVerticesCommand(vmode, vertexCount, vertices, 525 this->addDrawCommand(new SkDrawVerticesCommand(vmode, vertexCount, vertices,
519 texs, colors, NULL, indices, indexCount, paint)); 526 texs, colors, NULL, indices, indexCount, paint));
520 } 527 }
521 528
522 void SkDebugCanvas::willRestore() { 529 void SkDebugCanvas::willRestore() {
523 this->addDrawCommand(new SkRestoreCommand()); 530 this->addDrawCommand(new SkRestoreCommand());
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 } 671 }
665 672
666 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { 673 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) {
667 if (fCalledAddStackData) { 674 if (fCalledAddStackData) {
668 fClipStackData.appendf("<br>"); 675 fClipStackData.appendf("<br>");
669 addPathData(devPath, "pathOut"); 676 addPathData(devPath, "pathOut");
670 return true; 677 return true;
671 } 678 }
672 return false; 679 return false;
673 } 680 }
OLDNEW
« no previous file with comments | « src/utils/debugger/SkDebugCanvas.h ('k') | src/utils/debugger/SkDrawCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698