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

Side by Side Diff: tools/debugger/SkDebugCanvas.cpp

Issue 1685133008: fixed SkDebugCanvas' handling of drawPicture (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | 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 2012 Google Inc. 2 * Copyright 2012 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 "SkCanvasPriv.h"
8 #include "SkClipStack.h" 9 #include "SkClipStack.h"
9 #include "SkDebugCanvas.h" 10 #include "SkDebugCanvas.h"
10 #include "SkDrawCommand.h" 11 #include "SkDrawCommand.h"
11 #include "SkDevice.h" 12 #include "SkDevice.h"
12 #include "SkPaintFilterCanvas.h" 13 #include "SkPaintFilterCanvas.h"
13 #include "SkOverdrawMode.h" 14 #include "SkOverdrawMode.h"
14 15
15 #define SKDEBUGCANVAS_VERSION 1 16 #define SKDEBUGCANVAS_VERSION 1
16 #define SKDEBUGCANVAS_ATTRIBUTE_VERSION "version" 17 #define SKDEBUGCANVAS_ATTRIBUTE_VERSION "version"
17 #define SKDEBUGCANVAS_ATTRIBUTE_COMMANDS "commands" 18 #define SKDEBUGCANVAS_ATTRIBUTE_COMMANDS "commands"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 } 416 }
416 417
417 void SkDebugCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) { 418 void SkDebugCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) {
418 this->addDrawCommand(new SkDrawPathCommand(path, paint)); 419 this->addDrawCommand(new SkDrawPathCommand(path, paint));
419 } 420 }
420 421
421 void SkDebugCanvas::onDrawPicture(const SkPicture* picture, 422 void SkDebugCanvas::onDrawPicture(const SkPicture* picture,
422 const SkMatrix* matrix, 423 const SkMatrix* matrix,
423 const SkPaint* paint) { 424 const SkPaint* paint) {
424 this->addDrawCommand(new SkBeginDrawPictureCommand(picture, matrix, paint)); 425 this->addDrawCommand(new SkBeginDrawPictureCommand(picture, matrix, paint));
425 this->INHERITED::onDrawPicture(picture, matrix, paint); 426 SkAutoCanvasMatrixPaint acmp(this, matrix, paint, picture->cullRect());
427 picture->playback(this);
426 this->addDrawCommand(new SkEndDrawPictureCommand(SkToBool(matrix) || SkToBoo l(paint))); 428 this->addDrawCommand(new SkEndDrawPictureCommand(SkToBool(matrix) || SkToBoo l(paint)));
427 } 429 }
428 430
429 void SkDebugCanvas::onDrawPoints(PointMode mode, size_t count, 431 void SkDebugCanvas::onDrawPoints(PointMode mode, size_t count,
430 const SkPoint pts[], const SkPaint& paint) { 432 const SkPoint pts[], const SkPaint& paint) {
431 this->addDrawCommand(new SkDrawPointsCommand(mode, count, pts, paint)); 433 this->addDrawCommand(new SkDrawPointsCommand(mode, count, pts, paint));
432 } 434 }
433 435
434 void SkDebugCanvas::onDrawPosText(const void* text, size_t byteLength, const SkP oint pos[], 436 void SkDebugCanvas::onDrawPosText(const void* text, size_t byteLength, const SkP oint pos[],
435 const SkPaint& paint) { 437 const SkPaint& paint) {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 } 632 }
631 633
632 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { 634 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) {
633 if (fCalledAddStackData) { 635 if (fCalledAddStackData) {
634 fClipStackData.appendf("<br>"); 636 fClipStackData.appendf("<br>");
635 addPathData(devPath, "pathOut"); 637 addPathData(devPath, "pathOut");
636 return true; 638 return true;
637 } 639 }
638 return false; 640 return false;
639 } 641 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698