diff options
author | 2013-11-20 21:40:57 +0000 | |
---|---|---|
committer | 2013-11-20 21:40:57 +0000 | |
commit | 7d8013f3064cd202f5a2344a1ab1860fd7511bb3 (patch) | |
tree | 5f87ee1bb6a82681daa373b351dbbf7e896888c1 /gyp | |
parent | 178acd25b0053908ffcdf1b07a9f93d797408b13 (diff) |
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
Diffstat (limited to 'gyp')
-rw-r--r-- | gyp/experimental.gyp | 1 | ||||
-rw-r--r-- | gyp/tests.gyp | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gyp/experimental.gyp b/gyp/experimental.gyp index 5552b4c757..76bf0710a8 100644 --- a/gyp/experimental.gyp +++ b/gyp/experimental.gyp @@ -1,3 +1,4 @@ +# GYP file to build experimental directory. { 'targets': [ { diff --git a/gyp/tests.gyp b/gyp/tests.gyp index 2462c819eb..890a146fe8 100644 --- a/gyp/tests.gyp +++ b/gyp/tests.gyp @@ -17,6 +17,10 @@ '../src/pipe/utils', '../src/utils', '../tools/', + + # Needed for TDStackNesterTest. + '../experimental/PdfViewer', + '../experimental/PdfViewer/src', ], 'includes': [ 'pathops_unittest.gypi', @@ -152,6 +156,9 @@ '../tests/Writer32Test.cpp', '../tests/XfermodeTest.cpp', + '../experimental/PdfViewer/src/SkTDStackNester.h', + '../tests/TDStackNesterTest.cpp', + # Needed for PipeTest. '../src/pipe/utils/SamplePipeControllers.cpp', ], |