moz-skia/tests
commit-bot@chromium.org 9e5f85e89d Fixing SkPicture serialization
Fixed a few issues while attempting to use the new
serialization path for SkPicture inside a fuzzer:
- SkReadBuffer and SkValidatingReadBuffer both had a fReader
member instead of sharing the same member, which leads to
problems if a base class function is used
- In SkPicture, a header is now written as a single chunk of
data, so it also has to be read as a single chunk of data
- In the SkPicturePlayback destructor, a bad deserialization
would lead to a crash if we don't safely unref fOpData
- Also in SkPicturePlayback, if we only use a ReadBuffer for
the whole deserialization, additional tags must be added to
parseBufferTag()
- SkValidatingReadBuffer::readBitmap() was broken, but this
path wasn't usen't since the only use case for
SkValidatingReadBuffer is currently image filters and
bitmaps are unflattened as part of the deserialization of
SkBitmapSource
- SkPictureImageFilter was not deserializable. Added it to
SkGlobalInitialization*
- Added a test that exercises the SkPicture serialization /
deserialization code

BUG=skia:
R=senorblanco@google.com, senorblanco@chromium.org, reed@google.com, robertphillips@google.com

Author: sugoi@chromium.org

Review URL: https://codereview.chromium.org/195223003

git-svn-id: http://skia.googlecode.com/svn/trunk@13764 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-12 14:46:41 +00:00
..
TestXCode/Tests.xcodeproj
AAClipTest.cpp replace setConfig+allocPixels with alloc-or-install-pixels 2014-02-13 22:00:04 +00:00
ARGBImageEncoderTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
AndroidPaintTest.cpp Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
AnnotationTest.cpp replace setConfig+allocPixels with alloc-or-install-pixels 2014-02-13 22:00:04 +00:00
AtomicTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
BBoxHierarchyTest.cpp Initial QuadTree implementation 2014-02-03 18:08:33 +00:00
BitSetTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
BitmapCopyTest.cpp remove deprecated use of bitmap config from tests 2014-03-05 13:43:15 +00:00
BitmapGetColorTest.cpp remove deprecated use of bitmap config from tests 2014-03-05 13:43:15 +00:00
BitmapHasherTest.cpp remove deprecated use of bitmap config from tests 2014-03-05 13:43:15 +00:00
BitmapHeapTest.cpp staticMethod -> StaticMethod 2014-02-18 16:15:05 +00:00
BitmapTest.cpp replace setConfig+allocPixels with alloc-or-install-pixels 2014-02-13 22:00:04 +00:00
BlendTest.cpp BlendTest: implicit casts -> explicit casts 2014-02-26 21:40:07 +00:00
BlitRowTest.cpp remove deprecated use of bitmap config from tests 2014-03-05 13:43:15 +00:00
BlurTest.cpp replace setConfig+allocPixels with alloc-or-install-pixels 2014-02-13 22:00:04 +00:00
CachedDecodingPixelRefTest.cpp SkOnce: add option to call another cleanup function once at exit. 2014-01-24 22:38:39 +00:00
CanvasStateTest.cpp flag to make kClipToLayer_SaveFlag the default behavior 2014-03-10 19:47:58 +00:00
CanvasTest.cpp hide getTotalClip, so we can eventually remove it 2014-03-08 03:57:19 +00:00
ChecksumTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
ClampRangeTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
ClipCacheTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
ClipCubicTest.cpp replace setConfig+allocPixels with alloc-or-install-pixels 2014-02-13 22:00:04 +00:00
ClipStackTest.cpp Store SkRRects in SkClipStack 2014-02-16 13:25:24 +00:00
ClipperTest.cpp replace setConfig+allocPixels with alloc-or-install-pixels 2014-02-13 22:00:04 +00:00
ColorFilterTest.cpp Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
ColorPrivTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
ColorTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
DataRefTest.cpp Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
DeferredCanvasTest.cpp remove code disabled from writePixels change 2014-03-07 14:52:22 +00:00
DequeTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
DeviceLooperTest.cpp replace setConfig+allocPixels with alloc-or-install-pixels 2014-02-13 22:00:04 +00:00
DiscardableMemoryPoolTest.cpp Rename test files to end with Test.cpp. 2014-03-03 19:23:28 +00:00
DiscardableMemoryTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
DocumentTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
DrawBitmapRectTest.cpp replace setConfig+allocPixels with alloc-or-install-pixels 2014-02-13 22:00:04 +00:00
DrawPathTest.cpp add SkCanvas::NewRaster factory -- a very common use-case in chrome 2014-02-27 20:32:51 +00:00
DrawTextTest.cpp remove deprecated use of bitmap config from tests 2014-03-05 13:43:15 +00:00
DynamicHashTest.cpp Sanitizing source files in Housekeeper-Nightly 2014-03-05 03:02:06 +00:00
EmptyPathTest.cpp replace setConfig+allocPixels with single call 2014-02-13 14:41:43 +00:00
ErrorTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
FillPathTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
FitsInTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
FlatDataTest.cpp staticMethod -> StaticMethod 2014-02-18 16:15:05 +00:00
FlateTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
FontHostStreamTest.cpp remove deprecated use of bitmap config from tests 2014-03-05 13:43:15 +00:00
FontHostTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
FontMgrTest.cpp Fix FontMgrTest to allow for unnamed fonts. 2014-03-05 19:41:10 +00:00
FontNamesTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
FrontBufferedStreamTest.cpp Use SkToBool to fix a warning. 2014-02-10 22:46:08 +00:00
GLInterfaceValidationTest.cpp Rename test files to end with Test.cpp. 2014-03-03 19:23:28 +00:00
GLProgramsTest.cpp Factory methods for heap-allocated SkImageFilter objects. 2014-03-10 10:51:58 +00:00
GeometryTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
GifTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
GpuColorFilterTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
GpuDrawPathTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
GrBinHashKeyTest.cpp Split GrUnitTests.cpp into two separate unit tests. 2014-01-31 21:48:52 +00:00
GrContextFactoryTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
GrDrawTargetTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
GrMemoryPoolTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
GrOrderedSetTest.cpp Sanitizing source files in Housekeeper-Nightly 2014-02-28 03:02:05 +00:00
GrRedBlackTreeTest.cpp GrRedBlackTree test is GPU specific. 2014-01-30 00:28:54 +00:00
GrSurfaceTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
GrTBSearchTest.cpp Split GrUnitTests.cpp into two separate unit tests. 2014-01-31 21:48:52 +00:00
GradientTest.cpp replace setConfig+allocPixels with single call 2014-02-13 14:41:43 +00:00
HashCacheTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
ImageCacheTest.cpp Replace scaled bitmap if entry already exist in cache. 2014-03-05 13:44:18 +00:00
ImageDecodingTest.cpp replace setConfig+allocPixels with single call 2014-02-13 14:41:43 +00:00
ImageFilterTest.cpp Factory methods for heap-allocated SkImageFilter objects. 2014-03-10 10:51:58 +00:00
InfRectTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
JpegTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
LListTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
LayerDrawLooperTest.cpp [WIP] Add Context to SkDrawLooper. 2014-03-12 09:42:01 +00:00
MD5Test.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
MallocPixelRefTest.cpp use some helper Make functions to initialize SkImageInfo 2014-01-15 02:38:22 +00:00
MathTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
Matrix44Test.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
MatrixClipCollapseTest.cpp Sanitizing source files in Housekeeper-Nightly 2014-02-20 03:01:56 +00:00
MatrixTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
MemoryTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
MemsetTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
MessageBusTest.cpp Move SkMessageBus::Get out of header, and retry crrev.com/106563002. 2014-01-15 23:09:01 +00:00
MetaDataTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
MipMapTest.cpp replace setConfig+allocPixels with single call 2014-02-13 14:41:43 +00:00
OSPathTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
OnceTest.cpp SkOnce: add option to call another cleanup function once at exit. 2014-01-24 22:38:39 +00:00
PDFPrimitivesTest.cpp replace setConfig+allocPixels with single call 2014-02-13 14:41:43 +00:00
PackBitsTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
PaintTest.cpp Merge tomhudson and mtklein SkPaint shrinking approaches. 2014-02-21 18:18:05 +00:00
ParsePathTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
PathCoverageTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
PathMeasureTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
PathOpsAngleTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsBoundsTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsCubicIntersectionTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsCubicIntersectionTestData.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
PathOpsCubicIntersectionTestData.h
PathOpsCubicLineIntersectionTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsCubicQuadIntersectionTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsCubicReduceOrderTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsCubicToQuadsTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsDCubicTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsDLineTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsDPointTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsDQuadTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsDRectTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsDTriangleTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsDVectorTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsExtendedTest.cpp replace setConfig+allocPixels with single call 2014-02-13 14:41:43 +00:00
PathOpsExtendedTest.h
PathOpsInverseTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsLineIntersectionTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsLineParametetersTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsOpCubicThreadedTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsOpRectThreadedTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsOpTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsQuadIntersectionTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsQuadIntersectionTestData.cpp
PathOpsQuadIntersectionTestData.h
PathOpsQuadLineIntersectionTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsQuadLineIntersectionThreadedTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsQuadParameterizationTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsQuadReduceOrderTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsSimplifyDegenerateThreadedTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsSimplifyFailTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
PathOpsSimplifyQuadThreadedTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsSimplifyQuadralateralsThreadedTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsSimplifyRectThreadedTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsSimplifyTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsSimplifyTrianglesThreadedTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsSkpClipTest.cpp replace setConfig+allocPixels with single call 2014-02-13 14:41:43 +00:00
PathOpsSkpTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathOpsTestCommon.cpp
PathOpsTestCommon.h
PathOpsThreadedCommon.cpp
PathOpsThreadedCommon.h
PathOpsTypesTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PathTest.cpp Sanitizing source files in Housekeeper-Nightly 2014-02-12 03:02:04 +00:00
PathUtilsTest.cpp replace setConfig+allocPixels with single call 2014-02-13 14:41:43 +00:00
PictureTest.cpp Give PictureTest more verbose error messages. 2014-03-05 20:59:45 +00:00
PictureUtilsTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
PipeTest.cpp replace setConfig+allocPixels with single call 2014-02-13 14:41:43 +00:00
PixelRefTest.cpp remove deprecated use of bitmap config from tests 2014-03-05 13:43:15 +00:00
PointTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
PremulAlphaRoundTripTest.cpp Sanitizing source files in Housekeeper-Nightly 2014-03-08 03:02:06 +00:00
QuickRejectTest.cpp [WIP] Add Context to SkDrawLooper. 2014-03-12 09:42:01 +00:00
RTreeTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
RandomTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
ReadPixelsTest.cpp Change device factories to take SkImageInfo instead of SkBitmap::Config 2014-02-16 00:59:25 +00:00
ReadWriteAlphaTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
Reader32Test.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
RefCntTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
RefDictTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
RegionTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
ResourceCacheTest.cpp replace setConfig+allocPixels with single call 2014-02-13 14:41:43 +00:00
RoundRectTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
RuntimeConfigTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
SHA1Test.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
ScalarTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
SerializationTest.cpp Fixing SkPicture serialization 2014-03-12 14:46:41 +00:00
ShaderImageFilterTest.cpp replace setConfig+allocPixels with single call 2014-02-13 14:41:43 +00:00
ShaderOpacityTest.cpp replace setConfig+allocPixels with single call 2014-02-13 14:41:43 +00:00
SkBase64Test.cpp Fix valgrind issue in SkBase64Test.cpp 2014-02-01 15:45:23 +00:00
SkpSkGrTest.cpp Sanitizing source files in Housekeeper-Nightly 2014-02-14 03:02:05 +00:00
SmallAllocatorTest.cpp Add a class to allocate small objects w/o extra calls to new. 2014-03-07 03:24:41 +00:00
SortTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
SrcOverTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
StreamTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
StringTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
StrokeTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
SurfaceTest.cpp Sanitizing source files in Housekeeper-Nightly 2014-02-14 03:02:05 +00:00
TDStackNesterTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
TLSTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
TSetTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
Test.cpp Sanitizing source files in Housekeeper-Nightly 2014-02-27 03:02:34 +00:00
Test.h Let DM run unit tests. 2014-02-26 16:31:22 +00:00
TestSize.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
TileGridTest.cpp replace setConfig+allocPixels with single call 2014-02-13 14:41:43 +00:00
ToUnicodeTest.cpp Rename test files to end with Test.cpp. 2014-03-03 19:23:28 +00:00
TracingTest.cpp initial import of Chrome's trace_event into skia framework 2014-01-31 00:04:25 +00:00
TypefaceTest.cpp Rename test files to end with Test.cpp. 2014-03-03 19:23:28 +00:00
UnicodeTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
UnitTestTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
UtilsTest.cpp Cleanup: Sanitize the order of includes under tests/ 2014-01-24 20:56:26 +00:00
WArrayTest.cpp Move macros from TestClassDef.h to Test.h 2014-01-14 21:04:37 +00:00
WritePixelsTest.cpp Add SkCanvas::writePixels that takes info+pixels directly 2014-03-07 03:25:16 +00:00
Writer32Test.cpp Templetized SkWriter32 readTAt() & overwriteTAt() 2014-02-11 22:38:51 +00:00
XfermodeTest.cpp Factory methods for heap-allocated SkPathEffect and SkXfermode objects. 2014-02-20 20:40:19 +00:00
skia_test.cpp Let DM run unit tests. 2014-02-26 16:31:22 +00:00
valgrind.supp Fix valgrind suppressions (again) 2014-02-14 14:08:05 +00:00