Commit Graph

8 Commits

Author SHA1 Message Date
Mike Klein
9a3478bf82 ok, add a8 dst support
Change-Id: Ib7f855c833c8e73f448de7c8a75f59b1a0880874
Reviewed-on: https://skia-review.googlesource.com/53600
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-29 20:08:34 +00:00
Mike Klein
a611be86f0 ok: add 8888 and rp dsts
8888 is just a friendly alias for sw.
rp is the same, but forcing SkRasterPipelineBlitter.

Change-Id: Ie7a809643f21f49d6c696d4a4eac0e1deee7eaf8
Reviewed-on: https://skia-review.googlesource.com/19620
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-13 14:25:41 +00:00
Mike Klein
16a6144dfd ok, add sRGB support
Change-Id: Ic375a593bcf67aad0d7bd0847ea6bcd0b9ac4ab6
Reviewed-on: https://skia-review.googlesource.com/15160
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-03 01:40:35 +00:00
Mike Klein
e15a7b528e ok, most features can be vias
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>
2017-03-31 03:03:18 +00:00
Mike Klein
88f9c1eff9 ok: alias 565 -> sw:ct=565
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>
2017-03-27 17:24:35 +00:00
Mike Klein
0222e709a3 ok: refactor Src/Dst interactions
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>
2017-03-25 20:43:01 +00:00
Mike Klein
f5d1a5567e ok: basic Vias
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>
2017-03-25 17:32:20 +00:00
Mike Klein
7ac04838c5 Spin off non-core parts of ok into their own files.
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>
2017-03-25 16:13:20 +00:00