From 16307bd65011667ecdcb755465ce632eef204749 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Tue, 22 Apr 2014 18:32:58 +0000 Subject: [PATCH] Fix build: Windows has dibs on IGNORE Also, make sure to undef macros after we're done with them. BUG=skia: NOTRY=true R=bungeman@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/247573003 git-svn-id: http://skia.googlecode.com/svn/trunk@14305 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/record/SkRecordOpts.cpp | 24 ++++++++++++------------ src/record/SkRecords.h | 2 ++ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/record/SkRecordOpts.cpp b/src/record/SkRecordOpts.cpp index 1b23acde58..3cf135fb7e 100644 --- a/src/record/SkRecordOpts.cpp +++ b/src/record/SkRecordOpts.cpp @@ -58,18 +58,18 @@ private: // If the command doesn't draw anything, that doesn't reset the state back to inactive. // TODO(mtklein): do this with some sort of template-based trait mechanism instead of macros -#define IGNORE(T) template <> void SaveRestoreNooper::operator()(SkRecords::T*) {} -IGNORE(NoOp) -IGNORE(Concat) -IGNORE(SetMatrix) -IGNORE(ClipRect) -IGNORE(ClipRRect) -IGNORE(ClipPath) -IGNORE(ClipRegion) -IGNORE(PairedPushCull) -IGNORE(PushCull) -IGNORE(PopCull) -#undef CLIP +#define DOESNT_DRAW(T) template <> void SaveRestoreNooper::operator()(SkRecords::T*) {} +DOESNT_DRAW(NoOp) +DOESNT_DRAW(Concat) +DOESNT_DRAW(SetMatrix) +DOESNT_DRAW(ClipRect) +DOESNT_DRAW(ClipRRect) +DOESNT_DRAW(ClipPath) +DOESNT_DRAW(ClipRegion) +DOESNT_DRAW(PairedPushCull) +DOESNT_DRAW(PushCull) +DOESNT_DRAW(PopCull) +#undef DOESNT_DRAW template <> void SaveRestoreNooper::operator()(SkRecords::Save* r) { diff --git a/src/record/SkRecords.h b/src/record/SkRecords.h index 7a897406e9..8b96e8d913 100644 --- a/src/record/SkRecords.h +++ b/src/record/SkRecords.h @@ -151,6 +151,8 @@ private: T* fPtr; }; +#undef ACT_AS_PTR + // Like SkBitmap, but deep copies pixels if they're not immutable. // Using this, we guarantee the immutability of all bitmaps we record. class ImmutableBitmap {