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

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

Issue 783493002: Change clear() to respect the clip (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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') | tests/DeferredCanvasTest.cpp » ('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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 419
420 void SkDebugCanvas::overrideTexFiltering(bool overrideTexFiltering, SkPaint::Fil terLevel level) { 420 void SkDebugCanvas::overrideTexFiltering(bool overrideTexFiltering, SkPaint::Fil terLevel level) {
421 if (NULL == fTexOverrideFilter) { 421 if (NULL == fTexOverrideFilter) {
422 fTexOverrideFilter = new SkTexOverrideFilter; 422 fTexOverrideFilter = new SkTexOverrideFilter;
423 } 423 }
424 424
425 fOverrideTexFiltering = overrideTexFiltering; 425 fOverrideTexFiltering = overrideTexFiltering;
426 fTexOverrideFilter->setFilterLevel(level); 426 fTexOverrideFilter->setFilterLevel(level);
427 } 427 }
428 428
429 void SkDebugCanvas::clear(SkColor color) {
430 this->addDrawCommand(new SkClearCommand(color));
431 }
432
433 void SkDebugCanvas::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyl e edgeStyle) { 429 void SkDebugCanvas::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyl e edgeStyle) {
434 this->addDrawCommand(new SkClipPathCommand(path, op, kSoft_ClipEdgeStyle == edgeStyle)); 430 this->addDrawCommand(new SkClipPathCommand(path, op, kSoft_ClipEdgeStyle == edgeStyle));
435 } 431 }
436 432
437 void SkDebugCanvas::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyl e edgeStyle) { 433 void SkDebugCanvas::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyl e edgeStyle) {
438 this->addDrawCommand(new SkClipRectCommand(rect, op, kSoft_ClipEdgeStyle == edgeStyle)); 434 this->addDrawCommand(new SkClipRectCommand(rect, op, kSoft_ClipEdgeStyle == edgeStyle));
439 } 435 }
440 436
441 void SkDebugCanvas::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeS tyle edgeStyle) { 437 void SkDebugCanvas::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeS tyle edgeStyle) {
442 this->addDrawCommand(new SkClipRRectCommand(rrect, op, kSoft_ClipEdgeStyle = = edgeStyle)); 438 this->addDrawCommand(new SkClipRRectCommand(rrect, op, kSoft_ClipEdgeStyle = = edgeStyle));
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 } 728 }
733 729
734 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { 730 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) {
735 if (fCalledAddStackData) { 731 if (fCalledAddStackData) {
736 fClipStackData.appendf("<br>"); 732 fClipStackData.appendf("<br>");
737 addPathData(devPath, "pathOut"); 733 addPathData(devPath, "pathOut");
738 return true; 734 return true;
739 } 735 }
740 return false; 736 return false;
741 } 737 }
OLDNEW
« no previous file with comments | « src/utils/debugger/SkDebugCanvas.h ('k') | tests/DeferredCanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698