Commit Graph

23 Commits

Author SHA1 Message Date
mtklein
d603b22903 Suggested version with 'undo'.
BUG=skia:

Review URL: https://codereview.chromium.org/931483002
2015-02-17 11:13:33 -08:00
mtklein
ad66f9b15f DM: don't leak the null canvas in NullSink.
Also make NullSink a real boy: declared among the other Sinks, impl in .cpp.

BUG=skia:

Review URL: https://codereview.chromium.org/922293003
2015-02-13 15:11:10 -08:00
fmalita
2aafe6f427 Add SkSVGCanvas
Add a public SVG canvas factory + move the SVG files from
experimental -> src/svg/.

Update current clients to the new API.

R=reed@google.com, mtklein@google.com, halcanary@google.com

Review URL: https://codereview.chromium.org/902583006
2015-02-06 12:51:10 -08:00
mtklein
b9eb4ac0f1 patch from issue 886233004 at patchset 40001 (http://crrev.com/886233004#ps40001)
... with changes proposed in the review.

BUG=skia:

Review URL: https://codereview.chromium.org/894013002
2015-02-02 18:26:03 -08:00
mtklein
8a4527e98a SVG backend in DM
Not enabled by default, but this should get you SKPs, GMs etc for free to play with.

$ out/Debug/dm -w svgs --src gm skp --config svg

BUG=skia:

Review URL: https://codereview.chromium.org/892693002
2015-01-31 20:00:58 -08:00
mtklein
edc93bc740 Suggestions and merge in the other CL.
I had some suggestions on the subset CL, and took the opportunity to rebase it
against head and merge in the other color type CL.

BUG=skia:

Review URL: https://codereview.chromium.org/893703002
2015-01-30 13:22:23 -08:00
mtklein
8d17a13a71 DM: paths as implict strings too.
BUG=skia:

Review URL: https://codereview.chromium.org/891823002
2015-01-30 11:42:31 -08:00
mtklein
f4ba3219c2 Revert of DM::SKPSrc::size() reports correct size. (patchset #3 id:40001 of https://codereview.chromium.org/863243005/)
Reason for revert:
Still no good on Chrome OS bot:

http://build.chromium.org/p/client.skia/builders/Test-ChromeOS-Alex-GMA3150-x86-Release/builds/628/steps/dm/logs/stdio

Original issue's description:
> DM::SKPSrc::size() reports correct size.
>
> Also, DM::GPUSink and DM::RasterSink crop DM::Src::size() to 2048x2048.
>
> Motivation:
>   Improve PDF testing by printing the entire SKP.
>
> Source: http://crrev.com/863243004
>
> BUG=skia:3365
>
> Committed: https://skia.googlesource.com/skia/+/441b10eac09a1f44983e35da827a6b438a409e63
>
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu12-ShuttleA-GTX660-x86-Release-Trybot,Test-ChromeOS-Alex-GMA3150-x86-Release-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/d4dd58e43ca4551531ad6a9f54bfc5632ea45a80

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

Review URL: https://codereview.chromium.org/886543005
2015-01-28 15:32:24 -08:00
mtklein
d4dd58e43c DM::SKPSrc::size() reports correct size.
Also, DM::GPUSink and DM::RasterSink crop DM::Src::size() to 2048x2048.

Motivation:
  Improve PDF testing by printing the entire SKP.

Source: http://crrev.com/863243004

BUG=skia:3365

Committed: https://skia.googlesource.com/skia/+/441b10eac09a1f44983e35da827a6b438a409e63

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu12-ShuttleA-GTX660-x86-Release-Trybot

Review URL: https://codereview.chromium.org/863243005
2015-01-28 13:59:42 -08:00
mtklein
52f401ee7b Revert of DM::SKPSrc::size() reports correct size. (patchset #1 id:1 of https://codereview.chromium.org/863243005/)
Reason for revert:
OOM on 32-bit machines.

Original issue's description:
> DM::SKPSrc::size() reports correct size.
>
> Also, DM::GPUSink and DM::RasterSink crop DM::Src::size() to 2048x2048.
>
> Motivation:
>   Improve PDF testing by printing the entire SKP.
>
> Source: http://crrev.com/863243004
>
> BUG=skia:3365
>
> Committed: https://skia.googlesource.com/skia/+/441b10eac09a1f44983e35da827a6b438a409e63

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

Review URL: https://codereview.chromium.org/884743003
2015-01-28 12:04:08 -08:00
halcanary
fd4a993f8b DM::PDFSink::draw excercises multi-page pdf
BUG=skia:3365

Review URL: https://codereview.chromium.org/881343002
2015-01-28 11:45:58 -08:00
mtklein
9c3f17d6e8 Fold gmtoskp into DM, as --src gm --config skp.
BUG=skia:

Review URL: https://codereview.chromium.org/885733002
2015-01-28 11:35:18 -08:00
mtklein
441b10eac0 DM::SKPSrc::size() reports correct size.
Also, DM::GPUSink and DM::RasterSink crop DM::Src::size() to 2048x2048.

Motivation:
  Improve PDF testing by printing the entire SKP.

Source: http://crrev.com/863243004

BUG=skia:3365

Review URL: https://codereview.chromium.org/863243005
2015-01-28 11:12:25 -08:00
mtklein
55e88b226c More natural way to serialize GPU tasks and tests.
This basically takes out the Windows-only hacks and promotes them to
cross-platform behavior driven by --gpu_threading.
    - When --gpu_threading is false (the default), this puts GPU tasks and tests
      together in the same GPU enclave.  They all run serially.
    - When --gpu_threading is true, both the tests and the tasks run totally
      independently, just like the thread-safe CPU-bound work.

BUG=skia:3255

Review URL: https://codereview.chromium.org/847273005
2015-01-21 15:50:13 -08:00
mtklein
968f18cba5 Easy DM TODO: LazyDecodeBitmap does not help (or hinder).
BUG=skia:3255

Review URL: https://codereview.chromium.org/859303003
2015-01-21 13:48:57 -08:00
mtklein
7edca21226 Don't test pipe modes nobody uses.
SkDeferredCanvas uses a simple pipe: no cross-process, no shared-address, etc.
(see src/utils/SkDeferredCanvas.cpp:306).

We could just remove these modes from the bot configs, but I'd like to take the
opportunity to simplify the DM code too.  I'll happily volunteer to put things
back should we decide we want to test these modes.

BUG=skia:

Review URL: https://codereview.chromium.org/861303003
2015-01-21 13:18:51 -08:00
scroggo
a1193e4b0e Make SkStream *not* ref counted.
SkStream is a stateful object, so it does not make sense for it to have
multiple owners. Make SkStream inherit directly from SkNoncopyable.

Update methods which previously called SkStream::ref() (e.g.
SkImageDecoder::buildTileIndex() and SkFrontBufferedStream::Create(),
which required the existing owners to call SkStream::unref()) to take
ownership of their SkStream parameters and delete when done (including
on failure).

Switch all SkAutoTUnref<SkStream>s to SkAutoTDelete<SkStream>s. In some
cases this means heap allocating streams that were previously stack
allocated.

Respect ownership rules of SkTypeface::CreateFromStream() and
SkImageDecoder::buildTileIndex().

Update the comments for exceptional methods which do not affect the
ownership of their SkStream parameters (e.g.
SkPicture::CreateFromStream() and SkTypeface::Deserialize()) to be
explicit about ownership.

Remove test_stream_life, which tested that buildTileIndex() behaved
correctly when SkStream was a ref counted object. The test does not
make sense now that it is not.

In SkPDFStream, remove the SkMemoryStream member. Instead of using it,
create a new SkMemoryStream to pass to fDataStream (which is now an
SkAutoTDelete).

Make other pdf rasterizers behave like SkPDFDocumentToBitmap.

SkPDFDocumentToBitmap delete the SkStream, so do the same in the
following pdf rasterizers:

SkPopplerRasterizePDF
SkNativeRasterizePDF
SkNoRasterizePDF

Requires a change to Android, which currently treats SkStreams as ref
counted objects.

Review URL: https://codereview.chromium.org/849103004
2015-01-21 12:09:53 -08:00
mtklein
9264a95608 Image subsets as part of the name instead of a separate source type.
This will hold us closer to the principle that the test name (and only the test
name) should correspond to expected output.  By the same reasoning, mix in the
number of subsets: if that changes, the expected output also changes.

BUG=skia:3255

Review URL: https://codereview.chromium.org/863723002
2015-01-20 10:11:53 -08:00
mtklein
75d98fd6f2 DM: Don't hold onto data longer than needed.
On my laptop, this cuts peak memory usage by more than half.

BUG=skia:3255

Review URL: https://codereview.chromium.org/859623002
2015-01-18 07:05:01 -08:00
mtklein
82d2843cc5 turn back on gpu tests
NOTREECHECKS=true

BUG=skia:3255

Review URL: https://codereview.chromium.org/817573004
2015-01-15 12:46:02 -08:00
mtklein
748ca3bf2d Sketch DM refactor.
BUG=skia:3255

I think this supports everything DM used to, but has completely refactored how
it works to fit the design in the bug.

Configs like "tiles-gpu" are automatically wired up.

I wouldn't suggest looking at this as a diff.  There's just a bunch of deleted
files, a few new files, and one new file that shares a name with a deleted file
(DM.cpp).

NOTREECHECKS=true

Committed: https://skia.googlesource.com/skia/+/709d2c3e5062c5b57f91273bfc11a751f5b2bb88

Review URL: https://codereview.chromium.org/788243008
2015-01-15 10:56:12 -08:00
mtklein
114c3cd054 Revert of Sketch DM refactor. (patchset #45 id:850001 of https://codereview.chromium.org/788243008/)
Reason for revert:
plenty of data

Original issue's description:
> Sketch DM refactor.
>
> BUG=skia:3255
>
>
> I think this supports everything DM used to, but has completely refactored how
> it works to fit the design in the bug.
>
> Configs like "tiles-gpu" are automatically wired up.
>
> I wouldn't suggest looking at this as a diff.  There's just a bunch of deleted
> files, a few new files, and one new file that shares a name with a deleted file
> (DM.cpp).
>
> NOTREECHECKS=true
>
> Committed: https://skia.googlesource.com/skia/+/709d2c3e5062c5b57f91273bfc11a751f5b2bb88

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

Review URL: https://codereview.chromium.org/853883004
2015-01-15 10:15:02 -08:00
mtklein
709d2c3e50 Sketch DM refactor.
BUG=skia:3255

I think this supports everything DM used to, but has completely refactored how
it works to fit the design in the bug.

Configs like "tiles-gpu" are automatically wired up.

I wouldn't suggest looking at this as a diff.  There's just a bunch of deleted
files, a few new files, and one new file that shares a name with a deleted file
(DM.cpp).

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/788243008
2015-01-15 08:30:25 -08:00