skia2/tests
edisonn@google.com 676aef05ab Use SkSet to fix issue when pdf generates an exp number of resources.
The problem fixed - http://code.google.com/p/skia/issues/detail?id=940 - is that getResources will recursively obtain all child resource recursively without checking for duplicates.

If we have lots of duplicates, then we try to build a very large vector (exponential with the number of nodes usually) and sooner or later we end up using too much memory and crash.

A possible solution could have been to make sure resources do not have duplicates, but that requirement is impractical, and it this leaves the solution fragile, if there is any issue in the tree,  we crash.

When we emit the pdf, the large number of duplicates is not an issue, because SkPDFCatalog::addObject will deal with duplicates.

I have run the gm with --config pdf, and the images are 100% same bits, while the pdfs have the same size but some very small changes, the order of some objects.
Review URL: https://codereview.appspot.com/6744050

git-svn-id: http://skia.googlecode.com/svn/trunk@7883 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-27 16:54:44 +00:00
..
TestXCode/Tests.xcodeproj migrate more legacy unittests into tests/ 2009-03-07 03:39:23 +00:00
AAClipTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
AnnotationTest.cpp Defining new color constat for transparent color 2012-12-06 21:47:40 +00:00
AtomicTest.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
BitmapCopyTest.cpp Revert r3219. r3219 was a revert of r3036. r3036 made extractSubset copy the opaque bit but was reverted because of a partally-loaded jpeg issue in WK which has since been fixed: 2012-10-12 13:42:36 +00:00
BitmapFactoryTest.cpp Create SkLazyPixelRef which performs lazy decoding. 2013-02-22 21:38:35 +00:00
BitmapGetColorTest.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
BitmapHeapTest.cpp In SkBitmapHeap, defer adding owners for new bitmaps. 2012-11-16 20:34:37 +00:00
BitmapTransformerTest.cpp Fix r6808 fix & some compiler warnings 2012-12-14 13:55:06 +00:00
BitSetTest.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
BlitRowTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
BlurTest.cpp Remove warnings (trailing \, signed vs unsigned, parenthesization). 2011-10-27 15:27:51 +00:00
CanvasTest.cpp Update CanvasTest to do elementary tests for PDF too. 2012-10-18 15:58:23 +00:00
ChecksumTest.cpp Create SkBitmapChecksummer and associated SkBitmapTransformer 2012-12-12 17:22:23 +00:00
ClampRangeTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
ClipCacheTest.cpp Remove legacy names no longer referenced in Chrome and WebKit. 2013-02-07 14:43:04 +00:00
ClipCubicTest.cpp Defining new color constat for transparent color 2012-12-06 21:47:40 +00:00
ClipperTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
ClipStackTest.cpp eliminate all warnings in non-thirdparty code on mac 2013-01-07 16:47:43 +00:00
ColorFilterTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
ColorTest.cpp eliminate all warnings in non-thirdparty code on mac 2013-01-07 16:47:43 +00:00
DataRefTest.cpp eliminate all warnings in non-thirdparty code on mac 2013-01-07 16:47:43 +00:00
DeferredCanvasTest.cpp Address google3 compiler warning 2013-02-07 21:02:23 +00:00
DequeTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
DrawBitmapRectTest.cpp use SkTreatAsSprite in SkDraw (with guard for chrome if needed) 2013-01-03 15:22:40 +00:00
DrawPathTest.cpp add optional cull-rect to patheffects, so they can do less work if their results 2013-01-24 21:03:11 +00:00
DrawTextTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
EmptyPathTest.cpp Defining new color constat for transparent color 2012-12-06 21:47:40 +00:00
FillPathTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
FlatDataTest.cpp Fix broken test. 2012-08-14 19:30:20 +00:00
FlateTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
FontHostStreamTest.cpp Don't die when there are no fonts available. 2013-01-17 20:19:13 +00:00
FontHostTest.cpp Always round text position correctly. 2013-02-25 15:55:13 +00:00
GeometryTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
GLInterfaceValidation.cpp Move SK_SUPPORT_GPU checks below first #includes in case the macro is defined in SkUserConfig.h rather than by the build system. 2012-08-03 15:00:52 +00:00
GLProgramsTest.cpp Remove unused texture coordinate flags. 2013-02-14 15:25:44 +00:00
GpuBitmapCopyTest.cpp Fix WritePixels test on ANGLE. 2013-02-06 18:17:50 +00:00
GradientTest.cpp Adding a new unit test that demonstrates that dithering affects constant gradients 2013-01-30 15:52:06 +00:00
GrContextFactoryTest.cpp GrContextFactory can now expose the GLContext it is using. 2012-08-14 22:02:48 +00:00
GrMemoryPoolTest.cpp Re-enable inst counting in debug builds. 2013-01-15 20:37:04 +00:00
HashCacheTest.cpp Make GPU unit tests use GrContexts of different GL types. 2013-02-04 16:13:32 +00:00
InfRectTest.cpp fix warings. add SkTAbs() 2013-01-08 13:23:32 +00:00
LListTest.cpp Re-enable inst counting in debug builds. 2013-01-15 20:37:04 +00:00
MathTest.cpp eliminate all warnings in non-thirdparty code on mac 2013-01-07 16:47:43 +00:00
Matrix44Test.cpp fix warings. add SkTAbs() 2013-01-08 13:23:32 +00:00
MatrixTest.cpp return if we're invertible for the fast scale+trans case when we have no inverse 2013-01-30 15:47:42 +00:00
MD5Test.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-31 20:28:24 +00:00
MemsetTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
MetaDataTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
PackBitsTest.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
PaintTest.cpp Fix errors when compiling with -Wall -Werror on Android. 2013-02-07 18:58:35 +00:00
ParsePathTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
PathCoverageTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
PathMeasureTest.cpp Fix test_small_segments3 path measure test. 2012-10-03 19:10:31 +00:00
PathTest.cpp remove obsolete build flag SK_IGNORE_CONVEX_QUAD_OPT 2013-02-22 14:19:58 +00:00
PDFPrimitivesTest.cpp Use SkSet to fix issue when pdf generates an exp number of resources. 2013-02-27 16:54:44 +00:00
PictureTest.cpp Fixing crash in cloning empty SkPicture object 2013-01-28 21:04:44 +00:00
PictureUtilsTest.cpp Updated make_filepath test to reflect changes in picture_utils. TBR 2012-07-13 18:43:39 +00:00
PipeTest.cpp Defining new color constat for transparent color 2012-12-06 21:47:40 +00:00
PointTest.cpp Change comment in PointTest to refer to GCC bug 2012-08-27 13:14:46 +00:00
PremulAlphaRoundTripTest.cpp Make GPU unit tests use GrContexts of different GL types. 2013-02-04 16:13:32 +00:00
QuickRejectTest.cpp Added toString to SkDrawLooper-derived classes 2013-01-28 20:21:59 +00:00
RandomTest.cpp Fix for Gorilla test 2013-02-14 13:20:35 +00:00
Reader32Test.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
ReadPixelsTest.cpp Remove legacy names no longer referenced in Chrome and WebKit. 2013-02-07 14:43:04 +00:00
ReadWriteAlphaTest.cpp Fix errors when compiling with -Wall -Werror on Android. 2013-02-07 18:58:35 +00:00
RefCntTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
RefDictTest.cpp Extended Inst counting to find "unknown" leaked object (SkTMaskGamma) 2012-08-16 14:58:06 +00:00
RegionTest.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2012-11-08 02:03:56 +00:00
RoundRectTest.cpp fix warings. add SkTAbs() 2013-01-08 13:23:32 +00:00
RTreeTest.cpp Suppress some warnings on linux. 2012-09-26 13:08:56 +00:00
ScalarTest.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SHA1Test.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-31 20:28:24 +00:00
ShaderImageFilterTest.cpp Fix warnings-as-errors on Mac10.6 and Win. Unreviewed. 2013-02-21 17:10:44 +00:00
ShaderOpacityTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
Sk64Test.cpp remove SK_CAN_USE_FLOAT (deprecated) 2012-06-11 21:21:26 +00:00
skia_test.cpp add --tmpDir foo option to tests, to allow unittests that want to write/read files 2013-02-25 20:24:24 +00:00
SortTest.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-25 07:06:46 +00:00
SrcOverTest.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
StreamTest.cpp add --tmpDir foo option to tests, to allow unittests that want to write/read files 2013-02-25 20:24:24 +00:00
StringTest.cpp Add option to gm: write out images into a hierarchy, rather than a flat set of files 2012-10-29 16:42:11 +00:00
StrokeTest.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
Test.cpp Make GPU unit tests use GrContexts of different GL types. 2013-02-04 16:13:32 +00:00
Test.h add --tmpDir foo option to tests, to allow unittests that want to write/read files 2013-02-25 20:24:24 +00:00
TestClassDef.h Make GPU unit tests use GrContexts of different GL types. 2013-02-04 16:13:32 +00:00
TestSize.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
TileGridTest.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-02-09 07:05:02 +00:00
TLSTest.cpp eliminate all warnings in non-thirdparty code on mac 2013-01-07 16:47:43 +00:00
ToUnicode.cpp Fixed Windows compiler complaints 2012-07-10 17:30:58 +00:00
TSetTest.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-02-26 07:01:22 +00:00
UnicodeTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00
UtilsTest.cpp Remove SkRefPtr 2013-01-04 19:31:24 +00:00
valgrind.supp Close a couple of minor memory leaks, add a valgrind suppression file to 2012-03-15 18:16:39 +00:00
WArrayTest.cpp Fix metrics test to no longer include the cpp. 2012-06-25 17:01:46 +00:00
WritePixelsTest.cpp Remove legacy names no longer referenced in Chrome and WebKit. 2013-02-07 14:43:04 +00:00
Writer32Test.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
XfermodeTest.cpp Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:14:13 +00:00