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
This commit is contained in:
commit-bot@chromium.org 2014-04-22 18:32:58 +00:00
parent c8f16c72dd
commit 16307bd650
2 changed files with 14 additions and 12 deletions

View File

@ -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) {

View File

@ -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 {