aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/ok_vias.cpp
Commit message (Collapse)AuthorAge
* add memory via to okGravatar Mike Klein2017-06-19
| | | | | | | | | | | | Just like the time via, but instead of printing how long the thing took to run it prints how much memory was used by the process at peak. When ok runs in (default) process-per-task mode, this is quite handy. Change-Id: I331d446e39363a44c545278d7153fa7548e2add0 Reviewed-on: https://skia-review.googlesource.com/20261 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* ok, fix typo: struct -> staticGravatar Mike Klein2017-05-09
| | | | | | | | Change-Id: I2b26ccd017d9e66ced41a1af04929e2d83a5a2d5 Reviewed-on: https://skia-review.googlesource.com/16343 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* ok, add timer viaGravatar Mike Klein2017-05-09
| | | | | | | Change-Id: I3d25a2aa9ae6dacb52779142cea062c7d9df40f5 Reviewed-on: https://skia-review.googlesource.com/16238 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* port ok to SkPngEncoderGravatar Mike Klein2017-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I can't tell you how excited I am to turn down the libpng settings... anything that saves me a few seconds is a nice quality of life win. This CL makes ok run in about half the time when producing .pngs. Profile running `ok gm srgb png` before: 10.59 s 16.5% 10.59 s longest_match 8.98 s 14.0% 8.98 s png_setup_paeth_row 8.93 s 13.9% 8.93 s skia_png_write_find_filter 7.75 s 12.1% 7.75 s deflate_slow 4.63 s 7.2% 4.63 s std::wait_until(...) const 959.00 ms 1.5% 959.00 ms SkPathRef::validate() const 935.00 ms 1.4% 935.00 ms sk_to_srgb_hsw ... After: 2.35 s 8.7% 2.35 s std::wait_until(...) const 1.70 s 6.2% 1.70 s longest_match 1.19 s 4.4% 1.19 s deflate_fast 931.00 ms 3.4% 931.00 ms SkPathRef::validate() const 898.00 ms 3.3% 898.00 ms sk_to_srgb_hsw ... Change-Id: I425c30b2ecd97a0e4a4392779de6301db473ee47 Reviewed-on: https://skia-review.googlesource.com/15547 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com>
* Revert "Revert "Reland: Remove SkLights include from SkCanvas.h""Gravatar Florin Malita2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9d5f66d9c21eda7d3e2ed47654180c0c4b6e38b1. Reason for revert: Leon landed Android fixes. Original change's description: > Revert "Reland: Remove SkLights include from SkCanvas.h" > > This reverts commit fed00319c9bafa41c8df658708030c072b301a41. > > Reason for revert: breaking the Android roll. > > Original change's description: > > Reland: Remove SkLights include from SkCanvas.h > > > > SkLights.h pulls in a bunch of other headers and is not needed (fwdecl > > works fine). > > > > Change-Id: I3ed97cd7861e51dcb7cfa7950a97b420dbc6fbfb > > TBR=reed@google.com > > Reviewed-on: https://skia-review.googlesource.com/15143 > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > Reviewed-by: Florin Malita <fmalita@chromium.org> > > > > TBR=fmalita@chromium.org,reed@google.com > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I3b0e69f1d04d160f16a5567b09982d35cc9ca84e > Reviewed-on: https://skia-review.googlesource.com/15195 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=msarett@google.com,reviews@skia.org,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I0a1c2f9df61f16987ab72dfb4f3a205fbcc37667 Reviewed-on: https://skia-review.googlesource.com/15229 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Reland: Remove SkLights include from SkCanvas.h"Gravatar Florin Malita2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fed00319c9bafa41c8df658708030c072b301a41. Reason for revert: breaking the Android roll. Original change's description: > Reland: Remove SkLights include from SkCanvas.h > > SkLights.h pulls in a bunch of other headers and is not needed (fwdecl > works fine). > > Change-Id: I3ed97cd7861e51dcb7cfa7950a97b420dbc6fbfb > TBR=reed@google.com > Reviewed-on: https://skia-review.googlesource.com/15143 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Florin Malita <fmalita@chromium.org> > TBR=fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I3b0e69f1d04d160f16a5567b09982d35cc9ca84e Reviewed-on: https://skia-review.googlesource.com/15195 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Reland: Remove SkLights include from SkCanvas.hGravatar Florin Malita2017-05-03
| | | | | | | | | | | SkLights.h pulls in a bunch of other headers and is not needed (fwdecl works fine). Change-Id: I3ed97cd7861e51dcb7cfa7950a97b420dbc6fbfb TBR=reed@google.com Reviewed-on: https://skia-review.googlesource.com/15143 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert "Remove SkLights include from SkCanvas.h"Gravatar Florin Malita2017-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9ff301bf918cd85d9f67047f10631b7a74345a90. Reason for revert: need to update G3, Flutter. Original change's description: > Remove SkLights include from SkCanvas.h > > SkLights.h pulls in a bunch of other headers and is not needed (fwdecl > works fine). > > Change-Id: Id2d7176eb3bf4609f72f46d513eebf59318f542f > Reviewed-on: https://skia-review.googlesource.com/14904 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Florin Malita <fmalita@chromium.org> > TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I4799ad5b31aaeaf529c8b912bbe09aa8869a5e6c Reviewed-on: https://skia-review.googlesource.com/15107 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Remove SkLights include from SkCanvas.hGravatar Florin Malita2017-05-02
| | | | | | | | | | SkLights.h pulls in a bunch of other headers and is not needed (fwdecl works fine). Change-Id: Id2d7176eb3bf4609f72f46d513eebf59318f542f Reviewed-on: https://skia-review.googlesource.com/14904 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* ok, most features can be viasGravatar Mike Klein2017-03-31
| | | | | | | | | | | | | This refactors most features out of ok's core into vias: -w --> a .png dumping via, "png", opening the door to other types -m/-s --> a filtering via "filter" Everything now can print a brief help message too. Change-Id: I9e653aab98fd57182a6d458c7a80052130980284 Reviewed-on: https://skia-review.googlesource.com/10509 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* ok: refactor Src/Dst interactionsGravatar Mike Klein2017-03-25
| | | | | | | | | | | | | | | | | | | | | | | | This makes everything a lot more like DM, for the same reason: it's the best way to make Vias work. Instead of exposing a canvas, Dsts take a Src to draw. Vias still are Dsts that wrap Dsts. They do their internal work in draw() then pass a proxy Src encapsulating that work to the next Dst's draw(). A little refactoring in ok.cpp allows arbitrary chains of Vias. I removed the guarantee that Src methods are called in strict order. It's easy enough to make each Src initialize itself as needed. I moved the .png encoding back to ok.cpp. It seemed weird for Dsts to have to think about files and paths. One day Dst will want a data() method for non-image output (.pdf, .skp), and then we'll want ok.cpp to be the one to coordinate what to write where. Change-Id: Id4a3674b2d05aef2b5f10e0077df0a8407c07b61 Reviewed-on: https://skia-review.googlesource.com/10175 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* ok: basic ViasGravatar Mike Klein2017-03-25
Not sure if these simple Src/Dst interfaces will last. Vias are a little tricky, and some may be impossible. Change-Id: I42d19b1ee74b51a830bb781f25a888c0b32ba98c Reviewed-on: https://skia-review.googlesource.com/10174 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>