| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |