| 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 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 // is not released or deleted by the caller. | 1346 // is not released or deleted by the caller. |
| 1347 virtual SkCanvas* canvasForDrawIter(); | 1347 virtual SkCanvas* canvasForDrawIter(); |
| 1348 | 1348 |
| 1349 // Clip rectangle bounds. Called internally by saveLayer. | 1349 // Clip rectangle bounds. Called internally by saveLayer. |
| 1350 // returns false if the entire rectangle is entirely clipped out | 1350 // returns false if the entire rectangle is entirely clipped out |
| 1351 // If non-NULL, The imageFilter parameter will be used to expand the clip | 1351 // If non-NULL, The imageFilter parameter will be used to expand the clip |
| 1352 // and offscreen bounds for any margin required by the filter DAG. | 1352 // and offscreen bounds for any margin required by the filter DAG. |
| 1353 bool clipRectBounds(const SkRect* bounds, SaveLayerFlags, SkIRect* intersect
ion, | 1353 bool clipRectBounds(const SkRect* bounds, SaveLayerFlags, SkIRect* intersect
ion, |
| 1354 const SkImageFilter* imageFilter = NULL); | 1354 const SkImageFilter* imageFilter = NULL); |
| 1355 | 1355 |
| 1356 #ifdef SK_SUPPORT_LEGACY_SAVEFLAGS |
| 1357 // Needed by SkiaCanvasProxy in Android. Make sure that class is updated |
| 1358 // before removing this method. |
| 1359 static uint32_t SaveLayerFlagsToSaveFlags(SaveLayerFlags); |
| 1360 #endif |
| 1356 private: | 1361 private: |
| 1357 static bool BoundsAffectsClip(SaveLayerFlags); | 1362 static bool BoundsAffectsClip(SaveLayerFlags); |
| 1358 #ifdef SK_SUPPORT_LEGACY_SAVEFLAGS | 1363 #ifdef SK_SUPPORT_LEGACY_SAVEFLAGS |
| 1359 static uint32_t SaveFlagsToSaveLayerFlags(SaveFlags); | 1364 static uint32_t SaveFlagsToSaveLayerFlags(SaveFlags); |
| 1360 #endif | 1365 #endif |
| 1361 static SaveLayerFlags LegacySaveFlagsToSaveLayerFlags(uint32_t legacySaveFla
gs); | 1366 static SaveLayerFlags LegacySaveFlagsToSaveLayerFlags(uint32_t legacySaveFla
gs); |
| 1362 | 1367 |
| 1363 enum ShaderOverrideOpacity { | 1368 enum ShaderOverrideOpacity { |
| 1364 kNone_ShaderOverrideOpacity, //!< there is no overriding shader (
bitmap or image) | 1369 kNone_ShaderOverrideOpacity, //!< there is no overriding shader (
bitmap or image) |
| 1365 kOpaque_ShaderOverrideOpacity, //!< the overriding shader is opaque | 1370 kOpaque_ShaderOverrideOpacity, //!< the overriding shader is opaque |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1569 | 1574 |
| 1570 class SkCanvasClipVisitor { | 1575 class SkCanvasClipVisitor { |
| 1571 public: | 1576 public: |
| 1572 virtual ~SkCanvasClipVisitor(); | 1577 virtual ~SkCanvasClipVisitor(); |
| 1573 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; | 1578 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; |
| 1574 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; | 1579 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; |
| 1575 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; | 1580 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; |
| 1576 }; | 1581 }; |
| 1577 | 1582 |
| 1578 #endif | 1583 #endif |
| OLD | NEW |