Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: tests/CachedDecodingPixelRefTest.cpp

Issue 132403008: Remove unnamed namespace usage from tests/ (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/DrawBitmapRectTest.cpp » ('j') | tests/DrawBitmapRectTest.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
-////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « no previous file | tests/DrawBitmapRectTest.cpp » ('j') | tests/DrawBitmapRectTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698