aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/ok.h
Commit message (Collapse)AuthorAge
* 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, unify failure and crash loggingGravatar Mike Klein2017-03-28
| | | | | | | | | | Just as deferred and locked crash logging makes crashes easier to read, so does deferred and locked failure logging make failures easier to read. Change-Id: I71578d61b0056f8d7e692149762def1f155c0387 Reviewed-on: https://skia-review.googlesource.com/10280 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* ok: alias 565 -> sw:ct=565Gravatar Mike Klein2017-03-27
| | | | | | | | | | This is mostly a demo, and to make sure it's easy. If I'm thinking right, other non-ct options should Just Work. Change-Id: I295db0fa04921ccdd766e1870e367594ca802462 Reviewed-on: https://skia-review.googlesource.com/10190 Reviewed-by: Brian Salomon <bsalomon@google.com> 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>
* Spin off non-core parts of ok into their own files.Gravatar Mike Klein2017-03-25
Now ok.cpp handles only the high level coordination of Srcs and Dsts, without having to know or care what they are. Some minor refactoring to things like Options. Change-Id: I02df890b26d6d069e980a125b6a1ce1a7067b900 Reviewed-on: https://skia-review.googlesource.com/10173 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>