From 2f92966c6a2419023570d5951a4234cdaebcc3c9 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Tue, 15 Oct 2013 20:39:57 +0000 Subject: Remove SkDataTable from SkFlattenable hierarchy. As far as I can tell, we never really needed this. No code outside the unit test calls this code. BUG= R=reed@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/26223009 git-svn-id: http://skia.googlecode.com/svn/trunk@11792 2bbb7eff-a529-9590-31e7-b0007b416f81 --- tests/DataRefTest.cpp | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'tests/DataRefTest.cpp') diff --git a/tests/DataRefTest.cpp b/tests/DataRefTest.cpp index 9043a58722..c32c4553ca 100644 --- a/tests/DataRefTest.cpp +++ b/tests/DataRefTest.cpp @@ -25,26 +25,10 @@ static void test_is_equal(skiatest::Reporter* reporter, } } -static void test_datatable_flatten(skiatest::Reporter* reporter, - SkDataTable* table) { - SkOrderedWriteBuffer wb(1024); - wb.writeFlattenable(table); - - size_t wsize = wb.size(); - SkAutoMalloc storage(wsize); - wb.writeToMemory(storage.get()); - - SkOrderedReadBuffer rb(storage.get(), wsize); - SkAutoTUnref newTable((SkDataTable*)rb.readFlattenable()); - - test_is_equal(reporter, table, newTable); -} - static void test_datatable_is_empty(skiatest::Reporter* reporter, SkDataTable* table) { REPORTER_ASSERT(reporter, table->isEmpty()); REPORTER_ASSERT(reporter, 0 == table->count()); - test_datatable_flatten(reporter, table); } static void test_emptytable(skiatest::Reporter* reporter) { @@ -77,7 +61,6 @@ static void test_simpletable(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, *itable->atT(i, &size) == idata[i]); REPORTER_ASSERT(reporter, sizeof(int) == size); } - test_datatable_flatten(reporter, itable); } static void test_vartable(skiatest::Reporter* reporter) { @@ -104,7 +87,6 @@ static void test_vartable(skiatest::Reporter* reporter) { const char* s = table->atStr(i); REPORTER_ASSERT(reporter, strlen(s) == strlen(str[i])); } - test_datatable_flatten(reporter, table); } static void test_tablebuilder(skiatest::Reporter* reporter) { @@ -131,7 +113,6 @@ static void test_tablebuilder(skiatest::Reporter* reporter) { const char* s = table->atStr(i); REPORTER_ASSERT(reporter, strlen(s) == strlen(str[i])); } - test_datatable_flatten(reporter, table); } static void test_globaltable(skiatest::Reporter* reporter) { @@ -150,7 +131,6 @@ static void test_globaltable(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, *table->atT(i, &size) == i); REPORTER_ASSERT(reporter, sizeof(int) == size); } - test_datatable_flatten(reporter, table); } static void TestDataTable(skiatest::Reporter* reporter) { -- cgit v1.2.3