Remove unnamed namespace usage from tests/

Skia preference is to use 'static' keyword rather than use unnamed
namespace.

BUG=None
TEST=tests
R=robertphillips@google.com, bsalomon@google.com

Review URL: https://codereview.chromium.org/132403008

git-svn-id: http://skia.googlecode.com/svn/trunk@13138 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp
index 8a329d8..9ac5f81 100644
--- a/tests/CachedDecodingPixelRefTest.cpp
+++ b/tests/CachedDecodingPixelRefTest.cpp
@@ -166,8 +166,6 @@
     test_three_encodings(reporter, install_skDiscardablePixelRef);
 }
 
-////////////////////////////////////////////////////////////////////////////////
-namespace {
 class TestImageGenerator : public SkImageGenerator {
 public:
     enum TestType {
@@ -183,8 +181,8 @@
         : fType(type), fReporter(reporter) {
         SkASSERT((fType <= kLast_TestType) && (fType >= 0));
     }
-    ~TestImageGenerator() { }
-    bool getInfo(SkImageInfo* info) SK_OVERRIDE {
+    virtual ~TestImageGenerator() { }
+    virtual bool getInfo(SkImageInfo* info) SK_OVERRIDE {
         REPORTER_ASSERT(fReporter, NULL != info);
         if ((NULL == info) || (kFailGetInfo_TestType == fType)) {
             return false;
@@ -195,9 +193,9 @@
         info->fAlphaType = kOpaque_SkAlphaType;
         return true;
     }
-    bool getPixels(const SkImageInfo& info,
-                   void* pixels,
-                   size_t rowBytes) SK_OVERRIDE {
+    virtual bool getPixels(const SkImageInfo& info,
+                           void* pixels,
+                           size_t rowBytes) SK_OVERRIDE {
         REPORTER_ASSERT(fReporter, pixels != NULL);
         size_t minRowBytes
             = static_cast<size_t>(info.fWidth * info.bytesPerPixel());
@@ -221,8 +219,8 @@
     skiatest::Reporter* const fReporter;
 };
 
-void CheckTestImageGeneratorBitmap(skiatest::Reporter* reporter,
-                                   const SkBitmap& bm) {
+static void check_test_image_generator_bitmap(skiatest::Reporter* reporter,
+                                              const SkBitmap& bm) {
     REPORTER_ASSERT(reporter, TestImageGenerator::Width() == bm.width());
     REPORTER_ASSERT(reporter, TestImageGenerator::Height() == bm.height());
     SkAutoLockPixels autoLockPixels(bm);
@@ -246,10 +244,11 @@
     kSkDiscardable_PixelRefType,
     kLast_PixelRefType = kSkDiscardable_PixelRefType
 };
-void CheckPixelRef(TestImageGenerator::TestType type,
-                   skiatest::Reporter* reporter,
-                   PixelRefType pixelRefType,
-                   SkDiscardableMemory::Factory* factory) {
+
+static void check_pixelref(TestImageGenerator::TestType type,
+                           skiatest::Reporter* reporter,
+                           PixelRefType pixelRefType,
+                           SkDiscardableMemory::Factory* factory) {
     SkASSERT((pixelRefType >= 0) && (pixelRefType <= kLast_PixelRefType));
     SkAutoTDelete<SkImageGenerator> gen(SkNEW_ARGS(TestImageGenerator,
                                                    (type, reporter)));
@@ -265,20 +264,18 @@
     REPORTER_ASSERT(reporter, success
                     == (TestImageGenerator::kFailGetInfo_TestType != type));
     if (TestImageGenerator::kSucceedGetPixels_TestType == type) {
-        CheckTestImageGeneratorBitmap(reporter, lazy);
+        check_test_image_generator_bitmap(reporter, lazy);
     } else if (TestImageGenerator::kFailGetPixels_TestType == type) {
         SkAutoLockPixels autoLockPixels(lazy);
         REPORTER_ASSERT(reporter, NULL == lazy.getPixels());
     }
 }
-}  // namespace
 
 // new/lock/delete is an odd pattern for a pixelref, but it needs to not assert
 static void test_newlockdelete(skiatest::Reporter* reporter) {
     SkBitmap bm;
     SkImageGenerator* ig = new TestImageGenerator(
-                                 TestImageGenerator::kSucceedGetPixels_TestType,
-                                 reporter);
+        TestImageGenerator::kSucceedGetPixels_TestType, reporter);
     SkInstallDiscardablePixelRef(ig, &bm, NULL);
     bm.pixelRef()->lockPixels();
 }
@@ -291,37 +288,36 @@
 DEF_TEST(DiscardableAndCachingPixelRef, reporter) {
     test_newlockdelete(reporter);
 
-    CheckPixelRef(TestImageGenerator::kFailGetInfo_TestType,
-                  reporter, kSkCaching_PixelRefType, NULL);
-    CheckPixelRef(TestImageGenerator::kFailGetPixels_TestType,
-                  reporter, kSkCaching_PixelRefType, NULL);
-    CheckPixelRef(TestImageGenerator::kSucceedGetPixels_TestType,
-                  reporter, kSkCaching_PixelRefType, NULL);
+    check_pixelref(TestImageGenerator::kFailGetInfo_TestType,
+                   reporter, kSkCaching_PixelRefType, NULL);
+    check_pixelref(TestImageGenerator::kFailGetPixels_TestType,
+                   reporter, kSkCaching_PixelRefType, NULL);
+    check_pixelref(TestImageGenerator::kSucceedGetPixels_TestType,
+                   reporter, kSkCaching_PixelRefType, NULL);
 
-    CheckPixelRef(TestImageGenerator::kFailGetInfo_TestType,
-                  reporter, kSkDiscardable_PixelRefType, NULL);
-    CheckPixelRef(TestImageGenerator::kFailGetPixels_TestType,
-                  reporter, kSkDiscardable_PixelRefType, NULL);
-    CheckPixelRef(TestImageGenerator::kSucceedGetPixels_TestType,
-                  reporter, kSkDiscardable_PixelRefType, NULL);
+    check_pixelref(TestImageGenerator::kFailGetInfo_TestType,
+                   reporter, kSkDiscardable_PixelRefType, NULL);
+    check_pixelref(TestImageGenerator::kFailGetPixels_TestType,
+                   reporter, kSkDiscardable_PixelRefType, NULL);
+    check_pixelref(TestImageGenerator::kSucceedGetPixels_TestType,
+                   reporter, kSkDiscardable_PixelRefType, NULL);
 
     SkAutoTUnref<SkDiscardableMemoryPool> pool(
         SkNEW_ARGS(SkDiscardableMemoryPool, (1, NULL)));
     REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed());
-    CheckPixelRef(TestImageGenerator::kFailGetPixels_TestType,
-                  reporter, kSkDiscardable_PixelRefType, pool);
+    check_pixelref(TestImageGenerator::kFailGetPixels_TestType,
+                   reporter, kSkDiscardable_PixelRefType, pool);
     REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed());
-    CheckPixelRef(TestImageGenerator::kSucceedGetPixels_TestType,
-                  reporter, kSkDiscardable_PixelRefType, pool);
+    check_pixelref(TestImageGenerator::kSucceedGetPixels_TestType,
+                   reporter, kSkDiscardable_PixelRefType, pool);
     REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed());
 
     SkDiscardableMemoryPool* globalPool = SkGetGlobalDiscardableMemoryPool();
     // Only acts differently from NULL on a platform that has a
     // default discardable memory implementation that differs from the
     // global DM pool.
-    CheckPixelRef(TestImageGenerator::kFailGetPixels_TestType,
-                  reporter, kSkDiscardable_PixelRefType, globalPool);
-    CheckPixelRef(TestImageGenerator::kSucceedGetPixels_TestType,
-                  reporter, kSkDiscardable_PixelRefType, globalPool);
+    check_pixelref(TestImageGenerator::kFailGetPixels_TestType,
+                   reporter, kSkDiscardable_PixelRefType, globalPool);
+    check_pixelref(TestImageGenerator::kSucceedGetPixels_TestType,
+                   reporter, kSkDiscardable_PixelRefType, globalPool);
 }
-////////////////////////////////////////////////////////////////////////////////