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

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

Issue 282283002: add pathops to debugger (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: make getAllowSimplifyClip const Created 6 years, 7 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 | « include/core/SkCanvas.h ('k') | src/utils/debugger/SkDebugCanvas.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 2008 The Android Open Source Project 3 * Copyright 2008 The Android Open Source Project
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 "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 fClipStack.clipDevPath(devPath, op, kSoft_ClipEdgeStyle == edgeStyle); 1537 fClipStack.clipDevPath(devPath, op, kSoft_ClipEdgeStyle == edgeStyle);
1538 1538
1539 if (fAllowSimplifyClip) { 1539 if (fAllowSimplifyClip) {
1540 devPath.reset(); 1540 devPath.reset();
1541 devPath.setFillType(SkPath::kInverseEvenOdd_FillType); 1541 devPath.setFillType(SkPath::kInverseEvenOdd_FillType);
1542 const SkClipStack* clipStack = getClipStack(); 1542 const SkClipStack* clipStack = getClipStack();
1543 SkClipStack::Iter iter(*clipStack, SkClipStack::Iter::kBottom_IterStart) ; 1543 SkClipStack::Iter iter(*clipStack, SkClipStack::Iter::kBottom_IterStart) ;
1544 const SkClipStack::Element* element; 1544 const SkClipStack::Element* element;
1545 while ((element = iter.next())) { 1545 while ((element = iter.next())) {
1546 SkClipStack::Element::Type type = element->getType(); 1546 SkClipStack::Element::Type type = element->getType();
1547 if (type == SkClipStack::Element::kEmpty_Type) { 1547 SkPath operand;
1548 continue; 1548 if (type != SkClipStack::Element::kEmpty_Type) {
1549 element->asPath(&operand);
1549 } 1550 }
1550 SkPath operand;
1551 element->asPath(&operand);
1552 SkRegion::Op elementOp = element->getOp(); 1551 SkRegion::Op elementOp = element->getOp();
1553 if (elementOp == SkRegion::kReplace_Op) { 1552 if (elementOp == SkRegion::kReplace_Op) {
1554 devPath = operand; 1553 devPath = operand;
1555 } else { 1554 } else {
1556 Op(devPath, operand, (SkPathOp) elementOp, &devPath); 1555 Op(devPath, operand, (SkPathOp) elementOp, &devPath);
1557 } 1556 }
1558 // if the prev and curr clips disagree about aa -vs- not, favor the aa request. 1557 // if the prev and curr clips disagree about aa -vs- not, favor the aa request.
1559 // perhaps we need an API change to avoid this sort of mixed-signals about 1558 // perhaps we need an API change to avoid this sort of mixed-signals about
1560 // clipping. 1559 // clipping.
1561 if (element->isAA()) { 1560 if (element->isAA()) {
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
2628 if (!supported_for_raster_canvas(info)) { 2627 if (!supported_for_raster_canvas(info)) {
2629 return NULL; 2628 return NULL;
2630 } 2629 }
2631 2630
2632 SkBitmap bitmap; 2631 SkBitmap bitmap;
2633 if (!bitmap.installPixels(info, pixels, rowBytes)) { 2632 if (!bitmap.installPixels(info, pixels, rowBytes)) {
2634 return NULL; 2633 return NULL;
2635 } 2634 }
2636 return SkNEW_ARGS(SkCanvas, (bitmap)); 2635 return SkNEW_ARGS(SkCanvas, (bitmap));
2637 } 2636 }
OLDNEW
« no previous file with comments | « include/core/SkCanvas.h ('k') | src/utils/debugger/SkDebugCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698