Index: tests/BitmapHeapTest.cpp |
diff --git a/tests/BitmapHeapTest.cpp b/tests/BitmapHeapTest.cpp |
index 2b5cf830c5933df2b0a9a84ad9aa0090e9922285..bcfec22fd1663a6ab9e2e61bde0eb449164480b5 100644 |
--- a/tests/BitmapHeapTest.cpp |
+++ b/tests/BitmapHeapTest.cpp |
@@ -16,18 +16,12 @@ |
#include "Test.h" |
#include "TestClassDef.h" |
-class FlatDictionary : public SkFlatDictionary<SkShader> { |
- |
-public: |
- FlatDictionary(SkFlatController* controller) |
- : SkFlatDictionary<SkShader>(controller) { |
- fFlattenProc = &flattenFlattenableProc; |
- // No need for an unflattenProc |
- } |
- static void flattenFlattenableProc(SkOrderedWriteBuffer& buffer, const void* obj) { |
- buffer.writeFlattenable((SkFlattenable*)obj); |
+struct SkShaderTraits { |
+ static void flatten(SkOrderedWriteBuffer& buffer, const SkShader& shader) { |
+ buffer.writeFlattenable(&shader); |
} |
}; |
+typedef SkFlatDictionary<SkShader, SkShaderTraits> FlatDictionary; |
class SkBitmapHeapTester { |