moz-skia/tests
scroggo@google.com 7d8013f306 Changes to SkTDStackNester.
SkTDStackNester is a class used by PdfViewer to assist in saving
and restoring the PDF state. Clean up and test this class.

Add some documentation.

Add FIXME's where I have questions to resolve.

Fix a bug where fNestingLevel was not initialized.

Remove a commented out line of code copied over from
SkTDStack.

Rename SkTDStackNester::nests() to nestingLevel() and make it const.

Remove unnecessary predeclaration and friend declaration.

Remove index() (both const and non-const versions). They were
unused, return something that may not be expected (index from
the top, rather than from the bottom), and don't work to get any
elements in earlier Recs once the first one is full.

Report a warning if the nesting level goes above the maximum level,
or if we attempt to bring it below zero.

Prevent fNestingLevel from dropping below zero.

Add kUnusedObject_SkPdfIssue, and use it where appropriate.

Depends on https://codereview.chromium.org/64093009/

R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12328 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 21:40:57 +00:00
..
TestXCode/Tests.xcodeproj migrate more legacy unittests into tests/ 2009-03-07 03:39:23 +00:00
AAClipTest.cpp Add an even more convenient way to declare tests, with example. 2013-09-19 20:56:46 +00:00
ARGBImageEncoderTest.cpp store SkAlphaType inside SkBitmap, on road to support unpremul 2013-10-21 14:00:07 +00:00
AndroidPaintTest.cpp We don't flatten or unflatten SkPaintOptionsAndroid. Reproduce and fix. 2013-09-26 15:16:12 +00:00
AnnotationTest.cpp PDF: add support for named destinations. 2013-03-08 09:09:10 +00:00
AtomicTest.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
BitSetTest.cpp Automatic update of all copyright notices to reflect new license terms. 2011-07-28 14:26:00 +00:00
BitmapCopyTest.cpp Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning"" 2013-10-31 17:28:30 +00:00
BitmapFactoryTest.cpp "Fix" persistent failure of BitmapFactoryTest on debug RazrI 2013-03-21 20:54:42 +00:00
BitmapGetColorTest.cpp Change old PRG to be SkLCGRandom; change new one to SkRandom 2013-09-09 20:09:12 +00:00
BitmapHasherTest.cpp store SkAlphaType inside SkBitmap, on road to support unpremul 2013-10-21 14:00:07 +00:00
BitmapHeapTest.cpp In SkBitmapHeap, defer adding owners for new bitmaps. 2012-11-16 20:34:37 +00:00
BlitRowTest.cpp More clang warning fixes. 2013-10-21 16:41:00 +00:00
BlurTest.cpp Address some more valgrind issues 2013-11-14 14:47:56 +00:00
CachedDecodingPixelRefTest.cpp Break up SkLazyPixelRef functionally into class hierarchy. 2013-11-06 10:08:30 +00:00
CanvasStateTest.cpp fix printing of error messages in canvasstatetest. 2013-09-18 20:15:12 +00:00
CanvasTest.cpp More clang warning fixes. 2013-10-21 16:41:00 +00:00
ChecksumTest.cpp Add SkChecksum::Murmur3. 2013-07-23 20:25:34 +00:00
ClampRangeTest.cpp Change old PRG to be SkLCGRandom; change new one to SkRandom 2013-09-09 20:09:12 +00:00
ClipCacheTest.cpp Avoid re-rendering stencil clip for every draw with reducable clip stack 2013-11-05 15:03:08 +00:00
ClipCubicTest.cpp Clean up SkTypes.h. 2013-10-11 18:50:45 +00:00
ClipStackTest.cpp Avoid re-rendering stencil clip for every draw with reducable clip stack 2013-11-05 15:03:08 +00:00
ClipperTest.cpp Tests : Unused parameters cleanup 2013-02-27 19:17:41 +00:00
ColorFilterTest.cpp force readbuffer clients to use specialized readFoo for flattenables 2013-10-16 13:05:06 +00:00
ColorTest.cpp More clang warning fixes. 2013-10-21 16:41:00 +00:00
DataRefTest.cpp Remove SkDataTable from SkFlattenable hierarchy. 2013-10-15 20:39:57 +00:00
DeferredCanvasTest.cpp "Fix" another crash in DeferredCanvasTest on valgrind bot 2013-11-13 14:26:52 +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
DeviceLooperTest.cpp Fix Mac 10.6 DeviceLooperTest build error (this time with feeling) 2013-09-18 12:51:50 +00:00
DocumentTest.cpp Fix DocumentTest/SkDocument memory leaks 2013-11-18 16:26:25 +00:00
DrawBitmapRectTest.cpp move SkImage::ColorType into SkColorType 2013-11-01 13:46:54 +00:00
DrawPathTest.cpp promote SkImage::AlphaType to SkAlphaType 2013-09-20 19:33:52 +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
DynamicHashTest.cpp Remove unnamed namespace usage from tests. 2013-10-12 17:25:17 +00:00
EmptyPathTest.cpp Refactor: clean up some unused or mostly-unused API I saw here. 2013-06-18 20:50:34 +00:00
ErrorTest.cpp Sanitizing source files in Housekeeper-Nightly 2013-09-20 07:01:33 +00:00
FillPathTest.cpp Remove unnamed namespace usage from tests. 2013-10-12 17:25:17 +00:00
FitsInTest.cpp Remove unnamed namespace usage from tests. 2013-10-12 17:25:17 +00:00
FlatDataTest.cpp use SkTDynamicHash in picture recording 2013-08-20 16:48:47 +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 Address some more valgrind issues 2013-11-14 14:47:56 +00:00
FontHostTest.cpp onCharsToGlyphs to handle non-bmp on Mac. 2013-10-25 17:49:08 +00:00
FontMgrTest.cpp Sanitizing source files in Housekeeper-Nightly 2013-09-20 07:01:33 +00:00
FontNamesTest.cpp Clean up SkTypes.h. 2013-10-11 18:50:45 +00:00
FrontBufferedStreamTest.cpp Hide implementation details: SkFrontBufferedStream 2013-11-12 20:53:05 +00:00
GLInterfaceValidation.cpp Simplify the GL interface validation test. 2013-03-11 20:22:38 +00:00
GLProgramsTest.cpp Implement SkColorFilter as a GrGLEffect 2013-10-23 05:42:03 +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
GifTest.cpp GIF decode: optional error messages and fault tolerance. 2013-10-11 18:21:56 +00:00
GpuBitmapCopyTest.cpp Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning"" 2013-10-31 17:28:30 +00:00
GpuColorFilterTest.cpp Implement SkColorFilter as a GrGLEffect 2013-10-23 05:42:03 +00:00
GpuDrawPathTest.cpp Temporarily disable GpuTestPath. 2013-08-05 14:50:31 +00:00
GrContextFactoryTest.cpp Add --threads to tests binary, to run non-GPU tests on multiple cores. 2013-04-19 13:24:28 +00:00
GrDrawTargetTest.cpp Fix stale assert in GrDrawTarget::print 2013-11-08 18:45:27 +00:00
GrMemoryPoolTest.cpp Remove unnamed namespace usage from tests. 2013-10-12 17:25:17 +00:00
GrSurfaceTest.cpp Reland of 8525 with fix for case when GrRT outlives GrTexture. 2013-04-09 15:04:12 +00:00
GradientTest.cpp Split SkDevice into SkBaseDevice and SkBitmapDevice 2013-08-29 11:54:56 +00:00
HashCacheTest.cpp Clean up the GrTHashTable API. 2013-10-27 20:50:23 +00:00
ImageCacheTest.cpp SkTDynamicHash 2013-08-12 14:51:25 +00:00
ImageDecodingTest.cpp Implement charToGlyph on remaining ports. 2013-10-24 21:39:35 +00:00
ImageFilterTest.cpp Address some more valgrind issues 2013-11-14 14:47:56 +00:00
InfRectTest.cpp Change old PRG to be SkLCGRandom; change new one to SkRandom 2013-09-09 20:09:12 +00:00
JpegTest.cpp Remove unnamed namespace usage from tests. 2013-10-12 17:25:17 +00:00
LListTest.cpp Change old PRG to be SkLCGRandom; change new one to SkRandom 2013-09-09 20:09:12 +00:00
LayerDrawLooperTest.cpp Remove unnamed namespace usage from tests. 2013-10-12 17:25:17 +00:00
MD5Test.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-31 20:28:24 +00:00
MathTest.cpp Clean up SkTypes.h. 2013-10-11 18:50:45 +00:00
Matrix44Test.cpp Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning"" 2013-10-31 17:28:30 +00:00
MatrixTest.cpp Checking structure sizes before reading them from memory to avoid overflowing the buffer's stream. 2013-11-05 15:46:56 +00:00
MemoryTest.cpp Add sk_calloc. Remove SkMemory_stdlib, which seems unused. 2013-09-20 14:31:45 +00:00
MemsetTest.cpp combine glyph and image bulk alloc, and adjust initial alloc size, to reduce total waste from 50% to 30% 2013-06-19 19:25:36 +00:00
MessageBusTest.cpp We want to give SkPixelRef a way to signal over to GrResourceCache that it's become pointless to keep around textures based on that SkPixelRef when its pixels change, so that it can be a good citizen and free those textures. 2013-10-24 17:44:27 +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
MipMapTest.cpp Change old PRG to be SkLCGRandom; change new one to SkRandom 2013-09-09 20:09:12 +00:00
OSPathTest.cpp Fix bug in setting directories for tests. 2013-06-06 14:59:56 +00:00
OnceTest.cpp SK_ONCE for SkData and SkPathRef 2013-10-23 14:44:08 +00:00
PDFPrimitivesTest.cpp Use SkPicture::ExtractBitmap callback in pdf too, there is no need for a specialized function pointer for pdf only only to pass a rectangle, when we can use subseted bitmaps. 2013-10-03 19:29:21 +00:00
PackBitsTest.cpp Change old PRG to be SkLCGRandom; change new one to SkRandom 2013-09-09 20:09:12 +00:00
PaintTest.cpp Change old PRG to be SkLCGRandom; change new one to SkRandom 2013-09-09 20:09:12 +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 Tests : Unused parameters cleanup 2013-02-27 19:17:41 +00:00
PathMeasureTest.cpp Tests : Unused parameters cleanup 2013-02-27 19:17:41 +00:00
PathOpsAngleTest.cpp More clang warning fixes. 2013-10-21 16:41:00 +00:00
PathOpsBoundsTest.cpp harden and speed up path op unit tests 2013-07-16 16:11:16 +00:00
PathOpsCubicIntersectionTest.cpp pathops work in progress 2013-11-01 17:36:03 +00:00
PathOpsCubicIntersectionTestData.cpp path ops work in progress 2013-10-02 14:49:34 +00:00
PathOpsCubicIntersectionTestData.h Make parallel unit testing work on windows 2013-04-10 15:55:37 +00:00
PathOpsCubicLineIntersectionTest.cpp pathops work in progress 2013-11-01 17:36:03 +00:00
PathOpsCubicQuadIntersectionTest.cpp Sanitizing source files in Housekeeper-Nightly 2013-11-02 07:02:02 +00:00
PathOpsCubicReduceOrderTest.cpp path ops work in progress 2013-10-02 14:49:34 +00:00
PathOpsCubicToQuadsTest.cpp harden and speed up path op unit tests 2013-07-16 16:11:16 +00:00
PathOpsDCubicTest.cpp harden and speed up path op unit tests 2013-07-16 16:11:16 +00:00
PathOpsDLineTest.cpp turn off debugging printfs 2013-07-23 15:27:41 +00:00
PathOpsDPointTest.cpp harden and speed up path op unit tests 2013-07-16 16:11:16 +00:00
PathOpsDQuadTest.cpp pathops work in progress 2013-11-01 17:36:03 +00:00
PathOpsDRectTest.cpp harden and speed up path op unit tests 2013-07-16 16:11:16 +00:00
PathOpsDTriangleTest.cpp Sanitizing source files in Housekeeper-Nightly 2013-11-02 07:02:02 +00:00
PathOpsDVectorTest.cpp harden and speed up path op unit tests 2013-07-16 16:11:16 +00:00
PathOpsExtendedTest.cpp pathops work in progress 2013-11-01 17:36:03 +00:00
PathOpsExtendedTest.h harden and speed up path op unit tests 2013-07-16 16:11:16 +00:00
PathOpsInverseTest.cpp path ops : add support for inverse fill 2013-04-22 14:37:05 +00:00
PathOpsLineIntersectionTest.cpp fix line intersection 2013-11-08 18:00:01 +00:00
PathOpsLineParametetersTest.cpp harden and speed up path op unit tests 2013-07-16 16:11:16 +00:00
PathOpsOpCubicThreadedTest.cpp harden and speed up path op unit tests 2013-07-16 16:11:16 +00:00
PathOpsOpRectThreadedTest.cpp harden and speed up path op unit tests 2013-07-16 16:11:16 +00:00
PathOpsOpTest.cpp Sanitizing source files in Housekeeper-Nightly 2013-11-02 07:02:02 +00:00
PathOpsQuadIntersectionTest.cpp Sanitizing source files in Housekeeper-Nightly 2013-11-02 07:02:02 +00:00
PathOpsQuadIntersectionTestData.cpp path ops work in progress 2013-10-02 14:49:34 +00:00
PathOpsQuadIntersectionTestData.h Add intersections for path ops 2013-04-08 11:50:00 +00:00
PathOpsQuadLineIntersectionTest.cpp Sanitizing source files in Housekeeper-Nightly 2013-11-02 07:02:02 +00:00
PathOpsQuadLineIntersectionThreadedTest.cpp turn off debugging printfs 2013-07-23 15:27:41 +00:00
PathOpsQuadParameterizationTest.cpp path ops work in progress 2013-04-15 19:13:59 +00:00
PathOpsQuadReduceOrderTest.cpp Clean up SkTypes.h. 2013-10-11 18:50:45 +00:00
PathOpsSimplifyDegenerateThreadedTest.cpp harden and speed up path op unit tests 2013-07-16 16:11:16 +00:00
PathOpsSimplifyFailTest.cpp path ops work in progress 2013-09-16 15:55:01 +00:00
PathOpsSimplifyQuadThreadedTest.cpp harden and speed up path op unit tests 2013-07-16 16:11:16 +00:00
PathOpsSimplifyQuadralateralsThreadedTest.cpp harden and speed up path op unit tests 2013-07-16 16:11:16 +00:00
PathOpsSimplifyRectThreadedTest.cpp harden and speed up path op unit tests 2013-07-16 16:11:16 +00:00
PathOpsSimplifyTest.cpp Sanitizing source files in Housekeeper-Nightly 2013-10-03 07:01:37 +00:00
PathOpsSimplifyTrianglesThreadedTest.cpp harden and speed up path op unit tests 2013-07-16 16:11:16 +00:00
PathOpsSkpClipTest.cpp Sanitizing source files in Housekeeper-Nightly 2013-11-02 07:02:02 +00:00
PathOpsSkpTest.cpp Sanitizing source files in Housekeeper-Nightly 2013-11-09 07:02:23 +00:00
PathOpsTestCommon.cpp Sanitizing source files in Housekeeper-Nightly 2013-07-17 07:01:13 +00:00
PathOpsTestCommon.h harden and speed up path op unit tests 2013-07-16 16:11:16 +00:00
PathOpsThreadedCommon.cpp path ops work in progress 2013-09-16 15:55:01 +00:00
PathOpsThreadedCommon.h pathops work in progress 2013-11-01 17:36:03 +00:00
PathOpsTypesTest.cpp Sanitizing source files in Housekeeper-Nightly 2013-11-02 07:02:02 +00:00
PathTest.cpp increase coverage of SkPath.cpp, remove unused code 2013-11-14 16:53:22 +00:00
PathUtilsTest.cpp Change old PRG to be SkLCGRandom; change new one to SkRandom 2013-09-09 20:09:12 +00:00
PictureTest.cpp Expose SkPicture::willPlayBackBitmaps() 2013-10-24 11:12:47 +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
PixelRefTest.cpp We want to give SkPixelRef a way to signal over to GrResourceCache that it's become pointless to keep around textures based on that SkPixelRef when its pixels change, so that it can be a good citizen and free those textures. 2013-10-24 17:44:27 +00:00
PointTest.cpp Add sk_float_rsqrt with SSE + NEON fast paths. 2013-11-08 20:14:16 +00:00
PremulAlphaRoundTripTest.cpp Remove unnamed namespace usage from tests. 2013-10-12 17:25:17 +00:00
QuickRejectTest.cpp Added toString to SkDrawLooper-derived classes 2013-01-28 20:21:59 +00:00
RTreeTest.cpp Change old PRG to be SkLCGRandom; change new one to SkRandom 2013-09-09 20:09:12 +00:00
RandomTest.cpp Change old PRG to be SkLCGRandom; change new one to SkRandom 2013-09-09 20:09:12 +00:00
ReadPixelsTest.cpp Remove unnamed namespace usage from tests. 2013-10-12 17:25:17 +00:00
ReadWriteAlphaTest.cpp Remove GrRefCnt.h in favor of SkRefCnt.h 2013-09-09 13:38:37 +00:00
Reader32Test.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +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 Change old PRG to be SkLCGRandom; change new one to SkRandom 2013-09-09 20:09:12 +00:00
ResourceCacheTest.cpp Sanitizing source files in Housekeeper-Nightly 2013-08-09 07:01:22 +00:00
RoundRectTest.cpp Add SkRRect::transform. 2013-11-05 15:54:42 +00:00
RuntimeConfigTest.cpp New SkRTConf macro SK_CONF_TRY_SET: no complaint on missing configuration 2013-11-06 15:07:44 +00:00
SHA1Test.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-31 20:28:24 +00:00
ScalarTest.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SerializationTest.cpp Adding error checks to SkRBuffer 2013-11-08 19:22:57 +00:00
ShaderImageFilterTest.cpp Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning"" 2013-10-31 17:28:30 +00:00
ShaderOpacityTest.cpp store SkAlphaType inside SkBitmap, on road to support unpremul 2013-10-21 14:00:07 +00:00
Sk64Test.cpp Change old PRG to be SkLCGRandom; change new one to SkRandom 2013-09-09 20:09:12 +00:00
SkpSkGrTest.cpp Sanitizing source files in Housekeeper-Nightly 2013-11-02 07:02:02 +00:00
SortTest.cpp Change old PRG to be SkLCGRandom; change new one to SkRandom 2013-09-09 20:09:12 +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 a detachAsStream to SkDynamicMemoryWStream. 2013-07-19 22:32:11 +00:00
StringTest.cpp Clean up SkTypes.h. 2013-10-11 18:50:45 +00:00
StrokeTest.cpp Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SurfaceTest.cpp Fix crash in tests on valgrind bot 2013-11-12 13:51:03 +00:00
TDStackNesterTest.cpp Changes to SkTDStackNester. 2013-11-20 21:40:57 +00:00
TLSTest.cpp Tests : Unused parameters cleanup 2013-02-27 19:17:41 +00:00
TSetTest.cpp Deterministic SkTSet and PDF Output 2013-07-24 01:51:08 +00:00
Test.cpp harden and speed up path op unit tests 2013-07-16 16:11:16 +00:00
Test.h Rewrite SkTRegistry to take any trivially-copyable type. 2013-09-04 17:20:18 +00:00
TestClassDef.h Add an even more convenient way to declare tests, with example. 2013-09-19 20:56:46 +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 Revert "If the path is a rect, call drawRect to raster the geometry in SkCanvas::drawPath to get better performance." 2013-10-22 16:54:15 +00:00
ToUnicode.cpp pdf: write only ToUnicode mappings needed by the font, trimming anything out of [firstChar, lastChar] interval. 2013-09-18 19:29:08 +00:00
Typeface.cpp Update Android's FontHost to return NULL if familyName does not match 2013-09-19 12:08:40 +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
UnitTestTest.cpp Fix crash when querying a runtime config that is defined in environment 2013-08-14 18:14:37 +00:00
UtilsTest.cpp Change old PRG to be SkLCGRandom; change new one to SkRandom 2013-09-09 20:09:12 +00:00
WArrayTest.cpp Remove unnamed namespace usage from tests. 2013-10-12 17:25:17 +00:00
WritePixelsTest.cpp Remove unnamed namespace usage from tests. 2013-10-12 17:25:17 +00:00
Writer32Test.cpp Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning"" 2013-10-31 17:28:30 +00:00
XfermodeTest.cpp Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning"" 2013-10-31 17:28:30 +00:00
skia_test.cpp GpuTest::GetContext() doesn't exist. 2013-11-20 17:59:54 +00:00
valgrind.supp Address some more valgrind issues 2013-11-14 14:47:56 +00:00