Commit Graph

6 Commits

Author SHA1 Message Date
bungeman
a7e9f05119 Move SkTDArray to private.
TBR=reed
Moving to private is good.

Review URL: https://codereview.chromium.org/1707213002
2016-02-18 08:53:33 -08:00
mtklein
00b621cfc0 Add sk_parallel_for()
This should be a drop-in replacement for most for-loops to make them run in parallel:
   for (int i = 0; i < N; i++) { code... }
   ~~~>
   sk_parallel_for(N, [&](int i) { code... });

This is just syntax sugar over SkTaskGroup to make this use case really easy to write.
There's no more overhead that we weren't already forced to add using an interface like batch(),
and no extra heap allocations.

I've replaced 3 uses of SkTaskGroup with sk_parallel_for:
  1) My unit tests for SkOnce.
  2) Cary's path fuzzer.
  3) SkMultiPictureDraw.
Performance should be the same.  Please compare left and right for readability. :)

BUG=skia:

No public API changes.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1184373003
2015-06-17 15:26:15 -07:00
senorblanco
772604c214 Add a flag to flush the canvases during SkMultiPictureDraw::draw().
This is necessary for multisampling, so that each multisampled render
target resolves before Chrome's compositor attempts to draw the
texture.

BUG=skia:

Review URL: https://codereview.chromium.org/878653004
2015-01-28 11:01:06 -08:00
mtklein
e71cd54ed4 SkTaskGroup::batch(fn, args, N)
Porting QuiltTask isn't important in itself; this is mostly an API feeler.

BUG=skia:

Review URL: https://codereview.chromium.org/689673003
2014-10-29 14:17:13 -07:00
reed
89889b6939 MultiPictureDraw is taskgroup aware.
SampleApp is multipicturedraw aware.

BUG=skia:

Review URL: https://codereview.chromium.org/684923002
2014-10-29 12:36:45 -07:00
robertphillips
7eacd77ce6 SkMultiPictureDraw API
This CL adds a new API to optimize across multiple SkPicture draw calls.

Note that multiple pictures rendered at once (i.e., picture piles) should be flattened into a single new picture that includes the required clipping on the different layers.

R=bsalomon@google.com, reed@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/491313003
2014-08-21 13:12:42 -07:00