aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/skjson/include
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] 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>
* 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>