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

Side by Side Diff: tests/AndroidPaintTest.cpp

Issue 138563004: Move macros from TestClassDef.h to Test.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: upload 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/ARGBImageEncoderTest.cpp ('k') | tests/AnnotationTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // SkPaints only have an SkPaintOptionsAndroid if SK_BUILD_FOR_ANDROID is true. 1 // SkPaints only have an SkPaintOptionsAndroid if SK_BUILD_FOR_ANDROID is true.
2 #ifdef SK_BUILD_FOR_ANDROID 2 #ifdef SK_BUILD_FOR_ANDROID
3 3
4 #include "SkPaintOptionsAndroid.h" 4 #include "SkPaintOptionsAndroid.h"
5 #include "SkOrderedReadBuffer.h" 5 #include "SkOrderedReadBuffer.h"
6 #include "SkOrderedWriteBuffer.h" 6 #include "SkOrderedWriteBuffer.h"
7 #include "SkPaint.h" 7 #include "SkPaint.h"
8 #include "Test.h" 8 #include "Test.h"
9 #include "TestClassDef.h"
10 9
11 static size_t Reconstruct(const SkPaint& src, SkPaint* dst) { 10 static size_t Reconstruct(const SkPaint& src, SkPaint* dst) {
12 SkOrderedWriteBuffer writer(64 /*arbitrary*/); 11 SkOrderedWriteBuffer writer(64 /*arbitrary*/);
13 src.flatten(writer); 12 src.flatten(writer);
14 13
15 const size_t size = writer.bytesWritten(); 14 const size_t size = writer.bytesWritten();
16 SkAutoMalloc bytes(size); 15 SkAutoMalloc bytes(size);
17 writer.writeToMemory(bytes.get()); 16 writer.writeToMemory(bytes.get());
18 17
19 SkOrderedReadBuffer reader(bytes.get(), size); 18 SkOrderedReadBuffer reader(bytes.get(), size);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 SkPaint nonDefaultOptions; 68 SkPaint nonDefaultOptions;
70 nonDefaultOptions.setPaintOptionsAndroid(options); 69 nonDefaultOptions.setPaintOptionsAndroid(options);
71 70
72 SkPaint dummy; 71 SkPaint dummy;
73 72
74 REPORTER_ASSERT(reporter, 73 REPORTER_ASSERT(reporter,
75 Reconstruct(defaultOptions, &dummy) < Reconstruct(nonDefault Options, &dummy)); 74 Reconstruct(defaultOptions, &dummy) < Reconstruct(nonDefault Options, &dummy));
76 } 75 }
77 76
78 #endif // SK_BUILD_FOR_ANDROID 77 #endif // SK_BUILD_FOR_ANDROID
OLDNEW
« no previous file with comments | « tests/ARGBImageEncoderTest.cpp ('k') | tests/AnnotationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698