use anon namespace to avoid (silent) collisions between local test classes

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1079813002
This commit is contained in:
reed 2015-04-11 19:29:31 -07:00 committed by Commit bot
parent 51985e3f5e
commit ffab15f60e
2 changed files with 4 additions and 0 deletions

View File

@ -19,6 +19,7 @@
* the second red and sharp. * the second red and sharp.
*/ */
namespace {
class TestFilter : public SkDrawFilter { class TestFilter : public SkDrawFilter {
public: public:
bool filter(SkPaint* p, Type) override { bool filter(SkPaint* p, Type) override {
@ -27,6 +28,7 @@ public:
return true; return true;
} }
}; };
}
class DrawFilterGM : public skiagm::GM { class DrawFilterGM : public skiagm::GM {
SkAutoTUnref<SkMaskFilter> fBlur; SkAutoTUnref<SkMaskFilter> fBlur;

View File

@ -10,12 +10,14 @@
#include "SkSurface.h" #include "SkSurface.h"
#include "Test.h" #include "Test.h"
namespace {
class TestFilter : public SkDrawFilter { class TestFilter : public SkDrawFilter {
public: public:
bool filter(SkPaint* p, Type) override { bool filter(SkPaint* p, Type) override {
return true; return true;
} }
}; };
}
/** /**
* canvas.setDrawFilter is defined to be local to the save/restore block, such that if you * canvas.setDrawFilter is defined to be local to the save/restore block, such that if you