History log of /external/skia/src/core/SkMultiPictureDraw.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5df4934b3e40cdc378e225d1dda39f015cae9bae 12-Nov-2016 Mike Reed <reed@google.com> Revert[2] "Change SkCanvas to *not* inherit from SkRefCnt"

Changes over original:
- conditionalize ownership in SkPictureRecorder
- conditionalize ownership in SkCanvasStateUtils

This reverts commit b613c266df48cf45296ecc23d1bd7098c84bb7ba.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4742

Change-Id: Ib25514d6f546c69b6650b5c957403b04f7380dc2
Reviewed-on: https://skia-review.googlesource.com/4742
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/core/SkMultiPictureDraw.cpp
b613c266df48cf45296ecc23d1bd7098c84bb7ba 10-Nov-2016 Heather Miller <hcm@google.com> Revert "Change SkCanvas to *not* inherit from SkRefCnt"

This reverts commit 824075071885b6b741c141cbe2134d8345d34589.

Reason for revert: Breaking WebView (chromium:663959)

Original change's description:
> Change SkCanvas to *not* inherit from SkRefCnt
>
> Definitely tricky for classes like SkNWayCanvas, where the caller (today)
> need not pay attention to ownership of the canvases it gave the NWay
> (after this CL, the caller *must* managed ownership)
>
> BUG=skia:
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4441
>
> DOCS_PREVIEW= https://skia.org/?cl=4441
>
> Change-Id: Ib1ac07a3cdf0686d78e7aaa4735d45cc90bea081
> Reviewed-on: https://skia-review.googlesource.com/4441
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
>

TBR=djsollen@google.com,mtklein@google.com,halcanary@google.com,robertphillips@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I5e3b3e876b7d2c09833cf841801321033b6b968b
Reviewed-on: https://skia-review.googlesource.com/4687
Commit-Queue: Heather Miller <hcm@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
/external/skia/src/core/SkMultiPictureDraw.cpp
824075071885b6b741c141cbe2134d8345d34589 09-Nov-2016 Mike Reed <reed@google.com> Change SkCanvas to *not* inherit from SkRefCnt

Definitely tricky for classes like SkNWayCanvas, where the caller (today)
need not pay attention to ownership of the canvases it gave the NWay
(after this CL, the caller *must* managed ownership)

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4441

DOCS_PREVIEW= https://skia.org/?cl=4441

Change-Id: Ib1ac07a3cdf0686d78e7aaa4735d45cc90bea081
Reviewed-on: https://skia-review.googlesource.com/4441
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
/external/skia/src/core/SkMultiPictureDraw.cpp
dda54455a20dcd89de610bdb80e4a8e9137b80a4 13-Jul-2016 robertphillips <robertphillips@google.com> Remove GrLayerHoister

This relies on https://codereview.chromium.org/1944013002/ (Add legacy flag to allow Skia to remove Ganesh layer hoister) landing first so as to not break the DEPS roll.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1950523002

Review-Url: https://codereview.chromium.org/1950523002
/external/skia/src/core/SkMultiPictureDraw.cpp
74e9a4dcd3772fccfc26b148e43cfcf4e084093f 09-May-2016 robertphillips <robertphillips@google.com> Reland of Disable layer hoisting for non-8888 canvases (patchset #1 id:1 of https://codereview.chromium.org/1961483002/ )

Reason for revert:
This CL was not the culprit in the perf regression.

Original issue's description:
> Revert of Disable layer hoisting for non-8888 canvases (patchset #2 id:20001 of https://codereview.chromium.org/1957433002/ )
>
> Reason for revert:
> Experimental revert to investigate perf regression
>
> Original issue's description:
> > Disable layer hoisting for non-8888 canvases
> >
> > This just stops the bleeding. A real fix would propagate the canvas' backing type down to the layer hoister.
> >
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957433002
> >
> > Committed: https://skia.googlesource.com/skia/+/4e30f27164179d344f0c8efa9a691d1bc9a53e3f
>
> TBR=bsalomon@google.com
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/6b53b9daeb2137a91d8ddb8e890d66c702bfbaa3

TBR=bsalomon@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.

Review-Url: https://codereview.chromium.org/1962603002
/external/skia/src/core/SkMultiPictureDraw.cpp
6b53b9daeb2137a91d8ddb8e890d66c702bfbaa3 06-May-2016 robertphillips <robertphillips@google.com> Revert of Disable layer hoisting for non-8888 canvases (patchset #2 id:20001 of https://codereview.chromium.org/1957433002/ )

Reason for revert:
Experimental revert to investigate perf regression

Original issue's description:
> Disable layer hoisting for non-8888 canvases
>
> This just stops the bleeding. A real fix would propagate the canvas' backing type down to the layer hoister.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957433002
>
> Committed: https://skia.googlesource.com/skia/+/4e30f27164179d344f0c8efa9a691d1bc9a53e3f

TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/1961483002
/external/skia/src/core/SkMultiPictureDraw.cpp
4e30f27164179d344f0c8efa9a691d1bc9a53e3f 05-May-2016 robertphillips <robertphillips@google.com> Disable layer hoisting for non-8888 canvases

This just stops the bleeding. A real fix would propagate the canvas' backing type down to the layer hoister.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957433002

Review-Url: https://codereview.chromium.org/1957433002
/external/skia/src/core/SkMultiPictureDraw.cpp
175dd9b5e3d7d749738dac743d2ac360b5340187 28-Apr-2016 robertphillips <robertphillips@google.com> Clean up test drawContext usage

The general idea is to provide access to SkGpuDevice's drawContext rather than its GrRenderTarget. That is usually what the testing framework actually wants.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1930623003

Review-Url: https://codereview.chromium.org/1930623003
/external/skia/src/core/SkMultiPictureDraw.cpp
9d524f22bfde5dc3dc8f48e1be39bdebd3bb0304 29-Mar-2016 halcanary <halcanary@google.com> Style bikeshed - remove extraneous whitespace

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002

Review URL: https://codereview.chromium.org/1842753002
/external/skia/src/core/SkMultiPictureDraw.cpp
279c7864090a7b96c34c3594e38ced35967c673f 05-Jan-2016 mtklein <mtklein@chromium.org> If we swap its arguments, SkTaskGroup::batch() _is_ sk_parallel_for.

Why have two names if we can get away with one?

This kills off sk_parallel_for_thread_count(), which was only used to avoid forcing a deadlock in OncePtrTest on multicore machines in singlethreaded mode... a really niche use case. Instead just don't explicitly force a race.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1552093002

Review URL: https://codereview.chromium.org/1552093002
/external/skia/src/core/SkMultiPictureDraw.cpp
60029a5397f75aae4bdb994f26bd297edc3e433c 09-Nov-2015 robertphillips <robertphillips@google.com> Update Layer Hoisting to store its atlas texture in the resource cache

BUG=skia:4346

Committed: https://skia.googlesource.com/skia/+/42597bc99f00553825843b5ed41e81b121773368

Review URL: https://codereview.chromium.org/1406013006
/external/skia/src/core/SkMultiPictureDraw.cpp
cf1d19805a289c612532cf2d4505bb348b78ba77 06-Nov-2015 robertphillips <robertphillips@google.com> Revert of Update Layer Hoisting to store its atlas texture in the resource cache (patchset #6 id:100001 of https://codereview.chromium.org/1406013006/ )

Reason for revert:
Android

Original issue's description:
> Update Layer Hoisting to store its atlas texture in the resource cache
>
> BUG=skia:4346
>
> Committed: https://skia.googlesource.com/skia/+/42597bc99f00553825843b5ed41e81b121773368

TBR=bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4346

Review URL: https://codereview.chromium.org/1413483004
/external/skia/src/core/SkMultiPictureDraw.cpp
42597bc99f00553825843b5ed41e81b121773368 06-Nov-2015 robertphillips <robertphillips@google.com> Update Layer Hoisting to store its atlas texture in the resource cache

BUG=skia:4346

Review URL: https://codereview.chromium.org/1406013006
/external/skia/src/core/SkMultiPictureDraw.cpp
96fcdcc219d2a0d3579719b84b28bede76efba64 27-Aug-2015 halcanary <halcanary@google.com> Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
/external/skia/src/core/SkMultiPictureDraw.cpp
385fe4d4b62d7d1dd76116dd570df3290a2f487b 26-Aug-2015 halcanary <halcanary@google.com> Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003

Review URL: https://codereview.chromium.org/1316123003
/external/skia/src/core/SkMultiPictureDraw.cpp
00b621cfc0dac2a0028757a974de33a78bb8579d 18-Jun-2015 mtklein <mtklein@chromium.org> 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
/external/skia/src/core/SkMultiPictureDraw.cpp
dded69693dd3779f081326cde24c3954505b129d 12-Jun-2015 vbuzinov <vbuzinov@nvidia.com> Implement support for mixed sampled render targets

Adds a new FBO type kStencil_MSFBOType that is selected whenever
NV_framebuffer_mixed_samples extension is available. In this new
FBO type a non-msaa color buffer is created with a multisampled
stencil buffer attachment.

Replaces numSamples() with separate numColorSamples and numStencilSamples
methods in RenderTarget.

In mixed samples mode non-MSAA codepaths are used to draw simple shapes,
while NVPR-rendered paths and text are rendered with a multisampled
stencil.

BUG=skia:3177

Review URL: https://codereview.chromium.org/1001503002
/external/skia/src/core/SkMultiPictureDraw.cpp
772604c214e8c12ee16d2eb60f4b7acbcdd2129e 28-Jan-2015 senorblanco <senorblanco@chromium.org> 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
/external/skia/src/core/SkMultiPictureDraw.cpp
b4f629cd688b680eba21a5a08daeaf82bbe65b28 25-Dec-2014 reed <reed@chromium.org> fix images in multi-thread by doing shallow-copies

BUG=skia:
TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/791473006
/external/skia/src/core/SkMultiPictureDraw.cpp
e99d499caa7dbc80b58e0faf5ce137e7d30cc5d0 03-Dec-2014 robertphillips <robertphillips@google.com> Fuse GrReplacements and GrLayerCache

The conversion step from GrCachedLayer to ReplacementInfo isn't necessary.

Review URL: https://codereview.chromium.org/769533004
/external/skia/src/core/SkMultiPictureDraw.cpp
01d6e5f462d1d52203ee1a6660415877e4cf2dde 01-Dec-2014 robertphillips <robertphillips@google.com> Use variable length key (rather than accumulated matrix) as save layer hoisting key

Adding the rendering canvas' CTM to the layer hoisting key (i.e., Add support for hoisting layers in pictures drawn with a matrix - https://codereview.chromium.org/748853002/) has increased the cache miss rate due to accumulated floating point error. This CL fixes part of the issue by using the chain of operation indices leading to each saveLayer as the key. The canvas' CTM must still form part of the key but should be less subject to accumulated error.

BUG=skia:2315

Review URL: https://codereview.chromium.org/753253002
/external/skia/src/core/SkMultiPictureDraw.cpp
30d7841f906116c3945ec8125a816a5c5462fed0 24-Nov-2014 robertphillips <robertphillips@google.com> Add support for hoisting layers in pictures drawn with a matrix

Although Chromium doesn't use the drawPicture matrix parameter for their tiling, our local code does. Without such drawPicture calls break layer hoisting.

BUG=skia:2315

Review URL: https://codereview.chromium.org/748853002
/external/skia/src/core/SkMultiPictureDraw.cpp
81f71b6630a9b7398bf983689436cccdd8dd3ff7 11-Nov-2014 robertphillips <robertphillips@google.com> Change where layer hoisting data is gathered

This CL:
1) removes the EXPERIMENTAL_optimize on SkCanvas & SkDevice
2) moves the saveLayer gathering step to endRecording
3) Replaces GPUOptimize with SkRecordComputeLayers
4) Update bench_pictures & render_pictures to provide the new flag

#2 also necessitated moving the BBH computation (and record optimization) out of SkPicture's ctor (and into endRecording)

Review URL: https://codereview.chromium.org/718443002
/external/skia/src/core/SkMultiPictureDraw.cpp
a63f32e879a67c84f820c32ac2b10ffd7b2940b8 10-Nov-2014 robertphillips <robertphillips@google.com> Address MSAA rendering in layer hoisting

This became relevant whilst attempting to rebaseline the multipicturedraw GMs after turning on layer hoisting inside Skia.

Review URL: https://codereview.chromium.org/709943003
/external/skia/src/core/SkMultiPictureDraw.cpp
ccae588932ac7966948ae9291f496fdb04901985 04-Nov-2014 scroggo <scroggo@google.com> Include SkTypes so that SK_SUPPORT_GPU is meaningful.

For the Android framework build, we get our defines from
SkUserConfig, rather than from the makefile, so we need to
include it (via SkTypes) before we can use our defines.

Fixes Android framework build.

Review URL: https://codereview.chromium.org/700893002
/external/skia/src/core/SkMultiPictureDraw.cpp
ecf987559b1db0cb3fcaccdde2a065e4391d9b60 04-Nov-2014 mtklein <mtklein@chromium.org> Turn SkTaskGroups back on.

Revert "Disable SkTaskGroup in SkMultiPictureDraw temporarily."
Revert "Revert harder, removing SkTaskGroup.cpp from core temporarily."

NOTREECHECKS=true

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/2100c5ed7a5e5470a04e7af7309d8bd3fc4249f7

Review URL: https://codereview.chromium.org/687263007
/external/skia/src/core/SkMultiPictureDraw.cpp
66cad7669be6c47768d084090a3d498014dfc847 03-Nov-2014 robertphillips <robertphillips@google.com> Always enable layer hoisting in Skia

This will prevent bit rot of the layer hoisting code and position us better for turning this on in Chromium.

Review URL: https://codereview.chromium.org/698493002
/external/skia/src/core/SkMultiPictureDraw.cpp
e9f7fbfaeed73e36b1b6d0d55dbb2ad4f121e1b7 31-Oct-2014 mtklein <mtklein@google.com> Revert of Turn SkTaskGroups back on. (patchset #1 id:1 of https://codereview.chromium.org/687263007/)

Reason for revert:
precautionary revert. may have caused WinXP crashes on Chrome tree: https://code.google.com/p/chromium/issues/detail?id=429207

Original issue's description:
> Turn SkTaskGroups back on.
>
> Revert "Disable SkTaskGroup in SkMultiPictureDraw temporarily."
> Revert "Revert harder, removing SkTaskGroup.cpp from core temporarily."
>
> NOTREECHECKS=true
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2100c5ed7a5e5470a04e7af7309d8bd3fc4249f7

TBR=reed@google.com,mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/693993002
/external/skia/src/core/SkMultiPictureDraw.cpp
2100c5ed7a5e5470a04e7af7309d8bd3fc4249f7 31-Oct-2014 mtklein <mtklein@chromium.org> Turn SkTaskGroups back on.

Revert "Disable SkTaskGroup in SkMultiPictureDraw temporarily."
Revert "Revert harder, removing SkTaskGroup.cpp from core temporarily."

NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/687263007
/external/skia/src/core/SkMultiPictureDraw.cpp
189fc98e08d3a955ee4d8a9d47475a21d9ab3a8f 30-Oct-2014 robertphillips <robertphillips@google.com> Fix member variable naming

This renaming was missed in (MultiPictureDraw is taskgroup aware - https://codereview.chromium.org/684923002)

TBR=reed@google.com

Review URL: https://codereview.chromium.org/654293005
/external/skia/src/core/SkMultiPictureDraw.cpp
7f36ae1314451bf72d0d1fd6ea9d0ba68564fddf 30-Oct-2014 mtklein <mtklein@chromium.org> Disable SkTaskGroup in SkMultiPictureDraw temporarily.

Think this should be enough to get rolling again.

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/687273006
/external/skia/src/core/SkMultiPictureDraw.cpp
67c71203a4e2e4f4be0a4e2293bec3a1bc1b07c8 29-Oct-2014 reed <reed@google.com> use SkTaskGroup::batch

BUG=skia:

Review URL: https://codereview.chromium.org/688753002
/external/skia/src/core/SkMultiPictureDraw.cpp
e71cd54ed4d83310d718490d40643c35b622b9f5 29-Oct-2014 mtklein <mtklein@chromium.org> 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
/external/skia/src/core/SkMultiPictureDraw.cpp
4ab5a9048cf327adfc9ef9757ea956d7003ba047 29-Oct-2014 robertphillips <robertphillips@google.com> Discard atlas after every MultiPictureDraw::draw

This is intended to prevent ghosting on tiled architectures.

This CL also defers creation of the atlas (and its texture) until it is actually needed.

Committed: https://skia.googlesource.com/skia/+/6d5b5455743414ddb11d2b8c1fe9d7959f2b853d

Review URL: https://codereview.chromium.org/678403002
/external/skia/src/core/SkMultiPictureDraw.cpp
89889b69391a730f0ba2a1efb549864b7762263f 29-Oct-2014 reed <reed@google.com> MultiPictureDraw is taskgroup aware.
SampleApp is multipicturedraw aware.

BUG=skia:

Review URL: https://codereview.chromium.org/684923002
/external/skia/src/core/SkMultiPictureDraw.cpp
9f36b8719b5fab2e3d7f25c5299438f954d06052 29-Oct-2014 robertphillips <robertphillips@google.com> Revert of Discard atlas after every MultiPictureDraw::draw (patchset #4 id:60001 of https://codereview.chromium.org/678403002/)

Reason for revert:
Breaking bots

Original issue's description:
> Discard atlas after every MultiPictureDraw::draw
>
> This is intended to prevent ghosting on tiled architectures.
>
> This CL also defers creation of the atlas (and its texture) until it is actually needed.
>
> Committed: https://skia.googlesource.com/skia/+/6d5b5455743414ddb11d2b8c1fe9d7959f2b853d

TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/687233002
/external/skia/src/core/SkMultiPictureDraw.cpp
6d5b5455743414ddb11d2b8c1fe9d7959f2b853d 29-Oct-2014 robertphillips <robertphillips@google.com> Discard atlas after every MultiPictureDraw::draw

This is intended to prevent ghosting on tiled architectures.

This CL also defers creation of the atlas (and its texture) until it is actually needed.

Review URL: https://codereview.chromium.org/678403002
/external/skia/src/core/SkMultiPictureDraw.cpp
fd61ed0d7929cf85e0b936f48c72035af4c0a4b3 28-Oct-2014 robertphillips <robertphillips@google.com> Alter layer hoisting to only hoist layers for one canvas at a time

This CL alters layer hoisting to defer creation of the free floating layers until they are actually needed (rather than creating _all_ the hoisted layers at the start).

It also fixes a pre vs. post Concat bug with how matrices were being accumulated.

BUG=skia:2315

Review URL: https://codereview.chromium.org/657383004
/external/skia/src/core/SkMultiPictureDraw.cpp
d61ef01f176328619d29045da3ec72e4732276b6 08-Oct-2014 robertphillips <robertphillips@google.com> Expose layer hoisting API in GrContext

This CL exposes the layer hoisting API in GrContext for use in SkMultiPictureDraw::draw. It basically mirrors what SkGpuDevice::EXPERIMENTAL_drawPicture has been doing.

Review URL: https://codereview.chromium.org/533673002
/external/skia/src/core/SkMultiPictureDraw.cpp
49f085dddff10473b6ebf832a974288300224e60 05-Sep-2014 bsalomon <bsalomon@google.com> "NULL !=" = NULL

R=reed@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/544233002
/external/skia/src/core/SkMultiPictureDraw.cpp
7eacd77ce63abec6c5a0e7be9bf9f40ea4145d11 21-Aug-2014 robertphillips <robertphillips@google.com> 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
/external/skia/src/core/SkMultiPictureDraw.cpp