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

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

Issue 1559873003: Add conversion from SaveLayerFlags to SaveFlags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months 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') | 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 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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698