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 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1413 // returns false if the entire rectangle is entirely clipped out | 1413 // returns false if the entire rectangle is entirely clipped out |
1414 // If non-NULL, The imageFilter parameter will be used to expand the clip | 1414 // If non-NULL, The imageFilter parameter will be used to expand the clip |
1415 // and offscreen bounds for any margin required by the filter DAG. | 1415 // and offscreen bounds for any margin required by the filter DAG. |
1416 bool clipRectBounds(const SkRect* bounds, SaveLayerFlags, SkIRect* intersect
ion, | 1416 bool clipRectBounds(const SkRect* bounds, SaveLayerFlags, SkIRect* intersect
ion, |
1417 const SkImageFilter* imageFilter = NULL); | 1417 const SkImageFilter* imageFilter = NULL); |
1418 | 1418 |
1419 private: | 1419 private: |
1420 static bool BoundsAffectsClip(SaveLayerFlags); | 1420 static bool BoundsAffectsClip(SaveLayerFlags); |
1421 static SaveLayerFlags LegacySaveFlagsToSaveLayerFlags(uint32_t legacySaveFla
gs); | 1421 static SaveLayerFlags LegacySaveFlagsToSaveLayerFlags(uint32_t legacySaveFla
gs); |
1422 | 1422 |
| 1423 static void DrawDeviceWithFilter(SkBaseDevice* src, const SkImageFilter* fil
ter, |
| 1424 SkBaseDevice* dst, const SkMatrix& ctm, |
| 1425 const SkClipStack* clipStack); |
| 1426 |
1423 enum ShaderOverrideOpacity { | 1427 enum ShaderOverrideOpacity { |
1424 kNone_ShaderOverrideOpacity, //!< there is no overriding shader (
bitmap or image) | 1428 kNone_ShaderOverrideOpacity, //!< there is no overriding shader (
bitmap or image) |
1425 kOpaque_ShaderOverrideOpacity, //!< the overriding shader is opaque | 1429 kOpaque_ShaderOverrideOpacity, //!< the overriding shader is opaque |
1426 kNotOpaque_ShaderOverrideOpacity, //!< the overriding shader may not b
e opaque | 1430 kNotOpaque_ShaderOverrideOpacity, //!< the overriding shader may not b
e opaque |
1427 }; | 1431 }; |
1428 | 1432 |
1429 // notify our surface (if we have one) that we are about to draw, so it | 1433 // notify our surface (if we have one) that we are about to draw, so it |
1430 // can perform copy-on-write or invalidate any cached images | 1434 // can perform copy-on-write or invalidate any cached images |
1431 void predrawNotify(bool willOverwritesEntireSurface = false); | 1435 void predrawNotify(bool willOverwritesEntireSurface = false); |
1432 void predrawNotify(const SkRect* rect, const SkPaint* paint, ShaderOverrideO
pacity); | 1436 void predrawNotify(const SkRect* rect, const SkPaint* paint, ShaderOverrideO
pacity); |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1617 | 1621 |
1618 class SkCanvasClipVisitor { | 1622 class SkCanvasClipVisitor { |
1619 public: | 1623 public: |
1620 virtual ~SkCanvasClipVisitor(); | 1624 virtual ~SkCanvasClipVisitor(); |
1621 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1625 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
1622 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1626 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
1623 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1627 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
1624 }; | 1628 }; |
1625 | 1629 |
1626 #endif | 1630 #endif |
OLD | NEW |