aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/skjson
Commit message (Collapse)AuthorAge
* Revert "[skjson] Size-constrained input API"Gravatar Florin Malita2018-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fc792b8718cc30e9da62c9559b23c1baac3166bb. Reason for revert: New ASAN, Android failures. Original change's description: > [skjson] Size-constrained input API > > Pass an explicit input size instead of requiring a C string. > > Thanks to mtklein's clever trick, this has no measurable perf impact. > > Change-Id: I64f210a9f653a78b05ab6b58fa34479504aa35ff > Reviewed-on: https://skia-review.googlesource.com/134940 > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Florin Malita <fmalita@chromium.org> TBR=mtklein@google.com,fmalita@chromium.org Change-Id: Ic0b52398b1ce6f64c781debb858829cb64bbae58 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/135022 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skjson] Fix ASAN undefined behaviorGravatar Florin Malita2018-06-14
| | | | | | | | | | | | | | | | | | | ASAN opines that a nullptr memcpy dest is undefined behavior, even when n == 0. ASAN may be right. This doesn't occur internally, in the parser, but can be triggered with the DOM builder API (as do some tests currently). We could say "don't do that", but if someone wants to build an empty string/array/object, it's kind of awkward to force them to provide a valid source pointer instead of simply e.g. Array(nullptr, 0). So let's guard for this case to make ASAN happy. Change-Id: If12e39f5eb8b273f22bbb0b5fce3321bf6482173 Reviewed-on: https://skia-review.googlesource.com/134944 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skjson] Size-constrained input APIGravatar Florin Malita2018-06-14
| | | | | | | | | | | Pass an explicit input size instead of requiring a C string. Thanks to mtklein's clever trick, this has no measurable perf impact. Change-Id: I64f210a9f653a78b05ab6b58fa34479504aa35ff Reviewed-on: https://skia-review.googlesource.com/134940 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Reland [skjson] Implementation/API tweaksGravatar Florin Malita2018-06-14
| | | | | | | | | | | | | | | | * move most common accessor methods to the header, for inlining * drop the lazy type checking semantics in favor of explicit guarded/unguarded conversions * revisit the public class hierarchy to better constrain type-bound APIs * expose public type factories and add tests * drop the empty-vector optimization -- allocating an external size_t in these uncommon cases is better than paying for a conditional on every access. TBR= Change-Id: Ic609bb74f12cad1756865a2489ad56c03ecc5494 Reviewed-on: https://skia-review.googlesource.com/134845 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "[skjson] Implementation/API tweaks"Gravatar Florin Malita2018-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 03b68421cafa58428edd8ab12e0d2235c7000c3f. Reason for revert: Broke Debian9 builds Original change's description: > [skjson] Implementation/API tweaks > > * move most common accessor methods to the header, for inlining > * drop the lazy type checking semantics in favor of explicit guarded/unguarded > conversions > * revisit the public class hierarchy to better constrain type-bound APIs > * expose public type factories and add tests > * drop the empty-vector optimization -- allocating an external size_t in these > uncommon cases is better than paying for a conditional on every access. > > Change-Id: I24a7c75db3aa8b12c740c77ac7df4af4e3a1dff8 > Reviewed-on: https://skia-review.googlesource.com/134610 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,fmalita@chromium.org Change-Id: I2c681ef5c8d5fc15508e58b4b0f6ab9491b7d76f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/134880 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skjson] Implementation/API tweaksGravatar Florin Malita2018-06-14
| | | | | | | | | | | | | | | * move most common accessor methods to the header, for inlining * drop the lazy type checking semantics in favor of explicit guarded/unguarded conversions * revisit the public class hierarchy to better constrain type-bound APIs * expose public type factories and add tests * drop the empty-vector optimization -- allocating an external size_t in these uncommon cases is better than paying for a conditional on every access. Change-Id: I24a7c75db3aa8b12c740c77ac7df4af4e3a1dff8 Reviewed-on: https://skia-review.googlesource.com/134610 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@google.com>
* Revert "Revert "SkTypes: extract SkTo""Gravatar Hal Canary2018-06-14
| | | | | | | | | | | | | | | | This reverts commit fdcfb8b7c23fbf18f872d2c31d27978235033876. > Original change's description: > > SkTypes: extract SkTo > > > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > > Reviewed-on: https://skia-review.googlesource.com/133620 > > Reviewed-by: Mike Klein <mtklein@google.com> Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa Reviewed-on: https://skia-review.googlesource.com/134506 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkTypes: extract SkTo"Gravatar Hal Canary2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2a2f67592602b18527bc3fd449132d420cd5b62e. Reason for revert: this appears to be what is holding up the Chrome roll. Original change's description: > SkTypes: extract SkTo > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > Reviewed-on: https://skia-review.googlesource.com/133620 > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,halcanary@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae Reviewed-on: https://skia-review.googlesource.com/134504 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkTypes: extract SkToGravatar Hal Canary2018-06-12
| | | | | | Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 Reviewed-on: https://skia-review.googlesource.com/133620 Reviewed-by: Mike Klein <mtklein@google.com>
* Disable module deps in Android Framework buildsGravatar Florin Malita2018-06-11
| | | | | | | | | | | | | Module-related functionality is not required in dm/bench at this point. Let's disable module deps flattening for now. As an immediate benefit we can reduce the deps visibility for some internal skjson targets. Bug: skia:8061 Change-Id: I0e09208964ca94b519121207ba1b6225059ef573 Reviewed-on: https://skia-review.googlesource.com/133822 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* SkJsonGravatar Florin Malita2018-06-08
For now this is only wired to a bench and a couple of tests. Local numbers, for a ~500KB BM "compressed" json: micros bench 2456.54 json_rapidjson nonrendering 1192.38 json_skjson nonrendering Change-Id: I7b3514f84c7c525d1787722c43ad6095e3692563 Reviewed-on: https://skia-review.googlesource.com/127622 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>