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

Side by Side Diff: include/core/SkCanvas.h

Issue 1458153003: enable conservative raster clipping (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: change canvas::init to enforce the device's pref from the git-go 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/SkCanvas.cpp » ('j') | src/core/SkCanvas.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 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 #ifndef SkCanvas_DEFINED 8 #ifndef SkCanvas_DEFINED
9 #define SkCanvas_DEFINED 9 #define SkCanvas_DEFINED
10 10
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 bool wouldOverwriteEntireSurface(const SkRect*, const SkPaint*, ShaderOverri deOpacity) const; 1429 bool wouldOverwriteEntireSurface(const SkRect*, const SkPaint*, ShaderOverri deOpacity) const;
1430 1430
1431 1431
1432 /* These maintain a cache of the clip bounds in local coordinates, 1432 /* These maintain a cache of the clip bounds in local coordinates,
1433 (converted to 2s-compliment if floats are slow). 1433 (converted to 2s-compliment if floats are slow).
1434 */ 1434 */
1435 mutable SkRect fCachedLocalClipBounds; 1435 mutable SkRect fCachedLocalClipBounds;
1436 mutable bool fCachedLocalClipBoundsDirty; 1436 mutable bool fCachedLocalClipBoundsDirty;
1437 bool fAllowSoftClip; 1437 bool fAllowSoftClip;
1438 bool fAllowSimplifyClip; 1438 bool fAllowSimplifyClip;
1439 bool fConservativeRasterClip; 1439 const bool fConservativeRasterClip;
1440 1440
1441 const SkRect& getLocalClipBounds() const { 1441 const SkRect& getLocalClipBounds() const {
1442 if (fCachedLocalClipBoundsDirty) { 1442 if (fCachedLocalClipBoundsDirty) {
1443 if (!this->getClipBounds(&fCachedLocalClipBounds)) { 1443 if (!this->getClipBounds(&fCachedLocalClipBounds)) {
1444 fCachedLocalClipBounds.setEmpty(); 1444 fCachedLocalClipBounds.setEmpty();
1445 } 1445 }
1446 fCachedLocalClipBoundsDirty = false; 1446 fCachedLocalClipBoundsDirty = false;
1447 } 1447 }
1448 return fCachedLocalClipBounds; 1448 return fCachedLocalClipBounds;
1449 } 1449 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1561 1561
1562 class SkCanvasClipVisitor { 1562 class SkCanvasClipVisitor {
1563 public: 1563 public:
1564 virtual ~SkCanvasClipVisitor(); 1564 virtual ~SkCanvasClipVisitor();
1565 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; 1565 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0;
1566 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; 1566 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0;
1567 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; 1567 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0;
1568 }; 1568 };
1569 1569
1570 #endif 1570 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkCanvas.cpp » ('j') | src/core/SkCanvas.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698