diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-30 20:41:20 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-30 20:41:20 +0000 |
commit | 2a5cd60bfff32c92cf44a8cfc3e8c017b9aee456 (patch) | |
tree | 6b86b5c1762e590de1b20b06c1e36f853078f601 /src | |
parent | 999cfd1076e23e7348623f7a59cf2905bdc6099d (diff) |
Add an OR operator overload for SaveFlags to avoid extra static casts.
R=reed@google.com
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/303373003
git-svn-id: http://skia.googlecode.com/svn/trunk@15005 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkCanvas.cpp | 2 | ||||
-rw-r--r-- | src/core/SkMatrixClipStateMgr.cpp | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 6ed6a85780..6d2b3b1f20 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -913,7 +913,7 @@ static SkBaseDevice* create_compatible_device(SkCanvas* canvas, int SkCanvas::internalSaveLayer(const SkRect* bounds, const SkPaint* paint, SaveFlags flags, bool justForImageFilter, SaveLayerStrategy strategy) { #ifndef SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG - flags = (SaveFlags)(flags | kClipToLayer_SaveFlag); + flags |= kClipToLayer_SaveFlag; #endif // do this before we create the layer. We don't call the public save() since diff --git a/src/core/SkMatrixClipStateMgr.cpp b/src/core/SkMatrixClipStateMgr.cpp index 492e0414d7..1fc7fe8321 100644 --- a/src/core/SkMatrixClipStateMgr.cpp +++ b/src/core/SkMatrixClipStateMgr.cpp @@ -172,8 +172,7 @@ int SkMatrixClipStateMgr::saveLayer(const SkRect* bounds, const SkPaint* paint, // restore fSkipOffsets = SkNEW(SkTDArray<int>); - fPicRecord->recordSaveLayer(bounds, paint, - (SkCanvas::SaveFlags)(flags| SkCanvas::kMatrixClip_SaveFlag)); + fPicRecord->recordSaveLayer(bounds, paint, flags | SkCanvas::kMatrixClip_SaveFlag); #ifdef SK_DEBUG fActualDepth++; #endif |