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

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

Issue 680543002: Add some more volatile paths. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase to ToT Created 6 years, 2 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 | src/gpu/GrClipMaskManager.cpp » ('j') | src/gpu/GrClipMaskManager.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2008 The Android Open Source Project 2 * Copyright 2008 The Android Open Source Project
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 "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkCanvasPriv.h" 9 #include "SkCanvasPriv.h"
10 #include "SkBitmapDevice.h" 10 #include "SkBitmapDevice.h"
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 // if the prev and curr clips disagree about aa -vs- not, favor the aa request. 1493 // if the prev and curr clips disagree about aa -vs- not, favor the aa request.
1494 // perhaps we need an API change to avoid this sort of mixed-signals about 1494 // perhaps we need an API change to avoid this sort of mixed-signals about
1495 // clipping. 1495 // clipping.
1496 if (element->isAA()) { 1496 if (element->isAA()) {
1497 edgeStyle = kSoft_ClipEdgeStyle; 1497 edgeStyle = kSoft_ClipEdgeStyle;
1498 } 1498 }
1499 } 1499 }
1500 op = SkRegion::kReplace_Op; 1500 op = SkRegion::kReplace_Op;
1501 } 1501 }
1502 1502
1503 devPath.setIsVolatile(true);
1503 rasterclip_path(&fMCRec->fRasterClip, this, devPath, op, edgeStyle); 1504 rasterclip_path(&fMCRec->fRasterClip, this, devPath, op, edgeStyle);
1504 } 1505 }
1505 1506
1506 void SkCanvas::clipRegion(const SkRegion& rgn, SkRegion::Op op) { 1507 void SkCanvas::clipRegion(const SkRegion& rgn, SkRegion::Op op) {
1507 this->onClipRegion(rgn, op); 1508 this->onClipRegion(rgn, op);
1508 } 1509 }
1509 1510
1510 void SkCanvas::onClipRegion(const SkRegion& rgn, SkRegion::Op op) { 1511 void SkCanvas::onClipRegion(const SkRegion& rgn, SkRegion::Op op) {
1511 AutoValidateClip avc(this); 1512 AutoValidateClip avc(this);
1512 1513
(...skipping 27 matching lines...) Expand all
1540 case SkClipStack::Element::kRect_Type: 1541 case SkClipStack::Element::kRect_Type:
1541 element->getRect().round(&ir); 1542 element->getRect().round(&ir);
1542 tmpClip.op(ir, element->getOp()); 1543 tmpClip.op(ir, element->getOp());
1543 break; 1544 break;
1544 case SkClipStack::Element::kEmpty_Type: 1545 case SkClipStack::Element::kEmpty_Type:
1545 tmpClip.setEmpty(); 1546 tmpClip.setEmpty();
1546 break; 1547 break;
1547 default: { 1548 default: {
1548 SkPath path; 1549 SkPath path;
1549 element->asPath(&path); 1550 element->asPath(&path);
1551 path.setIsVolatile(true);
bsalomon 2014/10/24 17:29:18 If this is coming out of the clipstack and copying
1550 rasterclip_path(&tmpClip, this, path, element->getOp(), element- >isAA()); 1552 rasterclip_path(&tmpClip, this, path, element->getOp(), element- >isAA());
1551 break; 1553 break;
1552 } 1554 }
1553 } 1555 }
1554 } 1556 }
1555 } 1557 }
1556 #endif 1558 #endif
1557 1559
1558 void SkCanvas::replayClips(ClipVisitor* visitor) const { 1560 void SkCanvas::replayClips(ClipVisitor* visitor) const {
1559 SkClipStack::B2TIter iter(fClipStack); 1561 SkClipStack::B2TIter iter(fClipStack);
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
2550 } 2552 }
2551 2553
2552 if (matrix) { 2554 if (matrix) {
2553 canvas->concat(*matrix); 2555 canvas->concat(*matrix);
2554 } 2556 }
2555 } 2557 }
2556 2558
2557 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { 2559 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() {
2558 fCanvas->restoreToCount(fSaveCount); 2560 fCanvas->restoreToCount(fSaveCount);
2559 } 2561 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrClipMaskManager.cpp » ('j') | src/gpu/GrClipMaskManager.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698