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

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

Issue 1461923004: Avoid devolving to a path when conservative clipping with RRects (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Simplify Created 5 years, 1 month 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/core/SkRasterClip.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 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 "SkBitmapDevice.h" 8 #include "SkBitmapDevice.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkCanvasPriv.h" 10 #include "SkCanvasPriv.h"
(...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 AutoValidateClip avc(this); 1549 AutoValidateClip avc(this);
1550 1550
1551 fDeviceCMDirty = true; 1551 fDeviceCMDirty = true;
1552 fCachedLocalClipBoundsDirty = true; 1552 fCachedLocalClipBoundsDirty = true;
1553 if (!fAllowSoftClip) { 1553 if (!fAllowSoftClip) {
1554 edgeStyle = kHard_ClipEdgeStyle; 1554 edgeStyle = kHard_ClipEdgeStyle;
1555 } 1555 }
1556 1556
1557 fClipStack->clipDevRRect(transformedRRect, op, kSoft_ClipEdgeStyle == ed geStyle); 1557 fClipStack->clipDevRRect(transformedRRect, op, kSoft_ClipEdgeStyle == ed geStyle);
1558 1558
1559 SkPath devPath; 1559 fMCRec->fRasterClip.op(transformedRRect, this->getBaseLayerSize(), op,
1560 devPath.addRRect(transformedRRect); 1560 kSoft_ClipEdgeStyle == edgeStyle);
1561
1562 rasterclip_path(&fMCRec->fRasterClip, this, devPath, op, kSoft_ClipEdgeS tyle == edgeStyle);
1563 return; 1561 return;
1564 } 1562 }
1565 1563
1566 SkPath path; 1564 SkPath path;
1567 path.addRRect(rrect); 1565 path.addRRect(rrect);
1568 // call the non-virtual version 1566 // call the non-virtual version
1569 this->SkCanvas::onClipPath(path, op, edgeStyle); 1567 this->SkCanvas::onClipPath(path, op, edgeStyle);
1570 } 1568 }
1571 1569
1572 void SkCanvas::clipPath(const SkPath& path, SkRegion::Op op, bool doAA) { 1570 void SkCanvas::clipPath(const SkPath& path, SkRegion::Op op, bool doAA) {
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after
2921 } 2919 }
2922 2920
2923 if (matrix) { 2921 if (matrix) {
2924 canvas->concat(*matrix); 2922 canvas->concat(*matrix);
2925 } 2923 }
2926 } 2924 }
2927 2925
2928 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { 2926 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() {
2929 fCanvas->restoreToCount(fSaveCount); 2927 fCanvas->restoreToCount(fSaveCount);
2930 } 2928 }
OLDNEW
« no previous file with comments | « no previous file | src/core/SkRasterClip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698