Index: tests/CachedDecodingPixelRefTest.cpp |
diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp |
index 434724d0cf9532e4e83b805aa04ddd60d062cc9c..72ffb54b180fa2cc506b9848fecd8532b21e6300 100644 |
--- a/tests/CachedDecodingPixelRefTest.cpp |
+++ b/tests/CachedDecodingPixelRefTest.cpp |
@@ -167,8 +167,6 @@ DEF_TEST(DecodingImageGenerator, reporter) { |
test_three_encodings(reporter, install_skDiscardablePixelRef); |
} |
-//////////////////////////////////////////////////////////////////////////////// |
-namespace { |
class TestImageGenerator : public SkImageGenerator { |
public: |
enum TestType { |
@@ -222,8 +220,8 @@ private: |
skiatest::Reporter* const fReporter; |
}; |
robertphillips
2014/01/14 13:19:37
check_test_image_generator_bitmap?
tfarina
2014/01/21 23:37:43
Done.
|
-void CheckTestImageGeneratorBitmap(skiatest::Reporter* reporter, |
- const SkBitmap& bm) { |
+static void CheckTestImageGeneratorBitmap(skiatest::Reporter* reporter, |
+ const SkBitmap& bm) { |
REPORTER_ASSERT(reporter, TestImageGenerator::Width() == bm.width()); |
REPORTER_ASSERT(reporter, TestImageGenerator::Height() == bm.height()); |
SkAutoLockPixels autoLockPixels(bm); |
@@ -247,10 +245,11 @@ enum PixelRefType { |
kSkDiscardable_PixelRefType, |
kLast_PixelRefType = kSkDiscardable_PixelRefType |
}; |
-void CheckPixelRef(TestImageGenerator::TestType type, |
- skiatest::Reporter* reporter, |
- PixelRefType pixelRefType, |
- SkDiscardableMemory::Factory* factory) { |
+ |
robertphillips
2014/01/14 13:19:37
check_pixelref?
tfarina
2014/01/21 23:37:43
Done.
|
+static void CheckPixelRef(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))); |
@@ -272,14 +271,12 @@ void CheckPixelRef(TestImageGenerator::TestType type, |
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(); |
} |
@@ -325,4 +322,3 @@ DEF_TEST(DiscardableAndCachingPixelRef, reporter) { |
CheckPixelRef(TestImageGenerator::kSucceedGetPixels_TestType, |
reporter, kSkDiscardable_PixelRefType, globalPool); |
} |
-//////////////////////////////////////////////////////////////////////////////// |