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

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

Issue 2224163005: Made shadows blurry (thru implementing variance mapping) (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Trying different include path Created 4 years, 4 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 | « tools/debugger/SkDebugCanvas.h ('k') | tools/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 * 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 "SkCanvasPriv.h"
9 #include "SkClipStack.h" 9 #include "SkClipStack.h"
10 #include "SkDebugCanvas.h" 10 #include "SkDebugCanvas.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 void onDrawPicture(const SkPicture* picture, 54 void onDrawPicture(const SkPicture* picture,
55 const SkMatrix* matrix, 55 const SkMatrix* matrix,
56 const SkPaint* paint) override { 56 const SkPaint* paint) override {
57 // We need to replay the picture onto this canvas in order to filter its internal paints. 57 // We need to replay the picture onto this canvas in order to filter its internal paints.
58 this->SkCanvas::onDrawPicture(picture, matrix, paint); 58 this->SkCanvas::onDrawPicture(picture, matrix, paint);
59 } 59 }
60 60
61 void onDrawShadowedPicture(const SkPicture* picture, 61 void onDrawShadowedPicture(const SkPicture* picture,
62 const SkMatrix* matrix, 62 const SkMatrix* matrix,
63 const SkPaint* paint) { 63 const SkPaint* paint,
64 const SkShadowParams& params) {
64 #ifdef SK_EXPERIMENTAL_SHADOWING 65 #ifdef SK_EXPERIMENTAL_SHADOWING
65 this->SkCanvas::onDrawShadowedPicture(picture, matrix, paint); 66 this->SkCanvas::onDrawShadowedPicture(picture, matrix, paint, params);
66 #else 67 #else
67 this->SkCanvas::onDrawPicture(picture, matrix, paint); 68 this->SkCanvas::onDrawPicture(picture, matrix, paint);
68 #endif 69 #endif
69 } 70 }
70 71
71 private: 72 private:
72 sk_sp<SkXfermode> fOverdrawXfermode; 73 sk_sp<SkXfermode> fOverdrawXfermode;
73 74
74 bool fOverrideFilterQuality; 75 bool fOverrideFilterQuality;
75 SkFilterQuality fFilterQuality; 76 SkFilterQuality fFilterQuality;
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 const SkMatrix* matrix, 614 const SkMatrix* matrix,
614 const SkPaint* paint) { 615 const SkPaint* paint) {
615 this->addDrawCommand(new SkBeginDrawPictureCommand(picture, matrix, paint)); 616 this->addDrawCommand(new SkBeginDrawPictureCommand(picture, matrix, paint));
616 SkAutoCanvasMatrixPaint acmp(this, matrix, paint, picture->cullRect()); 617 SkAutoCanvasMatrixPaint acmp(this, matrix, paint, picture->cullRect());
617 picture->playback(this); 618 picture->playback(this);
618 this->addDrawCommand(new SkEndDrawPictureCommand(SkToBool(matrix) || SkToBoo l(paint))); 619 this->addDrawCommand(new SkEndDrawPictureCommand(SkToBool(matrix) || SkToBoo l(paint)));
619 } 620 }
620 621
621 void SkDebugCanvas::onDrawShadowedPicture(const SkPicture* picture, 622 void SkDebugCanvas::onDrawShadowedPicture(const SkPicture* picture,
622 const SkMatrix* matrix, 623 const SkMatrix* matrix,
623 const SkPaint* paint) { 624 const SkPaint* paint,
624 this->addDrawCommand(new SkBeginDrawShadowedPictureCommand(picture, matrix, paint)); 625 const SkShadowParams& params) {
626 this->addDrawCommand(new SkBeginDrawShadowedPictureCommand(picture, matrix, paint, params));
625 SkAutoCanvasMatrixPaint acmp(this, matrix, paint, picture->cullRect()); 627 SkAutoCanvasMatrixPaint acmp(this, matrix, paint, picture->cullRect());
626 picture->playback(this); 628 picture->playback(this);
627 this->addDrawCommand(new SkEndDrawShadowedPictureCommand(SkToBool(matrix) || SkToBool(paint))); 629 this->addDrawCommand(new SkEndDrawShadowedPictureCommand(SkToBool(matrix) || SkToBool(paint)));
628 } 630 }
629 631
630 void SkDebugCanvas::onDrawPoints(PointMode mode, size_t count, 632 void SkDebugCanvas::onDrawPoints(PointMode mode, size_t count,
631 const SkPoint pts[], const SkPaint& paint) { 633 const SkPoint pts[], const SkPaint& paint) {
632 this->addDrawCommand(new SkDrawPointsCommand(mode, count, pts, paint)); 634 this->addDrawCommand(new SkDrawPointsCommand(mode, count, pts, paint));
633 } 635 }
634 636
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 } 845 }
844 846
845 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { 847 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) {
846 if (fCalledAddStackData) { 848 if (fCalledAddStackData) {
847 fClipStackData.appendf("<br>"); 849 fClipStackData.appendf("<br>");
848 addPathData(devPath, "pathOut"); 850 addPathData(devPath, "pathOut");
849 return true; 851 return true;
850 } 852 }
851 return false; 853 return false;
852 } 854 }
OLDNEW
« no previous file with comments | « tools/debugger/SkDebugCanvas.h ('k') | tools/debugger/SkDrawCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698