History log of /external/skia/dm/DM.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
95a7b76a44edd2f25423a4d395df553b80fe06d7 02-Mar-2018 Bryce Thomas <bryct@amazon.com> dm: support printing specific page of mskp to SVG

Currently with dm, it's possible to convert an .mskp to a multi-page PDF as
follows:

out/Release/dm --src mskp --mskps /tmp/filename.mskp -w /tmp \
--config pdf --verbose

The SVG equivalent partially works, although only outputs the first page:

out/Release/dm --src mskp --mskps /tmp/filename.mskp -w /tmp \
--config svg --verbose

This CL adds support for passing extended options to SVG. Specifically, the
'page' option , which now determines which page of the source mskp gets
converted to the SVG output. The new syntax is as follows:

out/Release/dm --src mskp --mskps /tmp/filename.mskp -w /tmp \
--config svg[page=2] --verbose

The `[key=value]` syntax is the same extended options syntax currently used by
dm with --config gpu, e.g. `gpu[api=gl,color=8888]`.

BUG=skia:7601

Change-Id: I3523d79b1cdbbba9e80fd46501331877091bdead
Reviewed-on: https://skia-review.googlesource.com/105404
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
b8b6253df6e60e5cce71ae584921bd9da35c1b93 23-Feb-2018 Yuqian Li <liyuqian@google.com> Add threaded backend sink to DM. Fix a scheduler bug.

The bug is spotted by the new sink. I'd expect more bugs to be revealed
and fixed using the new sink.

Bug: skia:
Change-Id: I6b0c9267079fbd6149004f0ecd55ddb179702588
Reviewed-on: https://skia-review.googlesource.com/109720
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/dm/DM.cpp
483c772cfdd646fad3ae8aa187136191ae3babdc 20-Feb-2018 Ben Wagner <bungeman@google.com> Add nativeFonts flag to Viewer.

This moves DMFontMgr and several related files which are tightly related
to fonts into tools/fonts, moves some flags around to prevent
duplication, and adds the nativeFonts handling to Viewer.

Change-Id: Id1bdad708a6b74319ac5ac9adfe21025db4ca0b2
Reviewed-on: https://skia-review.googlesource.com/108904
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
0c7861ff0c727160ab5306f531e94d40650d7466 16-Feb-2018 Dongwon Kang <dwkang@google.com> Start thread pool in skia_dm on Android.

Android media framework is expected to be run with the background
thread pool for handling binder RPC calls.

Test: skia_dm does not hang with heif files.
Bug: 65463215 Bug: 72869975
Change-Id: I2333d5a13d6145e9468464fa93807851e3a17bc8
Reviewed-on: https://skia-review.googlesource.com/108141
Reviewed-by: Chong Zhang <chz@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
/external/skia/dm/DM.cpp
c7278ad1d9cfc0495743fa1d626a64f6974dd80d 15-Feb-2018 Mike Klein <mtklein@chromium.org> register SIGTERM handler in DM

This should make it clear when we are terminated, and print out our
memory usage on the way out the door.

There's no way to register a handler for SIGKILL, so if we're being cut
down that way, we'll have to restructure DM quite a bit internally to
spawn processes instead of threads. The parent process should be able
to at least notice that child processes have been SIGKILL'd.

(This would be nice anyway, so one crash doesn't ruin our whole run.)

Here's a demo with a slightly hacked up DM to make the demo easy:

~/skia (sig↑1|✔) $ ninja -C out dm; and out/dm
ninja: Entering directory `out'
[2/2] link dm
my pid is 65360

We have been politely asked to die by Terminated: 15 (15).
Currently using 11MB RAM, peak 11MB.
fish: 'and out/dm' terminated by signal SIGTERM (Polite quit request)

Bug: skia:7614

Change-Id: Ie43be78fa766433a9d7cf391d78801d4355e635c
Reviewed-on: https://skia-review.googlesource.com/107720
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
ac568a934f8f82bf3a359b757d67eb3a797d3593 25-Jan-2018 Mike Klein <mtklein@chromium.org> 1010102, 101010x, 888x in sw

Same sort of deal as before, now with all three new formats.
While I was at it, I made sure RGBA 8888 and BGRA 8888 both work too.

We don't want the 101010's in lowp, but 888x should be fine.

After looking at the DM images on monitors at work, I decided to
re-enable dither even on 10-bit images.

Looking at the GMs in 888x or 101010x is interesting... I think we must
not be clearing the memory allocated for layers? Seems like we want to
allocate layers as 8888?

Change-Id: I3a85b4f00877792a6425a7e7eb31eacb04ae9218
Reviewed-on: https://skia-review.googlesource.com/101640
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
c8f740168ff32222a35ab2a3809c7664d7a2432e 21-Dec-2017 Mike Klein <mtklein@chromium.org> remove obsolete DM test configs

ViaSingletonPictures simulates a load pattern that Blink no longer produces.

I don't even remember what Via2ndPic and ViaTwice are meant to test,
but I imagine they're quite obsolete.

There was a lingering reference to ViaMojo, which otherwise doesn't exist.

Bug: skia:7544

Change-Id: I033fd344314054ad66c363e5dbd0a373be188069
Reviewed-on: https://skia-review.googlesource.com/88780
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
8f11d4dcafef4447fa68ea0ab28a72589241e9fd 24-Jan-2018 Mike Klein <mtklein@chromium.org> eliminate SK_BUILD_FOR_WIN32

SK_BUILD_FOR_WIN and SK_BUILD_FOR_WIN32 have long meant the same thing.

Chrome fix is https://chromium-review.googlesource.com/c/chromium/src/+/884007

Change-Id: I0e907b1bcd2a358eabf776f414fd3aeb3c689561
Reviewed-on: https://skia-review.googlesource.com/99340
Reviewed-by: Mike Reed <reed@google.com>
/external/skia/dm/DM.cpp
5340b3fc43119f16f6d69d1a83f6755826cfa8b3 24-Jan-2018 Mike Klein <mtklein@chromium.org> allow 4444 sw surfaces

c.f. https://skia-review.googlesource.com/c/skia/+/92681

Change-Id: I0e73ee7fd7b6a6c122121fcaddb7abe2af0b8042
Reviewed-on: https://skia-review.googlesource.com/99301
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
54f65c473fd6bf6919dfcbad22e924dff7586568 16-Jan-2018 Florin Malita <fmalita@chromium.org> Skotty -> Skottie

Change-Id: If8b6516024c69b0fc256208874f6666a4e70e12c
Reviewed-on: https://skia-review.googlesource.com/95241
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/dm/DM.cpp
515bda681177e2bb1c988e3167a95e3d4132bd7f 09-Jan-2018 Mike Klein <mtklein@chromium.org> support gray8 destinations on CPU

- fill in a couple switches to allow software to rasterize gray8
- add a gray8 config to DM so we can test it
- enable this config on some bots

Today we draw gray8 using SkRasterPipeline, loading it as {g,g,g,1}
and storing using the same fixed luma math as SkLumaColorFilter.
One day it'd be nice to use the color space's luma vector if present.

Can we support this on GPU?

Change-Id: I4ee661c8bd5f33f5db2433ffb6e1bc2483af8397
Reviewed-on: https://skia-review.googlesource.com/92681
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
124d5afbff0b518ee1b8ffcf80ebcb26bc7d31f5 31-Dec-2017 Florin Malita <fmalita@chromium.org> [skotty] Speculative g3 DM build fix

Disable Skotty support in G3 for now.

TBR=
Change-Id: Ic64f62bc21e9d4a531cdfa2495710edc1ba531f8
Reviewed-on: https://skia-review.googlesource.com/90029
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/dm/DM.cpp
fc043dcd552d293fc4d0da61562e3a7b755a640a 31-Dec-2017 Florin Malita <fmalita@chromium.org> [skotty] Add Json DM source

Generates a filmstrip with evenly distributed frames for a Skotty animation.

TBR=
Change-Id: Ia89e0d65d59fd5ab4ef221a231e9b3e0c033828a
Reviewed-on: https://skia-review.googlesource.com/90025
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
/external/skia/dm/DM.cpp
040238bded7b932b916c84912cbaec1207aa29c0 18-Dec-2017 Chris Dalton <csmartdalton@google.com> Add a tools flag to suppress geometry shaders

Bug: skia:
Change-Id: I38736c5d49e3b281c2d23af3908575274ff97b5c
Reviewed-on: https://skia-review.googlesource.com/86282
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
/external/skia/dm/DM.cpp
6613cc5186c200e053c5df9bd8f051ffba6e3564 19-Dec-2017 Mike Klein <mtklein@chromium.org> GOOGLE3 -> SK_BUILD_FOR_GOOGLE3

This is more consistent with our other SK_BUILD_FOR_... macros,
and less likely to collide with other preprocessor logic.

(Luckily, this was defined in public.bzl, so we can do this
all in one CL in the Skia repo.)

Change-Id: I5f232888288c9c53fad445545d983d0fb0b4add8
Reviewed-on: https://skia-review.googlesource.com/86940
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
d7b3845f3d3f3498c2adc542b4b20003ac7d3ab0 11-Dec-2017 Hal Canary <halcanary@google.com> SkQP: make_gmkb, gm_knowledge (GM Knowledgebase)

Add a real implementation for gm_knowledge.h This depends on
the presence of files in the form $GMK_DIR/foo/{max,min}.png

The implementation also writes out failures in a report directory.

Add a utility: experimental/make_gmkb which is a stand-alone
go executable that generates the foo/{max,min}.png data.

tools/skqp/README.md has instructions on running SkQP.

Also: add SkFontMgrPriv.h

Change-Id: Ibe1e9a7e7de143d14eee3877f5f2d2d8713f7f49
Reviewed-on: https://skia-review.googlesource.com/65380
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
/external/skia/dm/DM.cpp
36703d9d368050a20764b5336534bd718fd00a6e 12-Dec-2017 Brian Osman <brianosman@google.com> Push much of the SkColorSpace_Base interface up to SkColorSpace

Some pieces still remain, but the next step looks less mechanical,
so I wanted to land this piece independently.

Bug: skia:
Change-Id: Ie63afcfa08af2f6e4996911fa2225c43441dbfb2
Reviewed-on: https://skia-review.googlesource.com/84120
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/dm/DM.cpp
0933bc9b679457ef9333988fe3a1faae6a0b4126 09-Dec-2017 Mike Reed <reed@google.com> Revert "Revert "resources: remove most uses of GetResourcePath()""

This reverts commit cca230055921d2df8708ed6f9abcc2d43468dc7f.

Reason for revert: think I guessed wrong about g32 -- unreverting

Original change's description:
> Revert "resources: remove most uses of GetResourcePath()"
>
> This reverts commit 5093a539def3ae09df324018f2343827009b2e05.
>
> Reason for revert: google3 seems broken
>
> Original change's description:
> > resources: remove most uses of GetResourcePath()
> >
> > Going forward, we will standardize on GetResourceAsData(), which will
> > make it easier to run tests in environments without access to the
> > filesystem.
> >
> > Also: GetResourceAsData() complains when a resource is missing.
> > This is usually an error.
> >
> > Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188
> > Reviewed-on: https://skia-review.googlesource.com/82642
> > Reviewed-by: Hal Canary <halcanary@google.com>
> > Commit-Queue: Hal Canary <halcanary@google.com>
>
> TBR=halcanary@google.com,scroggo@google.com
>
> Change-Id: Ic5a7c0167c995a672e6b06dc92abe00564432214
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/83001
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=halcanary@google.com,scroggo@google.com,reed@google.com

Change-Id: I5a46e4de61186a8a5eb9cacd3275e24e311d5a07
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/82942
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/dm/DM.cpp
cca230055921d2df8708ed6f9abcc2d43468dc7f 08-Dec-2017 Mike Reed <reed@google.com> Revert "resources: remove most uses of GetResourcePath()"

This reverts commit 5093a539def3ae09df324018f2343827009b2e05.

Reason for revert: google3 seems broken

Original change's description:
> resources: remove most uses of GetResourcePath()
>
> Going forward, we will standardize on GetResourceAsData(), which will
> make it easier to run tests in environments without access to the
> filesystem.
>
> Also: GetResourceAsData() complains when a resource is missing.
> This is usually an error.
>
> Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188
> Reviewed-on: https://skia-review.googlesource.com/82642
> Reviewed-by: Hal Canary <halcanary@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

TBR=halcanary@google.com,scroggo@google.com

Change-Id: Ic5a7c0167c995a672e6b06dc92abe00564432214
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/83001
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/dm/DM.cpp
5093a539def3ae09df324018f2343827009b2e05 08-Dec-2017 Hal Canary <halcanary@google.com> resources: remove most uses of GetResourcePath()

Going forward, we will standardize on GetResourceAsData(), which will
make it easier to run tests in environments without access to the
filesystem.

Also: GetResourceAsData() complains when a resource is missing.
This is usually an error.

Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188
Reviewed-on: https://skia-review.googlesource.com/82642
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
/external/skia/dm/DM.cpp
c465d13e6fca5e171bde45d35b2dd43117f4702e 08-Dec-2017 Hal Canary <halcanary@google.com> resources: orgainize directory.

Should make it easier to ask just for images.

Change-Id: If821743dc924c4bfbc6b2b2d29b14affde7b3afd
Reviewed-on: https://skia-review.googlesource.com/82684
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
/external/skia/dm/DM.cpp
c8037dc5edda42cacd839df4e1c7d8cfd0953309 05-Dec-2017 Leon Scroggins III <scroggo@google.com> Reland "Hide SkEncodedInfo"

This partially reverts commit
1793e7bb46c1f9d430c1a699a1c3d3168159b659.

Hide SkEncodedInfo

Bug: skia:7353
Bug: skia:6839

This contains information that is not necessary for clients to know. The
Color enum tells the number of components in the input, but this is only
interesting internally (to the SkSwizzler).

Similarly, the Alpha enum differs from SkAlphaType in that it has
kBinary instead of kPremul. This is useful information only internally
for determining whether the SkColorSpaceXform needs to premultiply.

The bitsPerComponent is potentially useful for a client; Android (in
SkAndroidCodec) uses it to determine the SkColorType. Rather than
exposing bitsPerComponent, make SkAndroidCodec a friend so it can
access the SkEncodedInfo. A future change will change SkCodec to
recommend F16 for bitsPerComponent > 8, but that will be more involved;
it was the reason for the revert of this CL.

Switch conversionSupported to use an SkColorType, which is enough info.

Replace the SkEncodedInfo::Alpha field on SkCodec::FrameInfo with an
SkAlphaType.

SkCodec still needs an SkEncodedInfo, so move its header (which is
already not SK_API) to include/private.

TBR=mtklein@chromium.org,reed@google.com
Change-Id: I928b1f55317602cb37d29da63b53026c8d139cee
Reviewed-on: https://skia-review.googlesource.com/80860
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
/external/skia/dm/DM.cpp
1793e7bb46c1f9d430c1a699a1c3d3168159b659 05-Dec-2017 Leon Scroggins <scroggo@google.com> Revert "Hide SkEncodedInfo"

This reverts commit c6f7a4ffa9522159efc42f7c948bba5e66bb8844.

Reason for revert: Causing differences in Gold, stemming from the fact that this changes the recommended SkImageInfo for 16 bits-per-component PNG from N32 to F16.
- an F16 bitmap already png-encodes to a 16 bits-per-component PNG, but it does not encode a linear colorspace (possibly a bug?). when we decode this PNG using getInfo(), it fails because it has an F16 color type and non-linear colorspace. (In the encode-srgb-png gm, this results in blank results for F16.) We could correct this on the encoder side, but it seems possible that a 16 bits-per-component PNG could be encoded with a different color space. In that case, we'd want SkCodec to recommend F16/SRGBLinear, but I think we'd want the SkCodec to store the encoded SkColorSpace so that we can Xform between the two. Currently SkCodec only stores one color space, so that will require a refactor.
- When decoding 16-bits-per-component PNGs, we are now decoding them to F16. This shows differences in Gold. The srgb/gpu results now look more like F16. I think this is fine.

Original change's description:
> Hide SkEncodedInfo
>
> Bug: skia:7353
> Bug: skia:6839
>
> This contains information that is not necessary for clients to know. The
> Color enum tells the number of components in the input, but this is only
> interesting internally (to the SkSwizzler).
>
> Similarly, the Alpha enum differs from SkAlphaType in that it has
> kBinary instead of kPremul. This is useful information only internally
> for determining whether the SkColorSpaceXform needs to premultiply.
>
> The bitsPerComponent is potentially useful for a client; Android (in
> SkAndroidCodec) uses it to determine the SkColorType. Rather than
> exposing bitsPerComponent, use it to make the same decision that Android
> would have made - 16 bits per component means to set the info to F16. Add
> a test that computeOutputColorType behaves as expected.
>
> Switch conversionSupported to use an SkColorType, which is enough info.
>
> Replace the SkEncodedInfo::Alpha field on SkCodec::FrameInfo with an
> SkAlphaType.
>
> SkCodec still needs an SkEncodedInfo, so move its header (which is
> already not SK_API) to include/private.
>
> Change-Id: Ie2cf11339bf999ebfd4390c0f448f7edd6feabda
> Reviewed-on: https://skia-review.googlesource.com/79260
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Leon Scroggins <scroggo@google.com>

TBR=mtklein@chromium.org,scroggo@google.com,reed@google.com

Change-Id: I0c5dd1461e1b70d1e55349a8e7ee6b029c3f556e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7353, skia:6839
Reviewed-on: https://skia-review.googlesource.com/80660
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
/external/skia/dm/DM.cpp
c6f7a4ffa9522159efc42f7c948bba5e66bb8844 04-Dec-2017 Leon Scroggins III <scroggo@google.com> Hide SkEncodedInfo

Bug: skia:7353
Bug: skia:6839

This contains information that is not necessary for clients to know. The
Color enum tells the number of components in the input, but this is only
interesting internally (to the SkSwizzler).

Similarly, the Alpha enum differs from SkAlphaType in that it has
kBinary instead of kPremul. This is useful information only internally
for determining whether the SkColorSpaceXform needs to premultiply.

The bitsPerComponent is potentially useful for a client; Android (in
SkAndroidCodec) uses it to determine the SkColorType. Rather than
exposing bitsPerComponent, use it to make the same decision that Android
would have made - 16 bits per component means to set the info to F16. Add
a test that computeOutputColorType behaves as expected.

Switch conversionSupported to use an SkColorType, which is enough info.

Replace the SkEncodedInfo::Alpha field on SkCodec::FrameInfo with an
SkAlphaType.

SkCodec still needs an SkEncodedInfo, so move its header (which is
already not SK_API) to include/private.

Change-Id: Ie2cf11339bf999ebfd4390c0f448f7edd6feabda
Reviewed-on: https://skia-review.googlesource.com/79260
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Leon Scroggins <scroggo@google.com>
/external/skia/dm/DM.cpp
aa73b96760c280629b9a765be387087d772fe242 27-Nov-2017 Mike Klein <mtklein@chromium.org> clean up SkDeferredCanvas

To our knowledge it's not used.
Its defer- mode in DM isn't even run on the bots.

Change-Id: Ifebfa2a77bfed8370eb421d379697f04fa2c8608
Reviewed-on: https://skia-review.googlesource.com/76420
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
dcfca431e3c350e17eedb3402cc63577cea8d4ea 15-Nov-2017 Brian Salomon <bsalomon@google.com> Use GrContextFactories that produce a single GrContext in unit tests.

This is to alleviate problems due to the command buffer getting bent out of shape when the current
OpenGL context is switched out from under it (because we ran a test with a native GL context). This,
however is not a full solution. More changes will be required to ensure that after running each
command buffer or native test we bind the null context. This does allow us to take a step in that
direction without breaking anything too badly. Moreover, there is no real benefit to reusing a
GrContextFactory.

Modifies DEF_GPUTEST to take GrContextOptions rather than a factory to use. Tests were already using
their own factories anyway.

In tests that use GrContextFactory the factory instance is moved to the inner loop.

Modifies gpucts and skia_test to not use persistent GrContextFactories.

Change-Id: Ie7a36793545c775f2f30653ead6fec93a3d22717
Reviewed-on: https://skia-review.googlesource.com/71861
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/dm/DM.cpp
0387d35f599dca39cb6a5073743c245b3f12ab7d 14-Nov-2017 Brian Osman <brianosman@google.com> Add SkColorSpace_Base::makeColorSpin

This is a utility that creates a version of an existing XYZ color space
that performs our color spin operation. Assigning this to a source remaps
RGB to GBR. Assigning it to a destination does the opposite (RGB to BRG).

Bug: skia:
Change-Id: I3528698220bd32aa01dcd3db225e60f151a4b5bd
Reviewed-on: https://skia-review.googlesource.com/71280
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
ccafca0054670b02a02d6d256de490c45e787391 14-Nov-2017 Hal Canary <halcanary@google.com> DM: hide DM:FontMgr behind a factory

Change-Id: I4dc745479ceb1d5ca1ddb4a0904f342576e4562c
Reviewed-on: https://skia-review.googlesource.com/71240
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
/external/skia/dm/DM.cpp
0c5fdcb18986b46ddad48f4157570c4ead4fe54a 13-Nov-2017 Mike Klein <mtklein@chromium.org> streamline GDI bots

- Replace build-time GDI support in all of Skia
with run-time GDI support only in DM.

- Make the GDI bots NativeFont bots paralelling
the other NativeFonts bots.

Change-Id: I424b20f6983d8a8ba8574650efefea2b8776bbe2
Reviewed-on: https://skia-review.googlesource.com/70721
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
3186821c7e4448c4b586dde590760e22b46cf166 06-Nov-2017 Mike Klein <mtklein@chromium.org> add a SkFontMgr to DM that returns portable fonts

Controlled by --[no]nativeFonts, and still defaults to native fonts.

Change-Id: Ib2879e69fadb63ddb5a17a7e4ae227941893b8cf
Reviewed-on: https://skia-review.googlesource.com/67806
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
b7ea3da8cf722e017661710f25a83babd745a04d 31-Oct-2017 Mike Klein <mtklein@chromium.org> Revert "gbr- has been brg- this whole time..."

This reverts commit 5b9a037bf41591e0076843f619ee47c9ad30e42d.

Reason for revert:

I got confused in here somewhere and everything is drawing wrong.

Original change's description:
> gbr- has been brg- this whole time...
>
> Rewrite things to make that a little clearer.
>
> A red pixel ends up in channel 2, what would naively draw as blue
> without a rotation. A green pixel ends up in channel 0, which would
> naively draw as red without rotation. A blue pixel ends up in channel
> 1, which would naively draw as green without this rotation.
>
> So this transformation is:
>
> r -> b
> g -> r
> b -> g
>
> i.e. rgb_to_brg
>
> Change-Id: I12331ff2622194e34a44f421f656fbe4db5d3dca
> Reviewed-on: https://skia-review.googlesource.com/65521
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=mtklein@chromium.org,brianosman@google.com

Change-Id: Ib29800b242bf736b20d61375d3c437c8f4ffdce0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/65781
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
5b9a037bf41591e0076843f619ee47c9ad30e42d 31-Oct-2017 Mike Klein <mtklein@chromium.org> gbr- has been brg- this whole time...

Rewrite things to make that a little clearer.

A red pixel ends up in channel 2, what would naively draw as blue
without a rotation. A green pixel ends up in channel 0, which would
naively draw as red without rotation. A blue pixel ends up in channel
1, which would naively draw as green without this rotation.

So this transformation is:

r -> b
g -> r
b -> g

i.e. rgb_to_brg

Change-Id: I12331ff2622194e34a44f421f656fbe4db5d3dca
Reviewed-on: https://skia-review.googlesource.com/65521
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
/external/skia/dm/DM.cpp
ec3253472947b0df618261479336a7b50b24f0c8 30-Oct-2017 Robert Phillips <robertphillips@google.com> Revert "Revert "Fix GrDefaultPathRender inversely wound path bug""

This reverts commit fc28138c0422637741ac2839914ef10c56438054.

Reason for revert: Suppression have landed for failing tests

Original change's description:
> Revert "Fix GrDefaultPathRender inversely wound path bug"
>
> This reverts commit 511a9d49998ec6a74c375e6cfc55f660f7987c40.
>
> Reason for revert: vulkan
>
> Original change's description:
> > Fix GrDefaultPathRender inversely wound path bug
> >
> > Bug: 769898
> > Change-Id: I3b1a43b1e114b35105493a0cfa01a1f01b65fa56
> > Reviewed-on: https://skia-review.googlesource.com/64065
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com
>
> Change-Id: Ib1a987294d14f0526bf5ff5a8fd90bbd5f6f3a0d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 769898
> Reviewed-on: https://skia-review.googlesource.com/65201
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: I3a3543c46b3192f1ffd31a5566cf337dc03561a8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 769898
Reviewed-on: https://skia-review.googlesource.com/65202
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/dm/DM.cpp
03141d25cf75c4ce6cdb94f90e9538ee3c878699 30-Oct-2017 Mike Klein <mtklein@chromium.org> remove SkThread, using std::thread instead

Change-Id: I871dd5eea4496e87c206b46d9eae81cb521b11ce
Reviewed-on: https://skia-review.googlesource.com/65103
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
fc28138c0422637741ac2839914ef10c56438054 30-Oct-2017 Robert Phillips <robertphillips@google.com> Revert "Fix GrDefaultPathRender inversely wound path bug"

This reverts commit 511a9d49998ec6a74c375e6cfc55f660f7987c40.

Reason for revert: vulkan

Original change's description:
> Fix GrDefaultPathRender inversely wound path bug
>
> Bug: 769898
> Change-Id: I3b1a43b1e114b35105493a0cfa01a1f01b65fa56
> Reviewed-on: https://skia-review.googlesource.com/64065
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: Ib1a987294d14f0526bf5ff5a8fd90bbd5f6f3a0d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 769898
Reviewed-on: https://skia-review.googlesource.com/65201
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/dm/DM.cpp
511a9d49998ec6a74c375e6cfc55f660f7987c40 27-Oct-2017 Robert Phillips <robertphillips@google.com> Fix GrDefaultPathRender inversely wound path bug

Bug: 769898
Change-Id: I3b1a43b1e114b35105493a0cfa01a1f01b65fa56
Reviewed-on: https://skia-review.googlesource.com/64065
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/dm/DM.cpp
7a0ebfc033463907e2088401972d14ea8589cdb5 13-Oct-2017 Chris Dalton <csmartdalton@google.com> Add a tooling flag for path mask caching

Adds the flag and a disables caching on the CCPR bots.

Bug: skia:
Change-Id: Icb85e77f89634dda1d419dacac5b8a93340723f0
Reviewed-on: https://skia-review.googlesource.com/59740
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
/external/skia/dm/DM.cpp
b6c5e5b956af9777349a6ab362ce86e430e59765 09-Oct-2017 Hal Canary <halcanary@google.com> DM: move skiatest functions into separate file.

Motivation: allows reuse.

Change-Id: I5732305a213acd83de4ba4e84e0ae27d094cf649
Reviewed-on: https://skia-review.googlesource.com/57241
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
/external/skia/dm/DM.cpp
38ace8a1339e7dbc7126887037af11a6d34f6887 05-Oct-2017 Chris Dalton <csmartdalton@google.com> Revert "Attempt both GL and GLES for GPU unit tests"

This reverts commit 454818b80ae57edfa410f884de3ed31db1e7ea9c.

Reason for revert: the GPU unit tests on Chromebook that this change enabled are not surprisingly broken.

Original change's description:
> Attempt both GL and GLES for GPU unit tests
>
> The hardcoded logic was not all inclusive and caused Chromebooks to
> not run GPU unit tests.
>
> Bug: skia:
> Change-Id: I7688adab314d12234ee03363609a1c4bf8f2edb5
> Reviewed-on: https://skia-review.googlesource.com/55561
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=bsalomon@google.com,brianosman@google.com,csmartdalton@google.com

Change-Id: I48a6fdf0b21d3f3a795d9cf20564208f7c35ff5b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/55960
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
/external/skia/dm/DM.cpp
454818b80ae57edfa410f884de3ed31db1e7ea9c 05-Oct-2017 Chris Dalton <csmartdalton@google.com> Attempt both GL and GLES for GPU unit tests

The hardcoded logic was not all inclusive and caused Chromebooks to
not run GPU unit tests.

Bug: skia:
Change-Id: I7688adab314d12234ee03363609a1c4bf8f2edb5
Reviewed-on: https://skia-review.googlesource.com/55561
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
/external/skia/dm/DM.cpp
f0ffb8943b7be477b769db23660a80013f3332eb 03-Oct-2017 Mike Reed <reed@google.com> Revert[4] "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"

This reverts commit 5a2e50edc51006ce91366e177a9d21a16775d7fd.

Bug: skia:
Change-Id: I8d28b5c07d90130e5a1653923740eaf189ecb954
Reviewed-on: https://skia-review.googlesource.com/53900
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/dm/DM.cpp
5a2e50edc51006ce91366e177a9d21a16775d7fd 02-Oct-2017 Mike Reed <reed@google.com> Revert "Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"""

This reverts commit cd284c532376d16fcc4ed75baf3da65c3e4a2e95.

Reason for revert:

assert fired in SkMallocPixelRef.cpp:61: fatal error: "assert(info.computeByteSize(rowBytes) == info.getSafeSize(rowBytes))"

google3 thinks it was from surface_rowbytes

Original change's description:
> Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap""
>
> This reverts commit 809cbedd4b252be221b2ac3b4269d312fd8f53a0.
>
> Bug: skia:
> Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d
> Reviewed-on: https://skia-review.googlesource.com/52665
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

TBR=fmalita@chromium.org,reed@google.com

Change-Id: I41e3f7a3f791cc8183291847e783ed8a53bc91d2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/53802
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/dm/DM.cpp
cd284c532376d16fcc4ed75baf3da65c3e4a2e95 29-Sep-2017 Mike Reed <reed@google.com> Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap""

This reverts commit 809cbedd4b252be221b2ac3b4269d312fd8f53a0.

Bug: skia:
Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d
Reviewed-on: https://skia-review.googlesource.com/52665
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
/external/skia/dm/DM.cpp
809cbedd4b252be221b2ac3b4269d312fd8f53a0 28-Sep-2017 Jim Van Verth <jvanverth@google.com> Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"

This reverts commit 88757dacd4f532a0f647c02ae0ee596d31ab5c68.

Reason for revert: Still seems to be failing Chromium "telemetry_perf_unittests (with patch) on Android" on android_n5x_swarming_rel.

Original change's description:
> guard old apis for querying byte-size of a bitmap/imageinfo/pixmap
>
> Now with legacy behavior for allocpixels
>
> This was reverted, so the current CL is a "fix" on top of ...
> https://skia-review.googlesource.com/c/skia/+/50980
>
> Related update to Chrome (in preparation for this change)
> https://chromium-review.googlesource.com/c/chromium/src/+/685719
>
> Bug: skia:
> Change-Id: I4b370ee7e95083ab27421f008132219c9c7b86e9
> Reviewed-on: https://skia-review.googlesource.com/51341
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=fmalita@chromium.org,reed@google.com

Change-Id: I827a0ca1d1e3909e648fde3342cdb8601d34da8d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/52381
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
/external/skia/dm/DM.cpp
88757dacd4f532a0f647c02ae0ee596d31ab5c68 26-Sep-2017 Mike Reed <reed@google.com> guard old apis for querying byte-size of a bitmap/imageinfo/pixmap

Now with legacy behavior for allocpixels

This was reverted, so the current CL is a "fix" on top of ...
https://skia-review.googlesource.com/c/skia/+/50980

Related update to Chrome (in preparation for this change)
https://chromium-review.googlesource.com/c/chromium/src/+/685719

Bug: skia:
Change-Id: I4b370ee7e95083ab27421f008132219c9c7b86e9
Reviewed-on: https://skia-review.googlesource.com/51341
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/dm/DM.cpp
f46633f8af5296341e33ec4cdb69c71dfa997396 26-Sep-2017 Greg Daniel <egdaniel@google.com> Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"

This reverts commit 98a6216b18b57c2f7a0d58f542c60503686aed69.

Reason for revert: breaking the chrome roll. Looks like they may be writing data to create an image across all the row bytes and thus writing to unalloced data on the last row. Link to example failing bot:
https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/539960

Original change's description:
> guard old apis for querying byte-size of a bitmap/imageinfo/pixmap
>
> Previously we had size_t and uint64_t variations.
>
> The new (simpler) API always..
> - returns size_t, or 0 if the calculation overflowed
> - returns the trimmed size (does not include rowBytes padding for the last row)
>
> Bug: skia:
> Change-Id: I05173e877918327c7b207d2f7f1ab0db36892e2e
> Reviewed-on: https://skia-review.googlesource.com/50980
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Leon Scroggins <scroggo@google.com>

TBR=mtklein@google.com,herb@google.com,scroggo@google.com,fmalita@chromium.org,reed@google.com

Change-Id: I726f6ab1b36b14979ba6f37105e0a469b3f0dbc0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/51262
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
/external/skia/dm/DM.cpp
98a6216b18b57c2f7a0d58f542c60503686aed69 26-Sep-2017 Mike Reed <reed@google.com> guard old apis for querying byte-size of a bitmap/imageinfo/pixmap

Previously we had size_t and uint64_t variations.

The new (simpler) API always..
- returns size_t, or 0 if the calculation overflowed
- returns the trimmed size (does not include rowBytes padding for the last row)

Bug: skia:
Change-Id: I05173e877918327c7b207d2f7f1ab0db36892e2e
Reviewed-on: https://skia-review.googlesource.com/50980
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
/external/skia/dm/DM.cpp
32bbf377e67398705dd33e097d94b0e23d9e84db 20-Sep-2017 Jim Van Verth <jvanverth@google.com> Fix TSAN issue with atlas expansion.

Removes SkString-related malloc from DM crash handler, and adds null check in ProxyRefTest.

Bug: skia:3550
Change-Id: I143c532b5d231a426b1a96b854e1effd6379b673
Reviewed-on: https://skia-review.googlesource.com/48440
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
/external/skia/dm/DM.cpp
a81b62674aa0bc382b8efbc54aaae8a75b6ec6ed 06-Sep-2017 Yuqian Li <liyuqian@google.com> Fix SkASSERT for convex paths with DAA

As DAA does not chop edges at Y extrema, it's valid for convex edges to
have only one edge (e.g., a single cubic edge with the valley shape \_/).

This wasn't an issue for production because DAA is never called for
convex paths by default.

Bug=skia:7015
Change-Id: Iac79801d6a24188970ef6f7bf723494a25d92a1e
Reviewed-on: https://skia-review.googlesource.com/42942
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/dm/DM.cpp
ad8a43f7698071f00ce024a935b0bc04a4b19a41 30-Aug-2017 Robert Phillips <robertphillips@google.com> DeferredDisplayList API proposal

Chrome would like to perform cpu-side preprocessing for gpu draws in parallel.
They do not want to go through a picture (since they have their own display list format).


The general idea is that we add a new SkDeferredDisplayListRecorder class to
perform all of Ganesh's cpu-side preprocessing ahead of time and in parallel.

The SkDDLRecorder operates like SkPictureRecorder. The user can get an SkCanvas
from the SkDDLRecorder and feed it draw operations. Once finished, the user
calls 'detach' to get an SkDeferredDisplayList. All the work up to and
including the 'detach' call can be done in parallel and will not touch
the GPU. To actually get pixels the client must call SkSurface::draw(SkDDL)
on an SkSurface that is "compatible" with the surface characterization
initially given to the SkDDLMaker.

The surface characterization contains the minimum amount of information Ganesh needs
to know about the ultimate destination in order to perform its cpu-side work
(i.e., caps, width, height, config).



Change-Id: I75faa483ab5a6b779c8de56ea56b9d90b990f43a
Reviewed-on: https://skia-review.googlesource.com/30140
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/dm/DM.cpp
f1942de288ad593b1348029aefaad2cf99ad57ea 30-Aug-2017 Brian Osman <brianosman@google.com> Suppress file output for the gltestthreading config

Bug: skia:
Change-Id: Icd905ea7e60a05bc3903eb85d111dcf73ce2c4dd
Reviewed-on: https://skia-review.googlesource.com/40690
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/dm/DM.cpp
f9810666bd40db8fb1650e6c727c1a83b8090136 30-Aug-2017 Brian Osman <brianosman@google.com> Threaded generation of software paths

Re-land of: https://skia-review.googlesource.com/36560

All information needed by the thread is captured by the prepare
callback object, the lambda captures a pointer to that, and does the
mask render. Once it's done, it signals the semaphore (also owned by the
callback). The callback defers the semaphore wait even longer (into the
ASAP upload), so the odds of waiting for the thread are REALLY low.

Also did a bunch of cleanup along the way, and put in some trace markers
so we can monitor how well this is working.

Traces of a GM that includes GPU and SW path rendering (path-reverse):

Original:
https://screenshot.googleplex.com/f5BG3901tQg.png
Threaded, with wait in the callback (notice pre flush callback blocking):
https://screenshot.googleplex.com/htOSZFE2s04.png
Current version, with wait deferred to ASAP upload function:
https://screenshot.googleplex.com/GHjD0U3C34q.png
Bug: skia:
Change-Id: Idb92f385590749f41328a9aec65b2a93f4775079
Reviewed-on: https://skia-review.googlesource.com/40775
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/dm/DM.cpp
87ae9895692e4a97873a510178003d1ba70ab79a 24-Aug-2017 Brian Salomon <bsalomon@google.com> Revert "Threaded generation of software paths"

This reverts commit 76323bc0615044a5921afef0e19a350f3d04ffe0.

Reason for revert: Breaking NUC bots in threaded gm comparison:

https://chromium-swarm.appspot.com/task?id=382e589753187f10&refresh=10



Original change's description:
> Threaded generation of software paths
>
> All information needed by the thread is captured by the prepare
> callback object, the lambda captures a pointer to that, and does the
> mask render. Once it's done, it signals the semaphore (also owned by the
> callback). The callback defers the semaphore wait even longer (into the
> ASAP upload), so the odds of waiting for the thread are REALLY low.
>
> Also did a bunch of cleanup along the way, and put in some trace markers
> so we can monitor how well this is working.
>
> Traces of a GM that includes GPU and SW path rendering (path-reverse):
>
> Original:
> https://screenshot.googleplex.com/f5BG3901tQg.png
> Threaded, with wait in the callback (notice pre flush callback blocking):
> https://screenshot.googleplex.com/htOSZFE2s04.png
> Current version, with wait deferred to ASAP upload function:
> https://screenshot.googleplex.com/GHjD0U3C34q.png
>
> Bug: skia:
> Change-Id: I3d5a230bbd68eb35e1f0574b308485c691435790
> Reviewed-on: https://skia-review.googlesource.com/36560
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: Icac0918a3771859f671b69ae07ae0fedd3ebb3db
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/38560
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/dm/DM.cpp
76323bc0615044a5921afef0e19a350f3d04ffe0 24-Aug-2017 Brian Osman <brianosman@google.com> Threaded generation of software paths

All information needed by the thread is captured by the prepare
callback object, the lambda captures a pointer to that, and does the
mask render. Once it's done, it signals the semaphore (also owned by the
callback). The callback defers the semaphore wait even longer (into the
ASAP upload), so the odds of waiting for the thread are REALLY low.

Also did a bunch of cleanup along the way, and put in some trace markers
so we can monitor how well this is working.

Traces of a GM that includes GPU and SW path rendering (path-reverse):

Original:
https://screenshot.googleplex.com/f5BG3901tQg.png
Threaded, with wait in the callback (notice pre flush callback blocking):
https://screenshot.googleplex.com/htOSZFE2s04.png
Current version, with wait deferred to ASAP upload function:
https://screenshot.googleplex.com/GHjD0U3C34q.png

Bug: skia:
Change-Id: I3d5a230bbd68eb35e1f0574b308485c691435790
Reviewed-on: https://skia-review.googlesource.com/36560
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/dm/DM.cpp
f21aa04dca1ab16e57d9bac3f6a08abb7e107d95 21-Aug-2017 Brian Osman <brianosman@google.com> Plumb GrContextOptions to GPU sinks in DM

We were ignoring the path renderer flag when drawing GMs or SKPs.

Bug: skia:
Change-Id: Iee443fb70f1faec65e46925fa0e3cea3716d448d
Reviewed-on: https://skia-review.googlesource.com/36861
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/dm/DM.cpp
0741818e7ab4e9ea8505b8a8687412f0e3804c65 15-Aug-2017 Leon Scroggins III <scroggo@google.com> Move calls to conversion_possible to SkCodec

Move common code into the base class, so subclasses need not call
conversion_possible.

Use SkEncodedInfo rather than SkImageInfo, and use the proper frame.

API Changes:
- SkAndroidCodec:
- Add getEncodedInfo(), for SkBitmapRegionCodec
- SkEncodedInfo:
- Add opaque() helper
- SkBitmapRegionDecoder:
- Remove unused conversionSupported

(Split off from skia-review.googlesource.com/c/25746)

Bug: skia:5601
Change-Id: If4a40d4b98a3dd0afde2b6058f92315a393a5baf
Reviewed-on: https://skia-review.googlesource.com/34361
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
/external/skia/dm/DM.cpp
ecf78acaa0d5319adf575e6f624993b16d83824c 15-Aug-2017 Chris Dalton <csmartdalton@google.com> Blacklist svgparse_* svgs on non-8888

This also required extending the blacklist argument to support
negative matching and wildcards.

Bug: skia:6918
Change-Id: I915e305c75fe23fc3e11c2dd3e91570967da0aaa
Reviewed-on: https://skia-review.googlesource.com/31444
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
/external/skia/dm/DM.cpp
135a1b10fef1ee158f8f2379c2a7429eead004e0 15-Aug-2017 Mike Klein <mtklein@chromium.org> upstream cr/165303354

The only interesting difference here is that I've just skipped
cd_Documents() on Google3 iOS builds rather than adding a new target to
BUILD. We don't run the binary so it's kind of moot what directory it'd
run in.

Change-Id: I1994e0283d24bcc505fa9b2b7b58307eafa5be92
Reviewed-on: https://skia-review.googlesource.com/34742
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
f28d472bc5f0fff813423ab670072a83f16dab93 11-Aug-2017 Ben Wagner <benjaminwagner@google.com> Fix dm when --config not specified.

Broken by https://skia-review.googlesource.com/c/32862.

Change-Id: I711057da08793902b50e98b67af9107ac9ead8d2
Reviewed-on: https://skia-review.googlesource.com/33663
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
/external/skia/dm/DM.cpp
32fa5104148722dbd6aac1ce8d38dcf47737f669 11-Aug-2017 Ben Wagner <benjaminwagner@google.com> Abort dm/nanobench on bad configs.

Adjust the configs specified by recipes to avoid the new error.

Change-Id: I23e31355e2faaab919d92abdb37a6f70cd2da1ff
Reviewed-on: https://skia-review.googlesource.com/32862
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
/external/skia/dm/DM.cpp
d0677bc44f74b257aa193ff1f635b3c7351dc48e 03-Aug-2017 Brian Osman <brianosman@google.com> Add missing newline to initial DM output

Bug: skia:
Change-Id: I505e5c339947e9fc8bbec6acefc48ee9f47c96d2
Reviewed-on: https://skia-review.googlesource.com/30581
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/dm/DM.cpp
eaa90b2a1acce598627250bc68ebc216d2b17e7c 01-Aug-2017 Robert Phillips <robertphillips@google.com> Roll ANGLE

https://chromium.googlesource.com/angle/angle.git/+log/cce8965d2c58..878c8b1e5e89

ANGLE now crashes (on program compilation) if there isn't a flush between uses of different flavors of ANGLE context (e.g., angle_gl_es2 vs. angle_gl_es3).

Change-Id: If59b6ec683e682db5214bb002a70863cee5fe013
Reviewed-on: https://skia-review.googlesource.com/28865
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/dm/DM.cpp
df60e369a8fb83c5dafded3f2453defa423f174a 25-Jul-2017 Yuqian Li <liyuqian@google.com> New analytic AA scan converter using delta (I call it DAA for now)

DAA is:

1. Much simpler than AAA.
SkScan_AAAPath.cpp is about 1700 lines.
SkScan_DAAPath.cpp is about 300 lines.
The whole DAA CL is only about 800 lines.

2. Much faster than AAA for complicated paths.
The speedup applies to GL backend (including ccpr)!
Here's the frame time of 'SampleApp --slide Chart' on macbook pro:
AAA-raster: 33ms
DAA-raster: 21ms
AAA-gl: 30ms
DAA-gl: 20ms
AAA-ccpr: 18ms
DAA-ccpr: 12ms
My linux desktop doesn't have SSE3 so the speedup is smaller
(~25% for Chart). I believe that DAA is so fast that I can enable
it for any paths (AAA is not enabled by default for complicated
paths because it is slow; hence our older supersampling scan
converter is used for stroking on Chart for AAA-xxx config.)

3. The SkCoverageDelta is suitable for threaded backend with
out-of-order concurrent scan conversion as commented in the source
code. Maybe we can also just send deltas to GPU.

4. Similar to most analytic path renderers, the quality is on the best
ground-truth level, unless there are intersections within a pixel.
The intersections look good to my eyes although theoretically that
could be arbitrary far from the ground truth (see my AAA slides).

5. For simple paths, such as circle, triangle, rrect, etc., DAA is
slower than AAA. But DAA is faster than our older supersampling
scan converter in most cases. As those simple paths usually don't
constitute the bottleneck of a picture (skp or svg), I strongly
recommend use DAA.

6. DAA also heavily favors blitMask so it may work quite well with
SkRasterPipeline and SkRasterPipelineBlitter.

Finally, please check https://skia-review.googlesource.com/c/22420/
which accelerate DAA by specializing blitCoverageDeltas for
SkARGB32_Blitter and SkARGB32_Black_Blitter. It brings a little(<5%)
speedup. But I couldn't figure out how to reduce the duplicate code
so I don't intend to land it.

Bug: skia:
Change-Id: I3b7ed6a727447922e645b1acb737a506e7c09a4c
Reviewed-on: https://skia-review.googlesource.com/19666
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/dm/DM.cpp
ede7bac43fbc69b9fdf1c178890ba6353f5bb140 23-Jul-2017 Mike Reed <reed@google.com> use unique_ptr for codec factories

Will need guards for android (at least)

Bug: skia:
Change-Id: I2bb8e656997984489ef1f2e41cd3d301c4e7b947
Reviewed-on: https://skia-review.googlesource.com/26040
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/dm/DM.cpp
b323a5ed1f26a5b8e4e9f8f78225bdf95dc5a177 24-Jul-2017 Mike Klein <mtklein@chromium.org> sprinkle more tracing in GM, tests, and ok, and add TRACE_FUNC

Change-Id: I562d438bd65e9fd900cfc6831f971b4af25c8ae6
Reviewed-on: https://skia-review.googlesource.com/26361
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
bc8150feef7aebb92811e8d976b65b04767c44f8 24-Jul-2017 Brian Osman <brianosman@google.com> Faster, thread-safe implementation

Bug: skia:
Change-Id: I401c5a9885c348aa424ab07b094acecddb209490
Reviewed-on: https://skia-review.googlesource.com/25860
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/dm/DM.cpp
97d6a7af8020ab76d6fcbbdc4a7f0beec556f4b7 24-Jul-2017 Mike Klein <mtklein@chromium.org> Don't write .pdfs in DM on the bots.

They take a long time to upload, and we don't do anything with them.

BUG=skia:6821

Change-Id: I16c5fc423953fa3e9d0dcb184ecbbe23f3918357
Reviewed-on: https://skia-review.googlesource.com/26142
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
c7d295ecf712dece58ae6654721b3708fd8a40d6 20-Jul-2017 Hal Canary <halcanary@google.com> DM: excercise other SkPDF raster dpis

Change-Id: Ia50661a8391da526d509adbe2d7203866c140b1c
Reviewed-on: https://skia-review.googlesource.com/25321
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
/external/skia/dm/DM.cpp
53136aa93f0d0e72facabb70a7d40ed265e4be0e 20-Jul-2017 Brian Osman <brianosman@google.com> First stab at JSON event tracer

Not yet thread safe (so it forces threading off).
Builds JSON on the fly, so overhead is certainly bad.
Plan to fix all of that, but this at least "works".

There is now one tracing flag: 'trace'.
- 'debugf' installs the SkDebugf tracer.
- 'atrace' installs the Android ATrace tracer.
- Any other value is interpreted as a filename, and
produces a JSON file for chrome://tracing.

All three modes work in DM, nanobench, and Viewer.

Bug: skia:
Change-Id: I3fbc22382b99418a508c670be2770195c0a1c364
Reviewed-on: https://skia-review.googlesource.com/24781
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/dm/DM.cpp
edfe3dfb47bd3248a588c2eb89224f59939bd626 19-Jul-2017 Derek Sollenberger <djsollen@google.com> Add option to ignore SIGINT when running DM on Android.

Bug: skia:6856
Change-Id: Iaaad2c22988cf8058304b7396c7d24eacd2f3edb
Reviewed-on: https://skia-review.googlesource.com/24745
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
/external/skia/dm/DM.cpp
dcbb9d90db0e07b7a3625bcdab3af11ab44c4cfe 19-Jul-2017 Brian Salomon <bsalomon@google.com> Add SkDebugf trace event handler.

Also adds more trace events to GPU backend.

Change-Id: Ifa5f0cd4b1fd582f0cc30d37d9e6414dc498c75d
Reviewed-on: https://skia-review.googlesource.com/24622
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/dm/DM.cpp
ce5ee602ed19b8493bf4dd1654d29486088bad63 17-Jul-2017 Brian Salomon <bsalomon@google.com> Add support for GL 565 and 4444 configs to test tools

Change-Id: I395e3387df44cf5370fef6ab73db73228225622f
Reviewed-on: https://skia-review.googlesource.com/23946
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/dm/DM.cpp
7c26ca770b08bd75dd8f347350a0f958953d3071 05-Jul-2017 Mike Reed <reed@google.com> add --forceRasterPipeline to dm, (already in nanobench)

Bug: skia:
Change-Id: I0e5f7dd2aaa03340687cdfe5578c8697088cd714
Reviewed-on: https://skia-review.googlesource.com/21532
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/dm/DM.cpp
bace7a940a6d83051eaa98b73dfa8867ed16ac2e 05-Jul-2017 Leon Scroggins III <scroggo@google.com> Remove CodecSrc::kIndex8_Always_DstColorType

We have removed support for drawing Index8, so stop testing it in DM.

Bug: skia: 6828
Change-Id: Ib2c4d3ebd371be704151a9f956c0ca2aaf2926a6
Reviewed-on: https://skia-review.googlesource.com/21525
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
/external/skia/dm/DM.cpp
e9f187bd04b03e81d8af8835a1c57a9ad8e373a0 26-Jun-2017 Mike Klein <mtklein@chromium.org> always touch verbose.log, even if --verbose

This lets us run bots that upload images with --verbose.

Today we're getting away with --verbose on some bots because they happen
to skip upload.

Change-Id: If915a65987b43c945263ada7751bf36aedff605a
Reviewed-on: https://skia-review.googlesource.com/20834
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
03a95ad62226db580024575480a86eff85c79f12 23-Jun-2017 Mike Klein <mtklein@chromium.org> remove DM status thread

Let's see if this helps iOS?

BUG=skia:6748

Change-Id: Iec67eacef0058dfb79c0223a955a22c676a35278
Reviewed-on: https://skia-review.googlesource.com/20683
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
/external/skia/dm/DM.cpp
a5cb781c17c09e01655defd0a84b431996b6a015 16-Jun-2017 Greg Daniel <egdaniel@google.com> Revert "Revert "Add API for flushing surfaces with gpu semaphores""

This reverts commit 7292231905c34ed290ba479338f26b56ae2a7792.

This change relands the original plus the follow on change:
https://skia-review.googlesource.com/20059.

Additionally it adds a blacklist for the mac intel bots which
don't see to respect the added fences on the GPU.

Original change's description:
> Revert "Add API for flushing surfaces with gpu semaphores"
>
> This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62.
>
> Reason for revert: Failing test on mac bots
>
> Original change's description:
> > Add API for flushing surfaces with gpu semaphores
> >
> > BUG=skia:
> >
> > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1
> > Reviewed-on: https://skia-review.googlesource.com/11488
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Forrest Reiling <freiling@google.com>
>
> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com
>
> Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/20063
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com

Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1
Reviewed-on: https://skia-review.googlesource.com/20141
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
/external/skia/dm/DM.cpp
7292231905c34ed290ba479338f26b56ae2a7792 15-Jun-2017 Greg Daniel <egdaniel@google.com> Revert "Add API for flushing surfaces with gpu semaphores"

This reverts commit 66366c697853e906d961ae691e2bc5209cdcfa62.

Reason for revert: Failing test on mac bots

Original change's description:
> Add API for flushing surfaces with gpu semaphores
>
> BUG=skia:
>
> Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1
> Reviewed-on: https://skia-review.googlesource.com/11488
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Forrest Reiling <freiling@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com

Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20063
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
/external/skia/dm/DM.cpp
66366c697853e906d961ae691e2bc5209cdcfa62 15-Jun-2017 Greg Daniel <egdaniel@google.com> Add API for flushing surfaces with gpu semaphores

BUG=skia:

Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1
Reviewed-on: https://skia-review.googlesource.com/11488
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Forrest Reiling <freiling@google.com>
/external/skia/dm/DM.cpp
13b6afd148c6c4f4801969f4bc0cd265a8e74a36 12-Jun-2017 Mike Klein <mtklein@chromium.org> DM: use SkPngEncoder

Change-Id: If1360bee50c8c360e4b1edf09c8a39aa32a59eb9
Reviewed-on: https://skia-review.googlesource.com/19520
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
2048c3ed3e3a5fb3438b0f46d98deaff1c5f5263 26-May-2017 Mike Klein <mtklein@chromium.org> wait for DM status thread to exit on iOS

CQ_INCLUDE_TRYBOTS=skia.primary:Test-iOS-Clang-iPadPro-GPU-GT7800-arm64-Debug,Test-iOS-Clang-iPhone6-GPU-GX6450-arm64-Debug,Test-iOS-Clang-iPhone7-GPU-GT7600-arm64-Debug

Change-Id: I0e7491a6aaad08e969ceaabae49cbda718ea4be8
Reviewed-on: https://skia-review.googlesource.com/18065
Reviewed-by: Stephan Altmueller <stephana@google.com>
/external/skia/dm/DM.cpp
557fbbe05ba48bcc20be684d11fe0edfc24c87ba 23-May-2017 Leon Scroggins III <scroggo@google.com> Add animation support to SkWebpCodec

TBR=reed@google.com
(No change to the public API, but changed a header file)

SkWebpCodec:
- Implement onGetFrameCount, onGetFrameInfo, and onGetRepetitionCount
- Respect the alpha reported by libwebp. Although the spec states that
it is only a hint, the libwebp encoder uses it properly. Respecting
allows us to draw opaque images faster and decode them to 565. This
also matches other SkCodecs (and Chromium).
- onGetPixels:
- Decode the frame requested, recursively decoding required frame if
necessary
- When blending with a prior frame, use SkRasterPipeline

SkCodec:
- Move check for negative index to getFrameInfo
- Reset the colorXform if one is not needed

SkCodecAnimation:
- Add new blend enum, for WebP's (and APNG's) non-blending option

SkFrameHolder:
- New base classes for frames and the owner of the frames, allowing
code sharing between SkWebpCodec and SkGifCodec (particularly for
determining whether a frame has alpha and what frame it depends on)
- When moving items from SkGIFFrameContext, use Skia conventions (i.e.
int instead of unsigned)
- Rename "delay time" to "duration", to match e.g. SkFrameInfo::
fDuration

SkGifImageReader:
- Move pieces to SkFrameHolder, and adapt to changes made in the
process
- Make setAlphaAndRequiredFrame (now on the base class SkFrameHolder)
more general to support webp, and add support for frames that do not
blend
- Change SkGIFFrameContext from a struct to a class, to match how we
use the distinction elsewhere (i.e. struct is a small object with
public fields)
- Rework hasTransparentPixel (now hasTransparency, since it returns true
in some cases where there is not a transparent pixel) to better fit
with the modified setAlphaAndRequiredFrame. Also be more consistent
when there is no transparent pixel but no color map.
- Simplify an if condition that was previously simplified in 2d61e717
but accidentally got reverted in a4db9be6

CodecAnimTest:
- Test new animated webp files
- Rearrange the test to more cleanly print alpha type mismatches for
the first frame

resources:
- webp-animated.webp
- animated webp from Chromium
- blendBG.webp
- new webp file using bits of webp-animated-semitransparent4.webp
from Chromium
- tests required frame and alpha when using the non-blending mode
- frames have the following properties:
- Frame 0: no alpha, fills screen
- Frame 1: alpha, fills screen
- Frame 2: no alpha, fills screen
- Frame 3: alpha, fills screen, blendBG
- Frame 4: no alpha, fills screen, blendBG
- Frame 5: alpha, blendBG
- Frame 6: covers 4, has alpha, blendBG
- also used to test decoding to 565 if the new frame data has alpha
but blends onto an opaque frame

DM.cpp:
- Test animated images to non-native 8888 and unpremul

DMSrcSink.cpp:
- Do not test non-native 8888 decodes to f16 dst
- Test unpremul decodes to f16
- Copy a frame of an animated image prior to drawing, since in unpremul
mode, the DM code will premultiply first.

Bug: skia: 3315
Change-Id: I4e55ae2ee5bc095b37a743bdcfac644be603b980
Reviewed-on: https://skia-review.googlesource.com/16707
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
/external/skia/dm/DM.cpp
59da068d6431d8bfc0137f4e5989bbf08cd01091 09-May-2017 Mike Klein <mtklein@chromium.org> Tune down libpng in DM.

Timing `out/dm --src gm --config srgb -w foo` on my desktop,
- wall time drops from 3.72 -> 2.17 seconds; and
- CPU time drops from 64.9 -> 27.9 seconds.

So again, close to 2x speedup.
(In exchange, the .pngs of our GMs grow from 57M to 73M.)

Change-Id: I6e2e8c8bda6371e857c8db41ca3119402a9056ae
Reviewed-on: https://skia-review.googlesource.com/16000
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
68b8e3d50d0954eb5eeb7f625f06026c7fbd38c1 28-Apr-2017 Matt Sarett <msarett@google.com> Revert "Revert "Delete copyTo(Allocator), hide copyTo() behind flag""

This reverts commit 0122af08f6af0dee490e1a4f35b552377d0d4753.

Reason for revert: Fixed Android callsite

Original change's description:
> Revert "Delete copyTo(Allocator), hide copyTo() behind flag"
>
> This reverts commit d4a338f4d0a0cdc08d7d3668931c60997f0fa971.
>
> Reason for revert: Looks like I missed something I was supposed to delete in Android.
>
> Original change's description:
> > Delete copyTo(Allocator), hide copyTo() behind flag
> >
> > Replace uses of copyTo() in Skia.
> >
> > Bug: skia:6464
> > Change-Id: I921dc53a1c29a5176d18f05741f7c0b5a008e548
> > Reviewed-on: https://skia-review.googlesource.com/14502
> > Commit-Queue: Matt Sarett <msarett@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
> >
>
> TBR=msarett@google.com,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I4d252940cc6a2462b030007055ea6c229471fc6e
> Reviewed-on: https://skia-review.googlesource.com/14602
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>

TBR=msarett@google.com,reviews@skia.org,reed@google.com

Change-Id: I81659a820f79f1958fda23cb62513065b57db99d
Reviewed-on: https://skia-review.googlesource.com/14640
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
/external/skia/dm/DM.cpp
0122af08f6af0dee490e1a4f35b552377d0d4753 27-Apr-2017 Matt Sarett <msarett@google.com> Revert "Delete copyTo(Allocator), hide copyTo() behind flag"

This reverts commit d4a338f4d0a0cdc08d7d3668931c60997f0fa971.

Reason for revert: Looks like I missed something I was supposed to delete in Android.

Original change's description:
> Delete copyTo(Allocator), hide copyTo() behind flag
>
> Replace uses of copyTo() in Skia.
>
> Bug: skia:6464
> Change-Id: I921dc53a1c29a5176d18f05741f7c0b5a008e548
> Reviewed-on: https://skia-review.googlesource.com/14502
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>

TBR=msarett@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I4d252940cc6a2462b030007055ea6c229471fc6e
Reviewed-on: https://skia-review.googlesource.com/14602
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
/external/skia/dm/DM.cpp
d4a338f4d0a0cdc08d7d3668931c60997f0fa971 27-Apr-2017 Matt Sarett <msarett@google.com> Delete copyTo(Allocator), hide copyTo() behind flag

Replace uses of copyTo() in Skia.

Bug: skia:6464
Change-Id: I921dc53a1c29a5176d18f05741f7c0b5a008e548
Reviewed-on: https://skia-review.googlesource.com/14502
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
/external/skia/dm/DM.cpp
4edb5d219eb99aa1e8fbe5e37260d3b34314e54b 17-Apr-2017 Mike Reed <reed@google.com> hide lockpixels api behind flag

guarded by SK_SUPPORT_OBSOLETE_LOCKPIXELS

needs https://codereview.chromium.org/2820873002/# to land first
Bug: skia:6481
Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09

Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09
Reviewed-on: https://skia-review.googlesource.com/13580
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/dm/DM.cpp
45dcc0c42c4059c3b533b3e91d6c7fe67f6eefc7 06-Apr-2017 Mike Klein <mtklein@chromium.org> Fix gather_uninteresting_hashes()

It can crash when the file length is an exact multiple of the page size.

When the file size is not an exact page size multiple,
SkData::MakeFromFileName() (i.e. mmap) happens to fill the rest with \0,
giving us a terminating \0 for free. SkStrSplit() uses this to stop.

When the file size is an exact page size multiple, there's no guaranteed
\0. We might find one on the next page immediately, eventually, or we
might just segfault. Whoops.

To fix, copy to an SkString which ought to plop in a \0 for us.

Change-Id: I51bbfdd85dfbb1c2276249d0255cf1c410ef9999
Reviewed-on: https://skia-review.googlesource.com/11409
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
f3880933092c3226cd7ffd1690fe72c9c0cc376c 24-Mar-2017 Matt Sarett <msarett@google.com> Delete SkColorSpace::ColorSpaceFlags

BUG=skia:

Change-Id: Ia0688876915cd773614ca0c4ccd467cf6e7c603e
Reviewed-on: https://skia-review.googlesource.com/10105
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
/external/skia/dm/DM.cpp
6405e71279e99731f89db69325c6763ec62a98e1 20-Mar-2017 Brian Salomon <bsalomon@google.com> Remove gpu configs that don't have explicit API.

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

Change-Id: I510473cf91d8bee38d1e33424b1ae7b30dc86968
Reviewed-on: https://skia-review.googlesource.com/9871
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
/external/skia/dm/DM.cpp
919cc4562cc615c7f4b4325def1f7454bc8dd724 18-Mar-2017 Mike Klein <mtklein@google.com> Revert "Revert "Add color spin test for SkColorSpaceXformCanvas""

This reverts commit 73e21af21390c2806eb1350253233903808edd6b.

Reason for revert: I will fix the broken bot next week.

Original change's description:
> Revert "Add color spin test for SkColorSpaceXformCanvas"
>
> This reverts commit cb01aec63bcb3dee52afcf3605bcd64166b873c0.
>
> Reason for revert: Breaks Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE
>
> Original change's description:
> > Add color spin test for SkColorSpaceXformCanvas
> >
> > Also changes behavior to treat nullptr srcs as sRGB.
> >
> > Testing locally, it looks like 353 gms have no diffs from 8888.
> > There are 269 diffs - some are fine (gms that do color space stuff)
> > and some are bugs.
> >
> > BUG=skia:
> >
> > Change-Id: I55c2825f4f4b857e0b0a0ec050c6db82ac881492
> > Reviewed-on: https://skia-review.googlesource.com/9738
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Matt Sarett <msarett@google.com>
> >
>
> TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reviews@skia.org
> # Not skipping CQ checks because original CL landed > 1 day ago.
> BUG=skia:
>
> Change-Id: I70bb69f747b863d267494e37a60888a51ab0184c
> Reviewed-on: https://skia-review.googlesource.com/9823
> Reviewed-by: Eric Boren <borenet@google.com>
> Commit-Queue: Eric Boren <borenet@google.com>
>

TBR=borenet@google.com,mtklein@google.com,msarett@google.com,reviews@skia.org,brianosman@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=skia:

Change-Id: I766382e6655f614042cded84f547f9fd5b109fca
Reviewed-on: https://skia-review.googlesource.com/9879
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
/external/skia/dm/DM.cpp
73e21af21390c2806eb1350253233903808edd6b 17-Mar-2017 Eric Boren <borenet@google.com> Revert "Add color spin test for SkColorSpaceXformCanvas"

This reverts commit cb01aec63bcb3dee52afcf3605bcd64166b873c0.

Reason for revert: Breaks Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE

Original change's description:
> Add color spin test for SkColorSpaceXformCanvas
>
> Also changes behavior to treat nullptr srcs as sRGB.
>
> Testing locally, it looks like 353 gms have no diffs from 8888.
> There are 269 diffs - some are fine (gms that do color space stuff)
> and some are bugs.
>
> BUG=skia:
>
> Change-Id: I55c2825f4f4b857e0b0a0ec050c6db82ac881492
> Reviewed-on: https://skia-review.googlesource.com/9738
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>

TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reviews@skia.org
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=skia:

Change-Id: I70bb69f747b863d267494e37a60888a51ab0184c
Reviewed-on: https://skia-review.googlesource.com/9823
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
/external/skia/dm/DM.cpp
cb01aec63bcb3dee52afcf3605bcd64166b873c0 15-Mar-2017 Matt Sarett <msarett@google.com> Add color spin test for SkColorSpaceXformCanvas

Also changes behavior to treat nullptr srcs as sRGB.

Testing locally, it looks like 353 gms have no diffs from 8888.
There are 269 diffs - some are fine (gms that do color space stuff)
and some are bugs.

BUG=skia:

Change-Id: I55c2825f4f4b857e0b0a0ec050c6db82ac881492
Reviewed-on: https://skia-review.googlesource.com/9738
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
/external/skia/dm/DM.cpp
0b83319b7f301145b7fc89d7096ddcea91d4a56b 14-Mar-2017 Hal Canary <halcanary@google.com> SkDynamicMemoryWStream::detachAsStream() returns unique_ptr

https://crrev.com/2747183002 must land first.
Change-Id: I65d1285a24d63c2c2f18662d511dea1c399511e1
Reviewed-on: https://skia-review.googlesource.com/9682
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
/external/skia/dm/DM.cpp
841101d348bbfae2ca44e0a0f267c974d38c9891 10-Mar-2017 Mike Klein <mtklein@chromium.org> SkColorSpaceXformCanvas

TODO:
images
shaders
color filters
image filters
a couple stray color arrays

Change-Id: Ib91639bb0a6a00af737dd5186180011fe5120860
Reviewed-on: https://skia-review.googlesource.com/9529
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
d222830941afae55a687f784480c080f364a8377 02-Mar-2017 Matt Sarett <msarett@google.com> Test sRGB with non-linear blending using new "srgbnl" sink

BUG=skia:

Change-Id: Ief7516c1505f8e447f83121ed4ba75b9fa9ba75b
Reviewed-on: https://skia-review.googlesource.com/8976
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
008b9d80ab9adbf2656eceaf54d11cd15e4dda05 22-Feb-2017 csmartdalton <csmartdalton@google.com> Add the ability to enable/disable GPU path renderers

Adds a bitfield to GrContextOptions that masks out path renderers.
Adds commandline flags support to set this bitfield in tools apps.
Removes GrGLInterfaceRemoveNVPR since we can now accomplish the same
thing in the context options.

BUG=skia:

Change-Id: Icf2a4df36374b3ba2f69ebf0db56e8aedd6cf65f
Reviewed-on: https://skia-review.googlesource.com/8786
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
/external/skia/dm/DM.cpp
e812d496aaa5e5e9f2117de8f442c297c9cb1367 21-Feb-2017 csmartdalton <csmartdalton@google.com> Rename GrContextFactory::ContextOptions to ContextOverrides

Also changes the behavior of these flags to only override their
corresponding context options when set, and to leave them unchanged
when not set.

BUG=skia:

Change-Id: I09f6be09997594fa888d9045dd4901354ef3f880
Reviewed-on: https://skia-review.googlesource.com/8780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
/external/skia/dm/DM.cpp
bae888e652dfe5c2ce840eff7760c8ab7317b7d6 18-Feb-2017 Mike Reed <reed@google.com> hide via-svg until I can fix g3

BUG=skia:

Change-Id: I226194a4db5c9618dd312337bf196d8f21825a12
Reviewed-on: https://skia-review.googlesource.com/8720
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/dm/DM.cpp
f67c45994dedc96eb979e331ab156649847071a4 17-Feb-2017 Mike Reed <reed@google.com> add ViaSVG to dm

BUG=skia:

Change-Id: I52892a0dd466bee6e3abcaa89a373b93493d201f
Reviewed-on: https://skia-review.googlesource.com/8682
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
/external/skia/dm/DM.cpp
77a7a1b57c16c97f056c1e50c03bdc954947778c 07-Feb-2017 Matt Sarett <msarett@google.com> SkColorSpace: remove named API, add gamut API

Reland from: https://skia-review.googlesource.com/c/8021/

BUG=skia:

Change-Id: I18985f130587b15fccbc86b76b2bb5c49ba5ba8a
Reviewed-on: https://skia-review.googlesource.com/8136
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
/external/skia/dm/DM.cpp
1f2fff2544a9dc6a0f169a017d374eca9f04c6b5 07-Feb-2017 Matt Sarett <msarett@google.com> Revert "SkColorSpace: remove named API, add gamut API"

This reverts commit ecaaf6f1c156e5690200322fc2636380c1f63dd8.

Reason for revert: Breaks everything

Original change's description:
> SkColorSpace: remove named API, add gamut API
>
> BUG=skia:
>
> Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6
> Reviewed-on: https://skia-review.googlesource.com/8021
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>

TBR=msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: Ief5a0a4eeabe75a21f7512e23fc15309151066c4
Reviewed-on: https://skia-review.googlesource.com/8127
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
/external/skia/dm/DM.cpp
ecaaf6f1c156e5690200322fc2636380c1f63dd8 06-Feb-2017 Matt Sarett <msarett@google.com> SkColorSpace: remove named API, add gamut API

BUG=skia:

Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6
Reviewed-on: https://skia-review.googlesource.com/8021
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
/external/skia/dm/DM.cpp
be28ee2974474800323ce4fabf62a839018be591 06-Feb-2017 Mike Klein <mtklein@chromium.org> Make iOS main() functions normal.

The weird foo_mains are no longer needed when we build with GN.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm-Debug-iOS

Change-Id: Iae50696741e0dc277d96dda4968a1ae41cb17c8a
Reviewed-on: https://skia-review.googlesource.com/8064
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Stephan Altmueller <stephana@google.com>
/external/skia/dm/DM.cpp
adacaef799455013bf00b85a43237ac8d9471ade 06-Feb-2017 Mike Klein <mtklein@chromium.org> iOS: cd into Documents folder at startup

CQ_INCLUDE_TRYBOTS=skia.primary:Test-iOS-Clang-iPadMini4-GPU-GX6450-arm-Release

Change-Id: I7beadad742bc9444491c7a315a827297a636d70d
Reviewed-on: https://skia-review.googlesource.com/8049
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
6d3b7aaf79b2cbacdf00bafc15ded2dfd2fa000a 30-Jan-2017 Mike Klein <mtklein@chromium.org> gn: iOS packaging script

This is enough to run DM on my iPad.

I've tweaks DM so that it can run as built by both GN and GYP.
When we kill off GYP, all the dm_main() nonsense goes away.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-iOS-Clang-iPadMini4-GPU-GX6450-Arm7-Debug,Build-Mac-Clang-arm64-Debug-GN_iOS

Change-Id: I59176bc203ee3180618b94ac5f9d291e0ad20b62
Reviewed-on: https://skia-review.googlesource.com/7757
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Hal Canary <halcanary@google.com>
/external/skia/dm/DM.cpp
5a523fef68c55b66c542fd12ba877195d9b57c1c 26-Jan-2017 Herb Derby <herb@google.com> Keep valgrind happen by purging caches.

Change-Id: Ic387edb9b5d71110c10c8a40a362ed2853d140f5
Reviewed-on: https://skia-review.googlesource.com/7638
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
/external/skia/dm/DM.cpp
550148ba572acc75e73d3c7d600ea7fa43db55f2 13-Jan-2017 Yuqian Li <liyuqian@google.com> Reland https://skia-review.googlesource.com/c/6091/

The only difference is that we now also put the guard flag
SK_SUPPORT_LEGACY_AAA in SkUserConfig.h. Previously, SkAnalyticEdge.cpp doesn't
get that flag from SkScan.h and that caused many problems.

BUG=skia:
TBR=reed@google.com,caryclark@google.com

Change-Id: I134bb76cebd6fffa712f438076668765321bba3b
Reviewed-on: https://skia-review.googlesource.com/6992
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/dm/DM.cpp
aeef5610d7a3fe4a53fc27b20486da79bf7a949a 13-Jan-2017 Yuqian Li <liyuqian@google.com> Revert "Reland https://skia-review.googlesource.com/c/6091/"

This reverts commit b46fff60bc82fe6f0c64b2241d854a121f7cb5f9.

Reason for revert: possible chromium cc unit tests failure

Change-Id: Ie174c55e4d0fc3ae45854b5897ba26b7ad5a9c13
Reviewed-on: https://skia-review.googlesource.com/6981
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
/external/skia/dm/DM.cpp
b46fff60bc82fe6f0c64b2241d854a121f7cb5f9 12-Jan-2017 Yuqian Li <liyuqian@google.com> Reland https://skia-review.googlesource.com/c/6091/

The only difference is that we now put the guard flag SK_SUPPORT_LEGACY_AAA in
SkUserConfig.h instead of SkScan.h. Previously, SkAnalyticEdge.cpp doesn't get
that flag from SkScan.h and that caused many problems.

BUG=skia:
TBR=reed@google.com,caryclark@google.com

Change-Id: I7b89d3cb64ad71715101d2a5e8e77be3a8a6fa16
Reviewed-on: https://skia-review.googlesource.com/6972
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/dm/DM.cpp
90ee03b0d1778f37448dfd82d1f5cfbbec9f798f 12-Jan-2017 Yuqian Li <liyuqian@google.com> Revert "Implement Analytic AA for General Paths (with Guard against Chrome)"

This reverts commit 89a0e72287e991cfa2f860f92fad545ca59defe1.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Implement Analytic AA for General Paths (with Guard against Chrome)
>
> I've set up a SK_SUPPORT_LEGACY_AAA flag to guard against Chromium layout tests. I also set that flag in this CL so theoretically this CL won't trigger any GM changes. I'll use this to verify my guard, and remove that flag and actually enables concave AAA in a future CL.
>
> When enabled, for most simple concave paths (e.g., rectangle stroke, rrect stroke, sawtooth, stars...), the Analytic AA achieves 1.3x-2x speedup, and they look much prettier. And they probably are the majority in our use cases by number. But they probably are not the majority by time cost; a single complicated path may cost 10x-100x more time to render than a rectangle stroke... For those complicated paths, we fall back to supersampling by default as we're likely to be 1.1-1.2x slower and the quality improvement is not visually significant. However, one can use gSkForceAnalyticAA to disable that fallback.
>
> BUG=skia:
>
> Change-Id: If9549a3acc4a187cfaf7eb51890c148da3083d31
> Reviewed-on: https://skia-review.googlesource.com/6091
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Yuqian Li <liyuqian@google.com>
>

TBR=caryclark@google.com,liyuqian@google.com,reed@google.com
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I13c05aaa1bcb14956bd0fe01bb404e41be75af22
Reviewed-on: https://skia-review.googlesource.com/6961
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
/external/skia/dm/DM.cpp
89a0e72287e991cfa2f860f92fad545ca59defe1 11-Jan-2017 Yuqian Li <liyuqian@google.com> Implement Analytic AA for General Paths (with Guard against Chrome)

I've set up a SK_SUPPORT_LEGACY_AAA flag to guard against Chromium layout tests. I also set that flag in this CL so theoretically this CL won't trigger any GM changes. I'll use this to verify my guard, and remove that flag and actually enables concave AAA in a future CL.

When enabled, for most simple concave paths (e.g., rectangle stroke, rrect stroke, sawtooth, stars...), the Analytic AA achieves 1.3x-2x speedup, and they look much prettier. And they probably are the majority in our use cases by number. But they probably are not the majority by time cost; a single complicated path may cost 10x-100x more time to render than a rectangle stroke... For those complicated paths, we fall back to supersampling by default as we're likely to be 1.1-1.2x slower and the quality improvement is not visually significant. However, one can use gSkForceAnalyticAA to disable that fallback.

BUG=skia:

Change-Id: If9549a3acc4a187cfaf7eb51890c148da3083d31
Reviewed-on: https://skia-review.googlesource.com/6091
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/dm/DM.cpp
c65386ae55555819e321b77fd5a2b25dfcf94c3d 05-Jan-2017 Derek Sollenberger <djsollen@google.com> Remove DMSrcSinkAndroid.

This code involves Skia having knowledge of HWUI internals and
causes problems with various build systems. It is also not
currently being used and is therefore expendable.

Change-Id: I7b6a37fa4c9afcefbc6a957b49e7735da872ff14
Reviewed-on: https://skia-review.googlesource.com/6597
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
/external/skia/dm/DM.cpp
ba62b4ae862a86427ae2370d57d95dc2f5f68dd1 14-Dec-2016 Yuqian Li <liyuqian@google.com> Change FLAGS_analyticAA's default to true

BUG=skia:

Change-Id: I1abf2284ed9dfaa69110c4fe86325c8e4ee43317
Reviewed-on: https://skia-review.googlesource.com/5767
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
/external/skia/dm/DM.cpp
287f6512f34d456b593ea030197925dfc5b15c65 05-Dec-2016 Brian Osman <brianosman@google.com> Add a context stack to Reporter, for better error messages

Currently, just inject the Ganesh context type when running unit tests.
Obviously, we can use this to supply other contextual information around
tests that do many variations of configs, formats, etc...

BUG=skia:

Change-Id: Iab96632a92ec632e4d132bbcc17a91a8dd251e78
Reviewed-on: https://skia-review.googlesource.com/5565
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/dm/DM.cpp
aa2219c69b81b2258862a45cd82cc9fdc06c987a 05-Dec-2016 Brian Osman <brianosman@google.com> In DM, do quick test to reject context by type first

BUG=skia:

Change-Id: Id66a68e47f671cafd7c6128787fbd149faf16c7a
Reviewed-on: https://skia-review.googlesource.com/5576
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/dm/DM.cpp
db6830162eca5b94e61d9825ec93306fc615d204 23-Nov-2016 Hal Canary <halcanary@google.com> SkImageEncoder: simplify API

(re-land 248ff02 & 2cb6cb7, with changes)

- Hide SkImageEncoder class in private header.
- SkImageEncoder::Type becomes SkEncodedImageFormat
- SkEncodedFormat becomes SkEncodedImageFormat
- SkImageEncoder static functions replaced with
single function EncodeImage()
- utility wrappers for EncodeImage() are in
sk_tool_utils.h

TODO: remove link-time registration mechanism.
TODO: clean up clients use of API and flip the flag.
TODO: implement EncodeImage() in chromeium/skia/ext

Change-Id: I47d451e50be4d5c6c130869c7fa7c2857243d9f0
Reviewed-on: https://skia-review.googlesource.com/4909
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-on: https://skia-review.googlesource.com/5186
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
/external/skia/dm/DM.cpp
a2b4bdce8cfd1a91407595a25683ecff982af22e 22-Nov-2016 Hal Canary <halcanary@google.com> Revert 248ff023 & 2cb6cb72

Revert "SkImageEncoder: simplify API"
This reverts commit 248ff02331d7f73ee4b6c5a7eabeae1080c16cd4.
Revert "Fix bug: can't convert nullptr -> bool"
This reverts commit 2cb6cb7218171b357bb5c934f032ba69c7b78401.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5151
NOTRY=true

Change-Id: I5f6414392d6545f74db0b5bb50608d04f053a8ec
Reviewed-on: https://skia-review.googlesource.com/5151
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
/external/skia/dm/DM.cpp
248ff02331d7f73ee4b6c5a7eabeae1080c16cd4 22-Nov-2016 Hal Canary <halcanary@google.com> SkImageEncoder: simplify API

- Hide SkImageEncoder class in private header.
- SkImageEncoder::Type becomes SkEncodedImageFormat
- SkEncodedFormat becomes SkEncodedImageFormat
- SkImageEncoder static functions replaced with
single function EncodeImage()
- utility wrappers for EncodeImage() are in
sk_tool_utils.h

TODO: remove link-time registration mechanism.
TODO: clean up clients use of API and flip the flag.
TODO: implement EncodeImage() in chromeium/skia/ext

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

Change-Id: Ib48b31fdc05cf23cda7f56ebfd67c841c149ce70
Reviewed-on: https://skia-review.googlesource.com/4909
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
/external/skia/dm/DM.cpp
bf111d7bc9ba3857433e30eae27f0272c34ed0fb 08-Nov-2016 Ben Wagner <bungeman@google.com> Move SkOSPath out of include/core.

It is moved to src/utils. It is almost a tool, but has two uses in
src/ports.

The existing SkOSFile.cpp is left empty for the time being since it is
mentioned in Chromium's BUILD.gn for Skia.

Change-Id: I3bb7f7c4214359eb6ab906bfe76737d20bf1d6c7
Reviewed-on: https://skia-review.googlesource.com/4536
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
/external/skia/dm/DM.cpp
145dbcd165d9d27298eb8888bc240e2d06a95464 03-Nov-2016 Ben Wagner <bungeman@google.com> Remove SkAutoTDelete.

Replace with std::unique_ptr.

Change-Id: I5806cfbb30515fcb20e5e66ce13fb5f3b8728176
Reviewed-on: https://skia-review.googlesource.com/4381
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
7039f74a8b1d39b9c44fd357912ce66e6bc9fd25 01-Nov-2016 Brian Osman <brianosman@google.com> Remove SkImageInfoIsGammaCorrect, etc...

Our internal definition is (and will continue to be) that anything with
a color space is gamma correct. F16 is irrelevant (whether or not we
choose to support untagged F16). This makes these helpers less than
helpful, and lets us remove them from (public) API.

API change is just removal (of unused functions).

TBR=reed@google.com

BUG=skia:

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

Change-Id: Ia84a423548bfee14a3ba4a43d6d5b8c4686fb5ff
Reviewed-on: https://skia-review.googlesource.com/4228
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
a9e9bfc6e40894c0447c044a380c74061cb9e15e 01-Nov-2016 Matt Sarett <msarett@google.com> Delete qcms

This was always intended to be a temporary dependency to use for
testing. It has served its purpose.

Also, this has already been dropped (accidentally, I think) by
the new GN build.

TBR=reed@google.com

BUG=skia:

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

Change-Id: Ic72ee08bbfaf86ed86a4122fd38be2921eb1327e
Reviewed-on: https://skia-review.googlesource.com/4220
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
/external/skia/dm/DM.cpp
85c7fe8d6d87850aed83599864b63dca37af5fcf 25-Oct-2016 Hal Canary <halcanary@google.com> DM: JSON Debug Sink

Currently, the following GMs crash the debug canvas:
~dont_clip_to_layer
~imageblur
~imagefilterscropped
~pictureimagefilter
~savelayer_lcdtext
~textfilter_image
// TODO(halcanary): fix this.

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

Change-Id: Ieed3502119cd639fe345f3a41d436d5e39f3bdf1
Reviewed-on: https://skia-review.googlesource.com/3742
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
/external/skia/dm/DM.cpp
3cc2d2050983bd3bbab4bf4cc714fa4d7199c959 24-Oct-2016 Mike Klein <mtklein@chromium.org> Print what crashed DM on Android too.

This doesn't print a backtrace, but it's better than nothing.
By preserving the original signal handler and calling into that, we keep the Android system stack trace, visible in logcat, the "dump log" step on bots.

Tested locally on Mac and Android by making an arbitrary GM segfault.

BUG=skia:5876

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

Change-Id: Ia7a962ca50e09d370423a6106033e34c47d7643d
Reviewed-on: https://skia-review.googlesource.com/3860
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
19b91531e912283d237435d94516575b28713cba 24-Oct-2016 scroggo <scroggo@chromium.org> Add support for multiple frames in SkCodec

Add an interface to decode frames beyond the first in SkCodec, and
add an implementation for SkGifCodec.

Add getFrameData to SkCodec. This method reads ahead in the stream
to return a vector containing meta data about each frame in the image.
This is not required in order to decode frames beyond the first, but
it allows a client to learn extra information:
- how long the frame should be displayed
- whether a frame should be blended with a prior frame, allowing the
client to provide the prior frame to speed up decoding

Add a new fields to SkCodec::Options:
- fFrameIndex
- fHasPriorFrame

The API is designed so that SkCodec never caches frames. If a
client wants a frame beyond the first, they specify the frame in
Options.fFrameIndex. If the client does not have the
frame's required frame (the frame that this frame must be blended on
top of) cached, they pass false for
Options.fHasPriorFrame. Unless the frame is
independent, the codec will then recursively decode all frames
necessary to decode fFrameIndex. If the client has the required frame
cached, they can put it in the dst they pass to the codec, and the
codec will only draw fFrameIndex onto it.

Replace SkGifCodec's scanline decoding support with progressive
decoding, and update the tests accordingly.

Implement new APIs in SkGifCodec. Instead of using gif_lib, use
GIFImageReader, imported from Chromium (along with its copyright
headers) with the following changes:
- SkGifCodec is now the client
- Replace blink types
- Combine GIFColorMap::buildTable and ::getTable into a method that
creates and returns an SkColorTable
- Input comes from an SkStream, instead of a SegmentReader. Add
SkStreamBuffer, which buffers the (potentially partial) stream in
order to decode progressively.
(FIXME: This requires copying data that previously was read directly
from the SegmentReader. Does this hurt performance? If so, can we
fix it?)
- Remove UMA code
- Instead of reporting screen width and height to the client, allow the
client to query for it
- Fail earlier if the first frame AND screen have size of zero
- Compute required previous frame when adding a new one
- Move GIFParseQuery from GIFImageDecoder to GIFImageReader
- Allow parsing up to a specific frame (to skip parsing the rest of the
stream if a client only wants the first frame)
- Compute whether the first frame has alpha and supports index 8, to
create the SkImageInfo. This happens before reporting that the size
has been decoded.

Add GIFImageDecoder::haveDecodedRow to SkGifCodec, imported from
Chromium (along with its copyright header), with the following changes:
- Add support for sampling
- Use the swizzler
- Keep track of the rows decoded
- Do *not* keep track of whether we've seen alpha

Remove SkCodec::kOutOfOrder_SkScanlineOrder, which was only used by GIF
scanline decoding.

Call onRewind even if there is no stream (SkGifCodec needs to clear its
decoded state so it will decode from the beginning).

Add a method to SkSwizzler to access the offset into the dst, taking
subsetting into account.

Add a GM that animates a GIF.
Add tests for the new APIs.

*** Behavior changes:
* Previously, we reported that an image with a subset frame and no transparent
index was opaque and used the background index (if present) to fill the
background. This is necessary in order to support index 8, but it does not
match viewers/browsers I have seen. Examples:
- Chromium and Gimp render the background transparent
- Firefox, Safari, Linux Image Viewer, Safari Preview clip to the frame (for
a single frame image)
This CL matches Chromium's behavior and renders the background transparent.
This allows us to have consistent behavior across products and simplifies
the code (relative to what we would have to do to continue the old behavior
on Android). It also means that we will no longer support index 8 for some
GIFs.
* Stop checking for GIFSTAMP - all GIFs should be either 89a or 87a.
This matches Chromium. I suspect that bugs would have been reported if valid
GIFs started with "GIFVER" instead of "GIF89a" or "GIF87a" (but did not decode
in Chromium).

*** Future work not included in this CL:
* Move some checks out of haveDecodedRow, since they are the same for the
entire frame e.g.
- intersecting the frameRect with the full image size
- whether there is a color table
* Change when we write transparent pixels
- In some cases, Chromium deemed this unnecessary, but I suspect it is slower
than the fallback case. There will continue to be cases where we should
*not* write them, but for e.g. the first pass where we have already
cleared to transparent (which we may also be able to skip) writing the
transparent pixels will not make anything incorrect.
* Report color type and alpha type per frame
- Depending on alpha values, disposal methods, frame rects, etc, subsequent
frames may have different properties than the first.
* Skip copies of the encoded data
- We copy the encoded data in case the stream is one that cannot be rewound,
so we can parse and then decode (possibly not immediately). For some input
streams, this is unnecessary.
- I was concerned this cause a performance regression, but on average the
new code is faster than the old for the images I tested [1].
- It may cause a performance regression for Chromium, though, where we can
always move back in the stream, so this should be addressed.

Design doc:
https://docs.google.com/a/google.com/document/d/12Qhf9T92MWfdWujQwCIjhCO3sw6pTJB5pJBwDM1T7Kc/

[1] https://docs.google.com/a/google.com/spreadsheets/d/19V-t9BfbFw5eiwBTKA1qOBkZbchjlTC5EIz6HFy-6RI/

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

Review-Url: https://codereview.chromium.org/2045293002
/external/skia/dm/DM.cpp
526972ecb5411b84ba2f5e20252f178f9ee2151f 24-Oct-2016 Brian Osman <brianosman@google.com> Rename all color space factories from New* to Make*

Matches our naming convention for all other types - factories that
return sk_sp (or any type that intelligently manages its own
lifetime) are named Make.

Previous factories are still around, assuming
SK_SUPPORT_LEGACY_COLOR_SPACE_FACTORIES is defined. Enable that
define for Android, etc.

See also: https://codereview.chromium.org/2442053002/

BUG=skia:

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

Change-Id: Iaea9376490736b494e8ffc820831f052bbe1478d
Reviewed-on: https://skia-review.googlesource.com/3822
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
/external/skia/dm/DM.cpp
7c602de058c6332dfd92b70a3d05d4a3c401a3ae 13-Oct-2016 raftias <raftias@google.com> Removed makeLinearGamma() from the public API for SkColorSpace

It will now reside in SkColorSpace_Base. Future work for SkColorSpace
will cause this function to not be desirable or sensible to call on
all SkColorSpaces. Call sites were changed to make a kSRGBLinear_Named
instead of kSRGB_Named -> makeLinearGamma() (the majority of cases),
and if that was not possible, SkColorSpace_Base::makeLinearGamma()
was called instead.

TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2412613005

Review-Url: https://codereview.chromium.org/2412613005
/external/skia/dm/DM.cpp
511f2d79bf6ea0ee858a3468d3aa8dcbfca58648 04-Oct-2016 Mike Klein <mtklein@chromium.org> Make global use-analytic-AA bit threadsafe.

I also had to cut it down to just a global atomic bool... as a field in a global singleton accessed through instance(), it's very hard to make threadsafe.

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-TSAN-Trybot

BUG=skia:

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

Change-Id: If80be987906dd521fbe644d1d0d577009f06d0e3
Reviewed-on: https://skia-review.googlesource.com/2937
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/dm/DM.cpp
38911a7cb53474575e1cd1cb545902b50ee00889 04-Oct-2016 liyuqian <liyuqian@google.com> Resubmit issue 2221103002 to fix the iOS build by declaring the flag in
SkCommonFlags.h

TBR=reed@google.com,caryclark@google.com

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

Review-Url: https://codereview.chromium.org/2393643002
/external/skia/dm/DM.cpp
d36baa7a4a5ae3cc94cc4a45379f55658f80c0a6 04-Oct-2016 stephana <stephana@google.com> Revert of Analytic AntiAlias for Convex Shapes (patchset #14 id:260001 of https://codereview.chromium.org/2221103002/ )

Reason for revert:
Breaks iOS build.

Original issue's description:
> Implement AnalyticAA for convex shapes.
>
> Design doc: go/analyticAA
>
> A performance test can be found here: https://docs.google.com/a/google.com/spreadsheets/d/1n9LSjFzrQzx0hovFddWey0GSMXNRjl1oFuSypMlHWZk/edit?usp=sharing
>
> Our best case is filling big triangles, which according to our experiment has ~2.9x speedup. Our worst case is filling small ovals/circles, which has a ~1.06x slowdown.
>
> To see how our new algorithm changes the DM images, see: https://x20web.corp.google.com/~liyuqian/dmdiff/index.html
> The most significant changes are in convexpaths and analytic_antialias_convex
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2221103002
>
> Committed: https://skia.googlesource.com/skia/+/7795822807478143120c33228b68d2ab3918af2c

TBR=reed@google.com,caryclark@google.com,liyuqian@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2388213003
/external/skia/dm/DM.cpp
7795822807478143120c33228b68d2ab3918af2c 04-Oct-2016 liyuqian <liyuqian@google.com> Implement AnalyticAA for convex shapes.

Design doc: go/analyticAA

A performance test can be found here: https://docs.google.com/a/google.com/spreadsheets/d/1n9LSjFzrQzx0hovFddWey0GSMXNRjl1oFuSypMlHWZk/edit?usp=sharing

Our best case is filling big triangles, which according to our experiment has ~2.9x speedup. Our worst case is filling small ovals/circles, which has a ~1.06x slowdown.

To see how our new algorithm changes the DM images, see: https://x20web.corp.google.com/~liyuqian/dmdiff/index.html
The most significant changes are in convexpaths and analytic_antialias_convex

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

Review-Url: https://codereview.chromium.org/2221103002
/external/skia/dm/DM.cpp
95573e4865c913a01571b17fb88c0450b1aa3ca7 14-Sep-2016 fmalita <fmalita@chromium.org> Fix SVG flag iOS linking

TBR=mtklein@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2344533002

Review-Url: https://codereview.chromium.org/2344533002
/external/skia/dm/DM.cpp
6270e558c31b75d02db6f598e93f2e3b701ccb7f 13-Sep-2016 csmartdalton <csmartdalton@google.com> Add ContextOptions field to SkCommandLineConfigGpu

Reduces duplicate code by computing the ContextOptions in one spot.

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

Review-Url: https://codereview.chromium.org/2337163002
/external/skia/dm/DM.cpp
54dc4878b02765efea39e68b218df1e4bfff4b88 13-Sep-2016 reed <reed@google.com> add pipecanvas

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

Review-Url: https://codereview.chromium.org/2201323003
/external/skia/dm/DM.cpp
42943c8aa9c611c18ad0f1a30a27669f3d82239c 12-Sep-2016 reed <reed@google.com> change SkStreams to work with sk_sp<SkData> instead of SkData*

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

Review-Url: https://codereview.chromium.org/2333713002
/external/skia/dm/DM.cpp
0e22eb8e6efc7d7ab7a601ba555947916d139906 30-Aug-2016 brianosman <brianosman@google.com> Some tests around surface creation and snapshotting with color space

Verify the rules that we're converging on for surfaces:
- For 8888, we only support sRGB-like gamma, or no color space at all.
- For F16, we require a color space, with linear gamma.
- For all other formats, we do not support color spaces.

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

Review-Url: https://codereview.chromium.org/2270823002
/external/skia/dm/DM.cpp
9c5052f16b249d2b7674ea86bd24ed0038ccc61f 06-Aug-2016 mtklein <mtklein@chromium.org> SkLite*

SkLiteRecorder, a new SkCanvas, fills out SkLiteDL, a new SkDrawable.

This SkDrawable is a display list similar to SkRecord and SkBigPicture / SkRecordedDrawable, but with a few new design points inspired by Android and slimming paint:

1) SkLiteDL is structured as one big contiguous array rather than the two layer structure of SkRecord. This trades away flexibility and large-op-count performance for better data locality for small to medium size pictures.

2) We keep a global freelist of SkLiteDLs, both reusing the SkLiteDL struct itself and its contiguous byte array. This keeps the expected number of mallocs per display list allocation <1 (really, ~0) for cyclical use cases.

These two together mean recording is faster. Measuring against the code we use at head, SkLiteRecorder trends about ~3x faster across various size pictures, matching speed at 0 draws and beating the special-case 1-draw pictures we have today. (I.e. we won't need those special case implementations anymore, because they're slower than this new generic code.) This new strategy records 10 drawRects() in about the same time the old strategy took for 2.

This strategy stays the winner until at least 500 drawRect()s on my laptop, where I stopped checking.

A simpler alternative to freelisting is also possible (but not implemented here), where we allow the client to manually reset() an SkLiteDL for reuse when its refcnt is 1. That's essentially what we're doing with the freelist, except tracking what's available for reuse globally instead of making the client do it.

This code is not fully capable yet, but most of the key design points are there. The internal structure of SkLiteDL is the area I expect to be most volatile (anything involving Op), but its interface and the whole of SkLiteRecorder ought to be just about done.

You can run nanobench --match picture_overhead as a demo. Everything it exercises is fully fleshed out, so what it tests is an apples-to-apples comparison as far as recording costs go. I have not yet compared playback performance.

It should be simple to wrap this into an SkPicture subclass if we want.

I won't start proposing we replace anything old with anything new quite yet until I have more ducks in a row, but this does look pretty promising (similar to the SkRecord over old SkPicture change a couple years ago) and I'd like to land, experiment, iterate, especially with an eye toward Android.

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

Review-Url: https://codereview.chromium.org/2213333002
/external/skia/dm/DM.cpp
b8d1aac87a6e3821c7ed435a17a550e6e87d2044 04-Aug-2016 msarett <msarett@google.com> Create a separate src for colorspace tests

This will allow me to run these tests in sRGB mode, while
leaving most of the image tests disabled.

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

Review-Url: https://codereview.chromium.org/2206953006
/external/skia/dm/DM.cpp
a2b9fdfe0b2dd3408064b7cfd1bf8677eaf06491 04-Aug-2016 fmalita <fmalita@chromium.org> Add an SVG DM source

R=mtklein@google.com,robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2209593004

Review-Url: https://codereview.chromium.org/2209593004
/external/skia/dm/DM.cpp
38d909ec2875f79952de08f36adfaac5680d2c53 02-Aug-2016 bungeman <bungeman@google.com> Move off SK_SUPPORT_LEGACY_DATA_FACTORIES.

This moves Skia code off of SK_SUPPORT_LEGACY_DATA_FACTORIES.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206633004

Review-Url: https://codereview.chromium.org/2206633004
/external/skia/dm/DM.cpp
e0d362929d6569e8737d80dead791c640390e819 29-Jul-2016 csmartdalton <csmartdalton@google.com> Add test configs for instanced rendering

Adds the following configs and enables them on select bots:

glinst, glinst4, glinstdit4, glinst16, glinstdit16,
esinst, esinst4, esinstdit4

Makes general changes to GrContextOptions, GrCaps, etc. to facilitate
this.

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

Review-Url: https://codereview.chromium.org/2182783004
/external/skia/dm/DM.cpp
50ce1f28ffede3fa3e38d330d4114ee52b387848 29-Jul-2016 msarett <msarett@google.com> Add color space xform support to SkJpegCodec (includes F16!)

Also changes SkColorXform to support:
RGBA->RGBA
RGBA->BGRA

Instead of:
RGBA->SkPMColor

TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2174493002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Committed: https://skia.googlesource.com/skia/+/73d55332e2846dd05e9efdaa2f017bcc3872884b
Review-Url: https://codereview.chromium.org/2174493002
/external/skia/dm/DM.cpp
39979d8c6b97889f600a212cfc9b063360f3de2f 29-Jul-2016 msarett <msarett@google.com> Revert of Add color space xform support to SkJpegCodec (includes F16!) (patchset #9 id:260001 of https://codereview.chromium.org/2174493002/ )

Reason for revert:
Breaking MSAN

Original issue's description:
> Add color space xform support to SkJpegCodec (includes F16!)
>
> Also changes SkColorXform to support:
> RGBA->RGBA
> RGBA->BGRA
>
> Instead of:
> RGBA->SkPMColor
>
> TBR=reed@google.com
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2174493002
> CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/73d55332e2846dd05e9efdaa2f017bcc3872884b

TBR=mtklein@google.com,reed@google.com,herb@google.com,brianosman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2195523002
/external/skia/dm/DM.cpp
73d55332e2846dd05e9efdaa2f017bcc3872884b 29-Jul-2016 msarett <msarett@google.com> Add color space xform support to SkJpegCodec (includes F16!)

Also changes SkColorXform to support:
RGBA->RGBA
RGBA->BGRA

Instead of:
RGBA->SkPMColor

TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2174493002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2174493002
/external/skia/dm/DM.cpp
25c81d4e651b43b8217c365c87d530036529a673 27-Jul-2016 mtklein <mtklein@chromium.org> GN: dm

This builds, links, and runs on Linux. Have not tried Mac.

I've tested is_debug={true,false} and is_component_build.
It's neat that the component build DM works, but it's also an indication I've missed an essential flag or two... it shouldn't work. :)

The GPU backend isn't working yet, but all the software configurations I've tried look good.

This fleshes out all the other parts of SkCodec too... I noticed we weren't able to decode gifs or webp.

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

Review-Url: https://codereview.chromium.org/2188643002
/external/skia/dm/DM.cpp
efded51cd8122c1360717161d3455f2a48a37bc0 26-Jul-2016 brianosman <brianosman@google.com> Always supply a color space (sRGB for now) with F16

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

Review-Url: https://codereview.chromium.org/2177193004
/external/skia/dm/DM.cpp
0f7748ab388c3a07b71e41d8042313b6744f3cae 26-Jul-2016 mtklein <mtklein@chromium.org> DM: print which task caused the crash.

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

Review-Url: https://codereview.chromium.org/2177843003
/external/skia/dm/DM.cpp
a1ce2163906eeb1dd5c543215c25cea856eda6cb 22-Jul-2016 mtklein <mtklein@chromium.org> DM: don't redirect stderr to verbose.log

verbose.log is currently tricky to get to, so it's hurting more than it
helps to direct stderr there.

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

Review-Url: https://codereview.chromium.org/2178583002
/external/skia/dm/DM.cpp
9ce3a543c92a73e6daca420defc042886b3f2019 15-Jul-2016 msarett <msarett@google.com> Add capability for SkColorXform to output half floats

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147763002
CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2147763002
/external/skia/dm/DM.cpp
babc3de2ce7c2f7b32b1b6b9f36d2ac4a4d8dee1 08-Jul-2016 reed <reed@google.com> deferred canvas

tries to eliminate unneeded clipRects and concats (and their associated save/restores).

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

Review-Url: https://codereview.chromium.org/2120333002
/external/skia/dm/DM.cpp
db197a54b562d92a9da2f849e780aa327e1991ca 21-Jun-2016 msarett <msarett@google.com> Fix Mac clang linker

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

Review-Url: https://codereview.chromium.org/2077353006
/external/skia/dm/DM.cpp
52ede1d905728cdcaa98db1e4a33724f5a85c62d 20-Jun-2016 brianosman <brianosman@google.com> More removal of SkColorProfileType...

Scrub GMs. Remove the gDefaultProfile thing (it's unused now), along with
the command line flag that was setting it in DM and nanobench.

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

Committed: https://skia.googlesource.com/skia/+/944876f2745a62a839e49275daf93a0329372e67
Review-Url: https://codereview.chromium.org/2071393002
/external/skia/dm/DM.cpp
d2809573deb7b99e764f7f71fe34a5b5322df0b2 20-Jun-2016 msarett <msarett@google.com> Support sRGB dsts in opt code

201295.jpg on HP z620 (300x280)

QCMS Xform 0.418 ms
Skia NEW Xform 0.378 ms

Vs QCMS 1.11x

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2078623002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2078623002
/external/skia/dm/DM.cpp
802acec1876bb647aaab1bbcfd97748bba54da8f 18-Jun-2016 egdaniel <egdaniel@google.com> Revert of More removal of SkColorProfileType... (patchset #2 id:20001 of https://codereview.chromium.org/2071393002/ )

Reason for revert:
This was still used in chrome

Original issue's description:
> More removal of SkColorProfileType...
>
> Scrub GMs. Remove the gDefaultProfile thing (it's unused now), along with
> the command line flag that was setting it in DM and nanobench.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2071393002
>
> Committed: https://skia.googlesource.com/skia/+/944876f2745a62a839e49275daf93a0329372e67

TBR=msarett@google.com,reed@google.com,bsalomon@google.com,brianosman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2074103004
/external/skia/dm/DM.cpp
944876f2745a62a839e49275daf93a0329372e67 17-Jun-2016 brianosman <brianosman@google.com> More removal of SkColorProfileType...

Scrub GMs. Remove the gDefaultProfile thing (it's unused now), along with
the command line flag that was setting it in DM and nanobench.

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

Review-Url: https://codereview.chromium.org/2071393002
/external/skia/dm/DM.cpp
b109b8c5ec40a7dd85a0a2951a1f98fa63b805aa 16-Jun-2016 brianosman <brianosman@google.com> Lots of progress on switching to SkColorSpace rather than SkColorProfileType

Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld).

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

Committed: https://skia.googlesource.com/skia/+/6a61a875467646f8dbc37cfecf49e12d1f475170
Review-Url: https://codereview.chromium.org/2069173002
/external/skia/dm/DM.cpp
ab8241880d09eb1774b4993ca6df048a27b7020c 16-Jun-2016 brianosman <brianosman@google.com> Revert of Lots of progress switching to SkColorSpace rather than SkColorProfileType (patchset #10 id:180001 of https://codereview.chromium.org/2069173002/ )

Reason for revert:
Mac crashes in GrUploadPixmapToTexture

Original issue's description:
> Lots of progress on switching to SkColorSpace rather than SkColorProfileType
>
> Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld).
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002
>
> Committed: https://skia.googlesource.com/skia/+/6a61a875467646f8dbc37cfecf49e12d1f475170

TBR=reed@google.com,herb@google.com,msarett@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2072813002
/external/skia/dm/DM.cpp
6a61a875467646f8dbc37cfecf49e12d1f475170 16-Jun-2016 brianosman <brianosman@google.com> Lots of progress on switching to SkColorSpace rather than SkColorProfileType

Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld).

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

Review-Url: https://codereview.chromium.org/2069173002
/external/skia/dm/DM.cpp
f10637f2795b147751ef413237389d230b869360 10-Jun-2016 mtklein <mtklein@chromium.org> Type-erase SkAutoMutexAcquire and SkAutoExclusive.

This is purely for convenience, to not need to write the lock type
in the guard anymore. This should all inline away.

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

Review-Url: https://codereview.chromium.org/2055023003
/external/skia/dm/DM.cpp
5b64dab5bcb1823d465be1833db1f716f9b903e5 09-Jun-2016 mtklein <mtklein@chromium.org> better exclusion for stack traces

Instead of two synchronization systems (in_signal_handler, gMutex),
we can just use one. This simplifies the signal handler logic to:
- first thread through grabs the lock, prints what's running and a stack trace,
then exits
- all other threads just sit waiting on that lock until exit kills them

Previously I think all threads were racing to exit, which can kill the process
before the printing thread is done. That truncated the output, which is dumb.

Plus...
refactor slightly so that crash_handler() shows up at the top of the stack
trace rather than some odd name for a lambda inside setup_crash_handler().

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

Review-Url: https://codereview.chromium.org/2051863002
/external/skia/dm/DM.cpp
4dbbd04314cc0606f8d3bafe515c97e52c180f73 08-Jun-2016 halcanary <halcanary@google.com> SkLeanWindows.h: #include "Windows.h" fewer places

$ git grep -l '<windows.h>' include src
include/private/SkLeanWindows.h

$ git grep -l SkLeanWindows.h | grep '\.h$'
include/ports/SkTypeface_win.h
include/utils/win/SkHRESULT.h
include/utils/win/SkTScopedComPtr.h
include/views/SkEvent.h
src/core/SkMathPriv.h
src/ports/SkTypeface_win_dw.h
src/utils/SkThreadUtils_win.h
src/utils/win/SkWGL.h

The same for `#include <intrin.h>` that was found in SkMath.h.
Those functions that needed it are moved to SkMathPriv.h.

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

CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_chromium_compile_dbg_ng,win_chromium_compile_rel_ng

Review-Url: https://codereview.chromium.org/2041943002
/external/skia/dm/DM.cpp
469f1c503d52e47322d4b83683d0d8a5d98380c4 06-Jun-2016 msarett <msarett@google.com> Use SK_TEST_QCMS to mark qcms test code

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

Review-Url: https://codereview.chromium.org/2031053005
/external/skia/dm/DM.cpp
45420a945cfce1b83da954ab5fcb63516f646c0f 02-Jun-2016 halcanary <halcanary@google.com> SkMultiPictureDocument & SkMultiPictureDocumentReader

also, a new DM::Src.

motivation: To be used to test the printing pipeline in Chromium.

BUG=skia:5370

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

Review-Url: https://codereview.chromium.org/2023593002
/external/skia/dm/DM.cpp
9876ac5b3016e5353c072378ac1545a0a2270757 01-Jun-2016 msarett <msarett@google.com> Create SkColorSpaceXform to handle color conversions

Also adds testing of qcms color correction, so we can compare
SkColorSpaceXform outputs to qcms outputs.

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

Committed: https://skia.googlesource.com/skia/+/740cc88ee3d63c75e52d31238f2a32600cc57a8c

Review-Url: https://codereview.chromium.org/1952063002
/external/skia/dm/DM.cpp
4a603fc591dcd36b3cb47344c244ecbbbaf179f4 01-Jun-2016 msarett <msarett@google.com> Revert of Create SkColorSpaceXform to handle color conversions (patchset #10 id:260001 of https://codereview.chromium.org/1952063002/ )

Reason for revert:
Google3 can't find qcms

Original issue's description:
> Create SkColorSpaceXform to handle color conversions
>
> Also adds testing of qcms color correction, so we can compare
> SkColorSpaceXform outputs to qcms outputs.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1952063002
>
> Committed: https://skia.googlesource.com/skia/+/740cc88ee3d63c75e52d31238f2a32600cc57a8c

TBR=reed@google.com,scroggo@google.com,mtklein@google.com,herb@google.com,brianosman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2023093004
/external/skia/dm/DM.cpp
740cc88ee3d63c75e52d31238f2a32600cc57a8c 01-Jun-2016 msarett <msarett@google.com> Create SkColorSpaceXform to handle color conversions

Also adds testing of qcms color correction, so we can compare
SkColorSpaceXform outputs to qcms outputs.

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

Review-Url: https://codereview.chromium.org/1952063002
/external/skia/dm/DM.cpp
ee6a9919a362e16c1d84a870ce867d1ad7b8a141 31-May-2016 mboc <mboc@opera.com> SkTypeface::MakeFromName to take SkFontStyle.

SkTypeface::MakeFromName currently takes SkTypeface::Style,
which is quite limited. This starts the transition to this
function taking SkFontStyle instead.

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

TBR=reed
He said it sounded like a good idea.

Review-Url: https://codereview.chromium.org/1818043002
/external/skia/dm/DM.cpp
ca1ec03c5c8db26e07a931415e9592d8e1966da0 27-May-2016 herb <herb@google.com> Move forceSRGB to SkCommonFlags.

This fixes a duplicate symbol problem with the iOS build.

Add common forceSRGB flag.

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

Review-Url: https://codereview.chromium.org/2019073002
/external/skia/dm/DM.cpp
3f9960949cba16b3a59b72f7b9833d4624044d6d 27-May-2016 herb <herb@google.com> Add forceSRGB flag to dm.

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

Review-Url: https://codereview.chromium.org/2011333002
/external/skia/dm/DM.cpp
888dc16684da2158702639be2023f998b7c27f66 23-May-2016 msarett <msarett@google.com> Test color correction in DM

This will allow me to test and visualize some assumptions
on parsing and applying color profiles. Also, it should
help me find and fix bugs.

This is certainly not an optimized implementation, and, as
far as I know, it doesn't take any shortcuts to improve
performance. We'll probably want to do both of these
once we know where it fits in the pipeline.

Right now this test is only run on an arbitrary set of ~100
images from the top 10k skps. I'll continue to add more
"interesting" images and probably tweak the code as
necessary.

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

Review-Url: https://codereview.chromium.org/1995233003
/external/skia/dm/DM.cpp
f2c96a2a6fa22c674083db701d15702636f9d5fc 20-May-2016 scroggo <scroggo@chromium.org> Only decode opaque to premul in DM image

Previously, we would test decoding an opaque SkCodec to all three:
kUnpremul,
kPremul,
kOpaque

The image should look the same in all three cases. We already test for
that in CodecTest [1], where we require that the result matches exactly.
CodecTest runs on a smaller set of images, but it covers a variety of
opaque images. No need to test on all opaque images.

Running locally on my Mac laptop, the following command:

dm --src image --images resources/

dropped from:
5932 srcs
11.2s

to:

3544 srcs
6.69s

for a 40% speedup.

BUG=skia:5307

[1] https://skia.googlesource.com/skia/+/master/tests/CodecTest.cpp#119
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1999593003

Review-Url: https://codereview.chromium.org/1999593003
/external/skia/dm/DM.cpp
9366aff1fa1ab8af1cddfc9a32b3aaa5ae2dd143 20-May-2016 scroggo <scroggo@chromium.org> Stop creating CodecSrcs with unused scale

Only JPEG and WEBP support native scaling, so only create a CodecSrc
with a scale for those types.

If I run

dm --src image --images resources

this cuts down the number of Srcs from 11063 to 8032. All of these
trimmed Srcs would have failed quickly for each Sink (3 Sinks with the
above flags), but this will avoid creating them.

It drops the runtime on my mac from 13.2s to 11.4s, for about a 14%
speedup.

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

Review-Url: https://codereview.chromium.org/1999103002
/external/skia/dm/DM.cpp
24a9bd711a74450d7c76c504acbadef384293dfc 20-May-2016 scroggo <scroggo@chromium.org> Reduce the number of BRDSrcs run in DM

Testing to e.g. Index8 is useful, but not usefully different across
all sampleSizes and Modes. (Same for Gray.) Drop several Srcs.

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

Review-Url: https://codereview.chromium.org/1990173003
/external/skia/dm/DM.cpp
d1227a7417922ce26252d55815d0d1e98f0eb070 18-May-2016 msarett <msarett@google.com> Delete SkBitmapRegionCanvas

This was an approach we considered for implementing Android's
BitmapRegionDecoder.

It was useful for testing and comparison, but now is no longer worth
maintaining and testing.

The approach to subset/scaled decodes (clipped decode, then scale)
may be worth reconsidering at some point.

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

Review-Url: https://codereview.chromium.org/1990543002
/external/skia/dm/DM.cpp
12e2f505696f283cc07ce8242e814263dd9e0950 16-May-2016 scroggo <scroggo@chromium.org> Only run kStripe_Mode on JPEGs

It was designed to test code in libjpeg-turbo. Skipping scanlines is
tested more generally in other tests.

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

Review-Url: https://codereview.chromium.org/1978013002
/external/skia/dm/DM.cpp
f8dc9df9ab0a90b74d56df9583752a1c38ee20f4 16-May-2016 scroggo <scroggo@chromium.org> Drop AndroidCodecSrc::kDivisor_Mode

This is redundant with BRD tests.

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

Review-Url: https://codereview.chromium.org/1976303002
/external/skia/dm/DM.cpp
13b9c95295f4c5732e34574789e721a6bc08f7b4 12-May-2016 bungeman <bungeman@google.com> Move SkTypeface to sk_sp.

Committed: https://skia.googlesource.com/skia/+/6296da736fbf40aae881650c239420f64e576c3f
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1933393002

Review-Url: https://codereview.chromium.org/1933393002
/external/skia/dm/DM.cpp
9a9a7b29e5e5916a7b6453cd124ca437f14b9da4 12-May-2016 scroggo <scroggo@google.com> Revert of Move SkTypeface to sk_sp. (patchset #5 id:80001 of https://codereview.chromium.org/1933393002/ )

Reason for revert:
fontmgr_iterAndroid failing to draw emoji. E.g. https://gold.skia.org/search2?blame=6296da736fbf40aae881650c239420f64e576c3f&unt=true&head=true&query=source_type%3Dgm

Original issue's description:
> Move SkTypeface to sk_sp.
>
> Committed: https://skia.googlesource.com/skia/+/6296da736fbf40aae881650c239420f64e576c3f

TBR=reed@google.com,fmalita@chromium.org,tomhudson@google.com,bungeman@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/1974783002
/external/skia/dm/DM.cpp
6296da736fbf40aae881650c239420f64e576c3f 11-May-2016 bungeman <bungeman@google.com> Move SkTypeface to sk_sp.

Review-Url: https://codereview.chromium.org/1933393002
/external/skia/dm/DM.cpp
8b7451aaf6b1c71e9d343a4df107893db277b6aa 11-May-2016 bsalomon <bsalomon@google.com> Turn ContextInfos returned by GrContextFactory into structs.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1966013002

Review-Url: https://codereview.chromium.org/1966013002
/external/skia/dm/DM.cpp
05c987cee37ff9fcc7d42e73ec2909a55cd48e01 09-May-2016 brianosman <brianosman@google.com> Make DM fail if no configs were successfully created

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

Review-Url: https://codereview.chromium.org/1957273002
/external/skia/dm/DM.cpp
086eea93b1f8253420c233c33cdabc0e74b08091 05-May-2016 reed <reed@google.com> Revert of SK_DECLARE_STATIC_MUTEX -> static SkMutex (patchset #1 id:1 of https://codereview.chromium.org/1948193002/ )

Reason for revert:
broken the Mac and Linux builders, e.g.:

https://build.chromium.org/p/chromium/builders/Mac/builds/15151
https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/19052

Original issue's description:
> SK_DECLARE_STATIC_MUTEX -> static SkMutex
>
> There's no need to use a macro to declare static SkMutexes any more
> (and there's likewise no need to restrict them to global scope).
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1948193002
>
> Committed: https://skia.googlesource.com/skia/+/5e56cfd3fa1041dbb83899844fb92fa9a2ef1009

TBR=mtklein@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/1945353003
/external/skia/dm/DM.cpp
5e56cfd3fa1041dbb83899844fb92fa9a2ef1009 05-May-2016 mtklein <mtklein@chromium.org> SK_DECLARE_STATIC_MUTEX -> static SkMutex

There's no need to use a macro to declare static SkMutexes any more
(and there's likewise no need to restrict them to global scope).

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

Review-Url: https://codereview.chromium.org/1948193002
/external/skia/dm/DM.cpp
69deca8d1e57daec540f8a7f10d9c660b640b9a9 29-Apr-2016 msarett <msarett@google.com> Add ColorCodecSrc for testing/comparison on color corrected decodes

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

Review-Url: https://codereview.chromium.org/1933753002
/external/skia/dm/DM.cpp
4b6566644f704cf9e30c71fa547c9b5915752792 27-Apr-2016 halcanary <halcanary@google.com> SkDocument/PDF: new API

has a pdf/a switch.
sets metadata in factory.

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

Review URL: https://codereview.chromium.org/1916093002
/external/skia/dm/DM.cpp
71de3537f66c7c648f2819e216d07c3886f0e5ce 26-Apr-2016 bsalomon <bsalomon@google.com> Don't buffer stdout in DM

TBR=egdaniel@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1922223002

Review URL: https://codereview.chromium.org/1922223002
/external/skia/dm/DM.cpp
f3dc18851411c4a0f1d5c3ecc17353042e6cd440 26-Apr-2016 msarett <msarett@google.com> Remove redundant tests to make DM a little faster

This should help with some of the slow down caused by
https://codereview.chromium.org/1907593004.

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

Review URL: https://codereview.chromium.org/1923533002
/external/skia/dm/DM.cpp
34e0ec40b10320765d4a4432f56e090556f9c75e 23-Apr-2016 msarett <msarett@google.com> Support the non-native (RGBA/BGRA) swizzle

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

Review URL: https://codereview.chromium.org/1907593004
/external/skia/dm/DM.cpp
3c579dcff81dab48a5fb3801d7a34f9c00256ec4 19-Apr-2016 brianosman <brianosman@google.com> Move DM png code to picture_utils, for use by other tools.

Planning to re-use this code in skiaserve in an upcoming change.

TBR=mtklein@google.com

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

Review URL: https://codereview.chromium.org/1901113002
/external/skia/dm/DM.cpp
6b08652abff788a251db82ca2b5f6b359ffe2590 14-Apr-2016 brianosman <brianosman@google.com> Several fixes for fp 16 rendering:

With the GPU backend, allow F16 render targets to be created (along with
any other renderable format). We were previously just falling back to 8888.

In SampleApp, if the window configuration is F16, don't render directly
to the primary surface (which is actually sRGB 8888). Intead, make an
off-screen F16 surface, then blit it back to the framebuffer when we're done.

In DM, clamp values outside of [0,1]. These were wrapping, producing very
incorrect images. (Many filters can trigger out-of-range values due to
ringing).

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

Review URL: https://codereview.chromium.org/1890923003
/external/skia/dm/DM.cpp
fbcfd6d060f4d42e6b9de70f676564fcf1d97eb5 14-Apr-2016 mtklein <mtklein@chromium.org> mojo -> nojo

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

Review URL: https://codereview.chromium.org/1889543003
/external/skia/dm/DM.cpp
fda880710c28a1b0ff0c8c88f90a7659a7ce553f 11-Apr-2016 bsalomon <bsalomon@google.com> Convert some unit tests from running on GL contexts to running on all contexts
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1873313002

Review URL: https://codereview.chromium.org/1873313002
/external/skia/dm/DM.cpp
dc0fcd41e75682a8bfd5e285d684461475226330 11-Apr-2016 bsalomon <bsalomon@google.com> Vulkan config in dm

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

Review URL: https://codereview.chromium.org/1872283003
/external/skia/dm/DM.cpp
758586c7f11a6b3529bd4a1c9b4e982a0d0b0582 06-Apr-2016 bsalomon <bsalomon@google.com> Make existing unit tests only run on GL contexts

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

Review URL: https://codereview.chromium.org/1869503002
/external/skia/dm/DM.cpp
898235c4864df66aa7f6d32bc2a8b8551040ce1e 06-Apr-2016 brianosman <brianosman@google.com> SkSurfaceProps now has a gamma-correct ("AllowSRGBInputs") flag. That's propagated in a few places so that the backend can do the right thing for L32 vs S32 mode.

Also added SkSurfaceProps to SkSpecialImage, so that Image -> Surface conversion can preserve the desired behavior during filtering.

Many small changes, including a bunch of comments about places where we may be losing information right now. My approach was to ensure that if anything fails, it will always fall back to "legacy" mode - gamma-correctness is opt-in, so I'll just have to feed things through as missing cases are exposed.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1838953007

Review URL: https://codereview.chromium.org/1845283003
/external/skia/dm/DM.cpp
f2f1c17e331fe1e0ce695969970ecebc81e12ceb 05-Apr-2016 bsalomon <bsalomon@google.com> One signature for creating unit tests that run on premade GrContexts
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1860593002

Review URL: https://codereview.chromium.org/1860593002
/external/skia/dm/DM.cpp
85b4b53e78dcdeae2a51935ca5e214b0f1a06492 05-Apr-2016 bsalomon <bsalomon@google.com> Rename enums in GrContextFactory to remove "GL"

Also, remove kNative as a separate context type and instead make it an alias for kGL or kGLES based on OS.

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

Committed: https://skia.googlesource.com/skia/+/2d9c6f81353597aebf5934547e5cba7a872196fb

Review URL: https://codereview.chromium.org/1845923004
/external/skia/dm/DM.cpp
94b87bd404d7007ce92672cc1853309df907e12a 04-Apr-2016 halcanary <halcanary@google.com> DM/PDF: stop adding unused rasterizer keywords

We can always add it back if we need it in the future.

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

Review URL: https://codereview.chromium.org/1852713002
/external/skia/dm/DM.cpp
b4b4cf36c66900fdfaf63106d54a8fac786a3313 04-Apr-2016 bsalomon <bsalomon@google.com> Revert of Rename enums in GrContextFactory to remove "GL" (patchset #4 id:60001 of https://codereview.chromium.org/1845923004/ )

Reason for revert:
Many GM images unexpectedly changed with this CL.

Original issue's description:
> Rename enums in GrContextFactory to remove "GL"
>
> Also, remove kNative as a separate context type and instead make it an alias for kGL or kGLES based on OS.
>
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1845923004
>
> Committed: https://skia.googlesource.com/skia/+/2d9c6f81353597aebf5934547e5cba7a872196fb

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

Review URL: https://codereview.chromium.org/1856703002
/external/skia/dm/DM.cpp
2d9c6f81353597aebf5934547e5cba7a872196fb 01-Apr-2016 bsalomon <bsalomon@google.com> Rename enums in GrContextFactory to remove "GL"

Also, remove kNative as a separate context type and instead make it an alias for kGL or kGLES based on OS.

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

Review URL: https://codereview.chromium.org/1845923004
/external/skia/dm/DM.cpp
273c0f5e87397c40d22bb7e3ee078bb46a3f6860 31-Mar-2016 bsalomon <bsalomon@google.com> rename sk_gpu_test::GLContext to sk_gpu_test::GLTestContext

rename subclasses

Fix up the EGL native GLTestContext
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1849463002

TBR=jvanverth@google.com

Committed: https://skia.googlesource.com/skia/+/4c7f0a16312c374eba4e8d5d46435ce9eb0b9971

Review URL: https://codereview.chromium.org/1849463002
/external/skia/dm/DM.cpp
3e4616ff10fad7ee7dae48f465223b4591ec8ffd 31-Mar-2016 bsalomon <bsalomon@google.com> Revert of rename sk_gpu_test::GLContext to sk_gpu_test::GLTestContext (patchset #5 id:80001 of https://codereview.chromium.org/1849463002/ )

Reason for revert:
breaking bots

Original issue's description:
> rename sk_gpu_test::GLContext to sk_gpu_test::GLTestContext
>
> rename subclasses
>
> Fix up the EGL native GLTestContext
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1849463002
>
> TBR=jvanverth@google.com
>
> Committed: https://skia.googlesource.com/skia/+/4c7f0a16312c374eba4e8d5d46435ce9eb0b9971

TBR=jvanverth@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/1850543003
/external/skia/dm/DM.cpp
4c7f0a16312c374eba4e8d5d46435ce9eb0b9971 31-Mar-2016 bsalomon <bsalomon@google.com> rename sk_gpu_test::GLContext to sk_gpu_test::GLTestContext

rename subclasses

Fix up the EGL native GLTestContext
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1849463002

TBR=jvanverth@google.com

Review URL: https://codereview.chromium.org/1849463002
/external/skia/dm/DM.cpp
3724e574a744491b7cfb8187ac865a70ef3d4528 31-Mar-2016 bsalomon <bsalomon@google.com> Move SkGLContext and some GrGLInterface implementations to skgputest module

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Committed: https://skia.googlesource.com/skia/+/fe3456cb006110d045b26ff3f8681b893a757b58

Review URL: https://codereview.chromium.org/1815823002
/external/skia/dm/DM.cpp
61d3b08138d1820a2c9bb14764e83f6d3761207d 30-Mar-2016 brianosman <brianosman@google.com> Enable gpusrgb config on bots.

Don't run the config if we can't get a context with srgb support.
Includes a unit test for that logic.

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

Review URL: https://codereview.chromium.org/1846603002
/external/skia/dm/DM.cpp
6f70d43719d0583d486a000f66e915c10a6b83a2 30-Mar-2016 robertphillips <robertphillips@google.com> Revert of Move SkGLContext and some GrGLInterface implementations to skgputest module (patchset #13 id:240001 of https://codereview.chromium.org/1815823002/ )

Reason for revert:
red bots

Original issue's description:
> Move SkGLContext and some GrGLInterface implementations to skgputest module
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002
> CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/fe3456cb006110d045b26ff3f8681b893a757b58

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

Review URL: https://codereview.chromium.org/1845473004
/external/skia/dm/DM.cpp
fe3456cb006110d045b26ff3f8681b893a757b58 30-Mar-2016 bsalomon <bsalomon@google.com> Move SkGLContext and some GrGLInterface implementations to skgputest module

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815823002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1815823002
/external/skia/dm/DM.cpp
ec4d4d784dbb250e572f8e04d18d0fd2ebeee851 25-Mar-2016 benjaminwagner <benjaminwagner@google.com> Change SkTime::GetMSecs to double; ensure values stored in SkMSec do not overflow.

The following are currently unused in Android, Google3, Chromium, and Mozilla:
- SkEvent
- SkTime::GetMSecs
- SK_TIME_FACTOR (also unused in Skia)
- SkAutoTime

I left uses of SkMSec more-or-less intact for SkEvent, SkAnimator, and SkInterpolator. SkInterpolator is used in Chromium, so I did not want to change the API. The views/ and animator/ code is crufty, so it didn't seem worthwhile to refactor it. Instead, I added SkEvent::GetMSecsSinceStartup, which is likely to be adequate for use in SampleApp.

I also left SkMSec where it is used to measure a duration rather than a timestamp. With the exception of SkMovie, which is used in Android, all of the uses appear to measure the execution time of a piece of code, which I would hope does not exceed 2^31 milliseconds.

Added skiatest::Timer to support a common idiom in tests where we want to measure the wallclock time in integer milliseconds. (Not used in tests/PathOpsSkpClipTest.cpp because it redefines things in Test.h.)

Removed tabs in tests/StrokerTest.cpp.

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

Review URL: https://codereview.chromium.org/1811613004
/external/skia/dm/DM.cpp
c9ced392132711205af9011b1112cac3137daf09 24-Mar-2016 brianosman <brianosman@google.com> https://codereview.chromium.org/1830973002 fixed this bug. Re-enable the
tests and remove comments referencing it.

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

Review URL: https://codereview.chromium.org/1830163002
/external/skia/dm/DM.cpp
fc0b6d1053bb56698f2844bd5ca30bced7bb389d 17-Mar-2016 msarett <msarett@google.com> Add SkImageGeneratorWIC

This will be a replacement for SkImageDecoder_WIC.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1785613010
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1785613010
/external/skia/dm/DM.cpp
a483da395a4f3b82073057420ac1318d2c7f3f95 17-Mar-2016 mtklein <mtklein@chromium.org> DM: make --verbose send the vlog to stderr.

See if this works out for you?
I've just turned off --verbose on the bots, so this ought to be safe now.

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

Review URL: https://codereview.chromium.org/1808203004
/external/skia/dm/DM.cpp
c9a99872274ab63f2130caeccc75a2f52b8677a3 17-Mar-2016 mtklein <mtklein@chromium.org> just write the verbose log file any time we have a --writePath

oughta fix the Android bots

TBR=bungeman@google.com

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

Review URL: https://codereview.chromium.org/1813933002
/external/skia/dm/DM.cpp
13bf3396be9f9eef523c5b4be9127b05be626de0 17-Mar-2016 mtklein <mtklein@chromium.org> try to flush stdio in the crash handler

NOTREECHECKS=true

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

Review URL: https://codereview.chromium.org/1808853004
/external/skia/dm/DM.cpp
18300a3aa7cb6eb55d21bb0450dffa58b6fc062c 16-Mar-2016 mtklein <mtklein@chromium.org> detach -> release

The C++ standard library uses the name "release" for the operation we call "detach".

Rewriting each "detach(" to "release(" brings us a step closer to using standard library types directly (e.g. std::unique_ptr instead of SkAutoTDelete).

This was a fairly blind transformation. There may have been unintentional conversions in here, but it's probably for the best to have everything uniformly say "release".

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

Review URL: https://codereview.chromium.org/1809733002
/external/skia/dm/DM.cpp
935f1b1a20f673b81e78bec913cd702ffc793c99 16-Mar-2016 mtklein <mtklein@chromium.org> Split uninteresting hash lines correctly on Windows.

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

Review URL: https://codereview.chromium.org/1806903002
/external/skia/dm/DM.cpp
51c8cfc64c7286ad8a392064cd376bb9974c7bc1 11-Mar-2016 mtklein <mtklein@google.com> Revert of When not writing to file in DM, spew verbose output to stderr (patchset #1 id:1 of https://codereview.chromium.org/1788743002/ )

Reason for revert:
Looks like not all the bots are using --writePath (think, Valgrind, *SAN) so this causes those bots to spew like crazy.

Looks like we need to find a more explicit way to make this mode work.

Original issue's description:
> When not writing to file in DM, spew verbose output to stderr
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1788743002
>
> Committed: https://skia.googlesource.com/skia/+/40dec542cc12b354762bca2c0d68bc419f0cbebd

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

Review URL: https://codereview.chromium.org/1783603006
/external/skia/dm/DM.cpp
7a307df926da2afbdadfb36250925c7f76e3493a 11-Mar-2016 yujieqin <yujieqin@google.com> Rename the kRAW_SkEncodedFormat to kDNG_SkEncodedFormat as it is actually only used for DNG format

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

Review URL: https://codereview.chromium.org/1782913002
/external/skia/dm/DM.cpp
40dec542cc12b354762bca2c0d68bc419f0cbebd 11-Mar-2016 egdaniel <egdaniel@google.com> When not writing to file in DM, spew verbose output to stderr

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

Review URL: https://codereview.chromium.org/1788743002
/external/skia/dm/DM.cpp
d93c1208520376ec062c8e9b6b7e6d0eac6c6faf 10-Mar-2016 brianosman <brianosman@google.com> Added (color=8888|f16|srgb) option to gpu configurations, along with gpuf16 and gpusrgb predefined configs. Runs the gpu backend in gamma-correct mode (with either FP16 linear or sRGB 8888 frambuffers).

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

Committed: https://skia.googlesource.com/skia/+/a6f58194733c1c50e4fe5f98585e42344f29b6f0

Review URL: https://codereview.chromium.org/1750383002
/external/skia/dm/DM.cpp
1897631ebe417631ea7a046a2eb0995ab9d04539 09-Mar-2016 msarett <msarett@google.com> Add an SkImageGeneratorCG

This will serve as a replacement for SkImageDecoder_CG.

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

Review URL: https://codereview.chromium.org/1718273004
/external/skia/dm/DM.cpp
c41fd9251dad3e2e2797436a4ccfaf0490914fe0 08-Mar-2016 mtklein <mtklein@chromium.org> DM: verbose and quiet logging

If you pass no flags, output is pretty much unchanged from today: calls to
info() go to the console, calls to vlog() are ignored.

If you pass --verbose and -w dir, all calls to info(), vlog() and all of stderr
are redirected to dir/verbose.log. info() calls also go to the console,
unless you pass --quiet, in which case nothing goes to the console at all.

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

Review URL: https://codereview.chromium.org/1771143002
/external/skia/dm/DM.cpp
46752200009f70d708e37b413a2144b7aaa09ce1 08-Mar-2016 mtklein <mtklein@chromium.org> Archive SkRemote-related code. I want to start fresh.

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

Review URL: https://codereview.chromium.org/1774013002
/external/skia/dm/DM.cpp
b3b13b7edeabad4c8e53b0d309b0a44668d1e68f 07-Mar-2016 mtklein <mtklein@chromium.org> dm: log log

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

Review URL: https://codereview.chromium.org/1771993002
/external/skia/dm/DM.cpp
f655e9330e3e3cc3d56f19017c89d8309f2ddc36 03-Mar-2016 kkinnunen <kkinnunen@nvidia.com> Revert of Implement support for using GL ES 3.0 with command buffer (patchset #6 id:100001 of https://codereview.chromium.org/1684413003/ )

Reason for revert:
The dependency, ES3 implementation in command_buffer_gles2, got reverted.

Original issue's description:
> Implement support for using GL ES 3.0 with command buffer
>
> Adds a new 'api': --config gpu(api=commandbuffer3) for dm/nanobench.
>
> BUG=skia:4943
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684413003
>
> Committed: https://skia.googlesource.com/skia/+/45c2c8166bbd84a87e29fdd344b39e36e8a28a3f

TBR=bsalomon@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:4943
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1744963002

Review URL: https://codereview.chromium.org/1744963002
/external/skia/dm/DM.cpp
75467865f5962d2d1e1378ff66e92d46e6015139 01-Mar-2016 robertphillips <robertphillips@google.com> Fix MSVC 2015 compiler complaint

This is/was slowly, but surely, driving me insane:

DM.cpp(150): warning C4838: conversion from 'DWORD' to 'int' requires a narrowing conversion

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

Review URL: https://codereview.chromium.org/1749363002
/external/skia/dm/DM.cpp
744898aa48e055401e5ef203d5f633e69825bf20 01-Mar-2016 brianosman <brianosman@google.com> Revert of Progress on gamma-correctness in the GPU backend. Fixed conversion of color and profile type to pix… (patchset #1 id:1 of https://codereview.chromium.org/1750383002/ )

Reason for revert:
GM breakage. Changes to SkGr.cpp appear to be altering behavior on a variety of tests. Debugging...

Original issue's description:
> Progress on gamma-correctness in the GPU backend. Fixed conversion of color and profile type to pixel config, which makes many things "just work".
>
> Added (color=8888|f16|srgb) option to gpu configurations, along with gpuf16, gpusrgb, and anglesrgb predefined configs. Runs the gpu backend in gamma-correct mode (with either FP16 linear or sRGB 8888 frambuffers).
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1750383002
>
> Committed: https://skia.googlesource.com/skia/+/a6f58194733c1c50e4fe5f98585e42344f29b6f0

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

Review URL: https://codereview.chromium.org/1755553003
/external/skia/dm/DM.cpp
a6f58194733c1c50e4fe5f98585e42344f29b6f0 01-Mar-2016 brianosman <brianosman@google.com> Progress on gamma-correctness in the GPU backend. Fixed conversion of color and profile type to pixel config, which makes many things "just work".

Added (color=8888|f16|srgb) option to gpu configurations, along with gpuf16, gpusrgb, and anglesrgb predefined configs. Runs the gpu backend in gamma-correct mode (with either FP16 linear or sRGB 8888 frambuffers).

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

Review URL: https://codereview.chromium.org/1750383002
/external/skia/dm/DM.cpp
819ab1028897c7ae8ea07cb342d48118d29daa5d 01-Mar-2016 mtklein <mtklein@chromium.org> print stack trace on crash, tweak formatting, _Exit hard

Mac example:

1 srcs * 1 sinks + 0 tests == 1 tasks
0ns elapsed, 1 active, 0 queued, 11MB RAM, 11MB peak
f16 gm dstreadshuffle
../../src/core/SkXfermode.cpp:935: fatal error: ""r.fVec[i] >= min && r.fVec[i] <= max""

Caught signal 6 [Abort trap: 6], was running:
f16 gm dstreadshuffle

Stack trace:
0 dm 0x000000010f23fc9d _ZZL19setup_crash_handlervENK3$_5clEi + 397
1 dm 0x000000010f23fb06 _ZZL19setup_crash_handlervEN3$_58__invokeEi + 22
2 libsystem_platform.dylib 0x00007fff9d44e52a _sigtramp + 26
3 ??? 0x00007fff9900b902 0x0 + 140735760349442
4 libsystem_c.dylib 0x00007fff96a836e7 abort + 129
5 dm 0x000000010fcb67c9 _Z17sk_abort_no_printv + 9
6 dm 0x000000010f90fc1f _ZL11assert_unitRK6SkPM4f + 175
7 dm 0x000000010f90e957 _Z7proc_4fIXadL_ZL10lighten_4fRK4SkNxILi4EfES3_EEE6SkPM4fRKS4_S6_ + 103
8 dm 0x000000010f918946 _Z10xfer_u64_nIL7DstType1EEvPK10SkXfermodePyPK6SkPM4fiPKh + 182
9 dm 0x000000010f7a5f3e _ZN22SkState_Shader_BlitterI7State64E9blitAntiHEiiPKhPKs + 398
10 dm 0x000000010f3c730c _ZN9SkBlitter10blitAntiH2Eiijj + 108
11 dm 0x000000010f8d76f4 _ZN25Vertish_SkAntiHairBlitter7drawCapEiiii + 164
12 dm 0x000000010f8d4d92 _ZL16do_anti_hairlineiiiiPK7SkIRectP9SkBlitter + 3058
13 dm 0x000000010f8d40f4 _ZN6SkScan15AntiHairLineRgnEPK7SkPointiPK8SkRegionP9SkBlitter + 900
14 dm 0x000000010f8d8fff _ZL8hairquadPK7SkPointPK8SkRegionP9SkBlitteriPFvS1_iS4_S6_E + 719
15 dm 0x000000010f8da838 _Z9hair_pathILN7SkPaint3CapE0EEvRK6SkPathRK12SkRasterClipP9SkBlitterPFvPK7SkPointiPK8SkRegionS9_E + 1048
16 dm 0x000000010f8d86dc _ZN6SkScan12AntiHairPathERK6SkPathRK12SkRasterClipP9SkBlitter + 44
17 dm 0x000000010f7da8ff _ZNK6SkDraw8drawPathERK6SkPathRK7SkPaintPK8SkMatrixbbP9SkBlitter + 2239
18 dm 0x000000010f774993 _ZNK6SkDraw8drawPathERK6SkPathRK7SkPaintPK8SkMatrixb + 83
19 dm 0x000000010f774031 _ZN14SkBitmapDevice8drawPathERK6SkDrawRK6SkPathRK7SkPaintPK8SkMatrixb + 97
20 dm 0x000000010f773f6b _ZN14SkBitmapDevice8drawOvalERK6SkDrawRK6SkRectRK7SkPaint + 139
21 dm 0x000000010f7b5072 _ZN8SkCanvas10onDrawOvalERK6SkRectRK7SkPaint + 626
22 dm 0x000000010f7b38a5 _ZN8SkCanvas8drawOvalERK6SkRectRK7SkPaint + 69
23 dm 0x000000010f7b9ee6 _ZN8SkCanvas10drawCircleEfffRK7SkPaint + 294
24 dm 0x000000010f614039 _ZN6skiagm14DstReadShuffle9drawShapeEP8SkCanvasP7SkPaintNS0_9ShapeTypeE + 249
25 dm 0x000000010f613b89 _ZN6skiagm14DstReadShuffle6onDrawEP8SkCanvas + 425
26 dm 0x000000010f268b17 _ZN6skiagm2GM11drawContentEP8SkCanvas + 71
27 dm 0x000000010f268a6c _ZN6skiagm2GM4drawEP8SkCanvas + 60
28 dm 0x000000010f25186b _ZNK2DM5GMSrc4drawEP8SkCanvas + 123
29 dm 0x000000010f256de7 _ZNK2DM10RasterSink4drawERKNS_3SrcEP8SkBitmapP9SkWStreamP8SkString + 295
30 dm 0x000000010f246a96 _ZN4Task3RunERKS_ + 358
31 dm 0x000000010f2447e5 _ZZ7dm_mainvENK3$_3clEv + 21
32 dm 0x000000010f2447bd _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZ7dm_mainvE3$_3EEEvDpOT_ + 45
33 dm 0x000000010f24475c _ZNSt3__110__function6__funcIZ7dm_mainvE3$_3NS_9allocatorIS2_EEFvvEEclEv + 44
34 dm 0x000000010f406aba _ZNKSt3__18functionIFvvEEclEv + 26
35 dm 0x000000010f8fc168 _ZN12_GLOBAL__N_110ThreadPool4WaitEP8SkAtomicIiL15sk_memory_order5EE + 328
36 dm 0x000000010f8fc00c _ZN11SkTaskGroup4waitEv + 28
37 dm 0x000000010f23e9c4 _Z7dm_mainv + 1940
38 dm 0x000000010f23fa77 main + 39
39 dm 0x000000010f23e1a4 start + 52
40 ??? 0x0000000000000007 0x0 + 7

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

Review URL: https://codereview.chromium.org/1753503002
/external/skia/dm/DM.cpp
e9c8442bfc3a44b00cd64529882d7a8bd4bc6030 29-Feb-2016 brianosman <brianosman@google.com> Revert of Progress on gamma-correctness in the GPU backend. Fixed conversion of color and profile type to pix… (patchset #3 id:40001 of https://codereview.chromium.org/1746253002/ )

Reason for revert:
Fixing the build.

Original issue's description:
> Progress on gamma-correctness in the GPU backend. Fixed conversion of color and profile type to pixel config, which makes many things "just work".
>
> Added (color=8888|f16|srgb) option to gpu configurations, along with gpuf16, gpusrgb, and anglesrgb predefined configs. Runs the gpu backend in gamma-correct mode (with either FP16 linear or sRGB 8888 frambuffers).
>
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1746253002
>
> Committed: https://skia.googlesource.com/skia/+/eef980270d3385fee340eb1633962fe3ba8b7132

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

Review URL: https://codereview.chromium.org/1748823002
/external/skia/dm/DM.cpp
eef980270d3385fee340eb1633962fe3ba8b7132 29-Feb-2016 brianosman <brianosman@google.com> Progress on gamma-correctness in the GPU backend. Fixed conversion of color and profile type to pixel config, which makes many things "just work".

Added (color=8888|f16|srgb) option to gpu configurations, along with gpuf16, gpusrgb, and anglesrgb predefined configs. Runs the gpu backend in gamma-correct mode (with either FP16 linear or sRGB 8888 frambuffers).

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

Review URL: https://codereview.chromium.org/1746253002
/external/skia/dm/DM.cpp
15923c9e475894d89028b7a6a0b38aeeb9f9e645 29-Feb-2016 mtklein <mtklein@chromium.org> Modernize SkSpinlock.

- Use std::atomic directly.
- No more need for SkPODSpinlock or SK_DECLARE_STATIC_SPINLOCK.

Now simple code like this works as you'd hope:
static SkSpinlock gLock;

That is, it starts unlocked and there's no static initializer.

std::atomic_flag would make this terser and standard-guaranteed,
but ATOMIC_FLAG_INIT caused not-yet-implemented errors on MSVC 2013.
The generated code for this approach is identical.

It appears the implicit constructor is constexpr when all the member
initializers are. I'm hoping this way of producing constexpr constructors
without typing "constexpr" gives us a way to eliminate more SkFoo / SkBaseFoo
distinctions and SK_DECLARE_STATIC_FOO. This was certainly the easiest.

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

Review URL: https://codereview.chromium.org/1734383002
/external/skia/dm/DM.cpp
409d470a4973e2ba9f95983b9820931adcf7cd73 29-Feb-2016 mtklein <mtklein@chromium.org> Add gamma_correct option field to dm.json

E.g.

{
"max_rss_MB" : 23,
"results" : [
{
"key" : {
"config" : "pdf",
"name" : "gamma",
"source_type" : "gm"
},
"md5" : "c5dfb531f4d76c77c3305b6a04733262",
"options" : {
"ext" : "pdf",
"gamma_correct" : false
}
},
{
"key" : {
"config" : "8888",
"name" : "gamma",
"source_type" : "gm"
},
"md5" : "6177860ed24106446d3a9087527e67bf",
"options" : {
"ext" : "png",
"gamma_correct" : false
}
},
{
"key" : {
"config" : "f16",
"name" : "gamma",
"source_type" : "gm"
},
"md5" : "213f80145953ecd4c71e0612447b2ad9",
"options" : {
"ext" : "png",
"gamma_correct" : true
}
}
]
}

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

Review URL: https://codereview.chromium.org/1741973002
/external/skia/dm/DM.cpp
f85572956473efd8298522acb4bf0ee75cbdb86b 29-Feb-2016 mtklein <mtklein@chromium.org> DM crash handler tweaks

- try to guard against reentrant signals.
- re-raise the signal with the default handler when done printing.
- support Windows

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

Review URL: https://codereview.chromium.org/1744553002
/external/skia/dm/DM.cpp
e027f1705eb29560df334bcc02a27e5774277984 27-Feb-2016 mtklein <mtklein@chromium.org> DM: dm.json can be missing some final results

We called JsonWriter::DumpJson() every once in a while,
but this did not necssarily wait for offloaded PNG encoding to finish.

This means we might have been dropping some DM results for a while now.
Fix by one more JsonWriter::DumpJson() call after joining back to the
main thread.

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

Review URL: https://codereview.chromium.org/1744723002
/external/skia/dm/DM.cpp
27c3fddaac722086b80a7725f42c14fb694ec4a6 26-Feb-2016 mtklein <mtklein@chromium.org> DM: support --config {f16,srgb}

Will need to follow up with enabling f16 and srgb configs.
They're still assert-y.

The GMs 'gamma' and 'gradients' look reassuringly good on f16 and srgb backends.

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

Review URL: https://codereview.chromium.org/1711143002
/external/skia/dm/DM.cpp
e4499849df904c30c21e0eacaf11b9e9a985313f 25-Feb-2016 scroggo <scroggo@chromium.org> Add a DM flag to limit the types of Codec decodes

When the flag "simpleCodec" is set to true, we will only decode
to the canvas colortype and to a scale of 1. No SkAndroidCodec or
BRDCodec tests are run. This makes it easier to find the simple
case when running locally.

Clean up some SkImageDecoder references along the way.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1735743003

Review URL: https://codereview.chromium.org/1735743003
/external/skia/dm/DM.cpp
45c2c8166bbd84a87e29fdd344b39e36e8a28a3f 25-Feb-2016 kkinnunen <kkinnunen@nvidia.com> Implement support for using GL ES 3.0 with command buffer

Adds a new 'api': --config gpu(api=commandbuffer3) for dm/nanobench.

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

Review URL: https://codereview.chromium.org/1684413003
/external/skia/dm/DM.cpp
3eed7ddb25408cdd1c437e65728bac115aeacbd1 25-Feb-2016 mtklein <mtklein@chromium.org> trim DM fat

- cuts out a few fringe features like logs and notes tallies
- moves vetos and blacklisting earlier so they're never really seen
- many string strength reductions, either to const SkString& or const char*

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot

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

Review URL: https://codereview.chromium.org/1727363004
/external/skia/dm/DM.cpp
da884c49e29ab99fcc81e906db1dbce8f34ae008 25-Feb-2016 mtklein <mtklein@chromium.org> DM: assert we ran as many tasks as we thought we would

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

Review URL: https://codereview.chromium.org/1731783003
/external/skia/dm/DM.cpp
7d57124a2a9ed7b271568fb75b3cfd949fdb313a 25-Feb-2016 halcanary <halcanary@google.com> Unit Tests: eliminate stray SkDebugf()s.

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

Review URL: https://codereview.chromium.org/1733113002
/external/skia/dm/DM.cpp
afae30aeefad374b754b489f3d38519c1faa2247 24-Feb-2016 mtklein <mtklein@chromium.org> Rethink DM output

Instead of printing out each task as it finishes, or as it starts and as it finishes, periodically print out what we're up to.

Example output:
https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot/builds/6436/steps/dm/logs/stdio

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

Review URL: https://codereview.chromium.org/1730943003
/external/skia/dm/DM.cpp
246ba3a8b488eb1cecb98fa0cd657b62c9801a51 23-Feb-2016 mtklein <mtklein@chromium.org> Add a handler to DM to print out what was running when we crash.

This is an experiment to see if we can use something like this
rather than today's extremely verbose logging.

Now, hopefully something crashes.

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

Review URL: https://codereview.chromium.org/1725543002
/external/skia/dm/DM.cpp
b65e604f1083e1d0cd85a0635ff4742d95a0837b 23-Feb-2016 msarett <msarett@google.com> Make DM failures fatal

We should now only be pushing Srcs for tests that we expect
to succeed. So any failures should be treated as errors.

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

Review URL: https://codereview.chromium.org/1719293002
/external/skia/dm/DM.cpp
91c22b2ea6bd13a31321ead01645467f21858cd0 22-Feb-2016 msarett <msarett@google.com> Use new jpeg_crop_scanlines() API to optimize jpeg subset decodes

This was adapted from:
https://codereview.chromium.org/1530933003

Subset Decode Runtime (Original / Optimized) on Nexus 6P
TopLeft 0.51x
TopRight 0.56x
Middle 0.71x
BottomLeft 0.79x
BottomRight 0.79x

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

Review URL: https://codereview.chromium.org/1719073002
/external/skia/dm/DM.cpp
55f7bdd956bf73dd2501a35a646870c1aebb34b7 16-Feb-2016 msarett <msarett@google.com> Make kInvalidConversion a fatal failure in DMSrcSink

We just need to abort early on tests that we know
are invalid conversions.

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

Review URL: https://codereview.chromium.org/1704433003
/external/skia/dm/DM.cpp
21eaf3b00aa23ec352b595d5c54dd2c0faa0b0c6 08-Feb-2016 mtklein <mtklein@chromium.org> dm: simplify parallel/serial decisions

- instead of complicated enclaves, just allow parallel or main thread serial
- either the Src or the Sink can force the task to go serial

ALSO,
- simpler file extension parsing

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

Review URL: https://codereview.chromium.org/1675423002
/external/skia/dm/DM.cpp
9e9444cad8a9df626eff49ea271ebb4e3a603a20 03-Feb-2016 msarett <msarett@google.com> Test unpremul decodes

This is a workaround until SkCanvas supports drawing kUnpremul sources.

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

Review URL: https://codereview.chromium.org/1661913005
/external/skia/dm/DM.cpp
8673714d75ff1020f78217ff8839f1e18c3591e4 03-Feb-2016 scroggo <scroggo@google.com> Treat bad values passed to --images as a fatal error

If an option is passed to --images that is either a non-existent path or
a folder with no images matching the supported types, assume this is
an error and exit, so they can supply a valid path instead.

Share code between DM and nanobench in SkCommonFlags.

nanobench now behaves more like DM - it will check a directory for
images that match the supported extensions.

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

Review URL: https://codereview.chromium.org/1611323004
/external/skia/dm/DM.cpp
7a76f9c8f4de11e51b3495eec0d76be88a12adfa 03-Feb-2016 halcanary <halcanary@google.com> SkMojo: test linking Skia against the Mojo SDK

TODO: build on systems other than Linux.

Add mojo_skd to the DEPS.

Add a DM::Via called `mojo-`.

everything is hidden behind the gyp variable `skia_mojo`.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1644043003

Review URL: https://codereview.chromium.org/1644043003
/external/skia/dm/DM.cpp
136baaa927877e0f7fcc97acb456ee0d63f7f343 03-Feb-2016 mtklein <mtklein@chromium.org> DM: add uninteresting hashes FYI

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

Review URL: https://codereview.chromium.org/1663223002
/external/skia/dm/DM.cpp
c5560bef14149f4c945a4536988aeba1a16adedc 03-Feb-2016 scroggo <scroggo@google.com> Support decoding opaque to *premul

If a client requests unpremul or premul from an opaque SkCodec,
support it. The opaque image can be treated as any of them, though
it will be less efficient to draw than if the client had used
opaque.

Change the filling code (i.e. for incomplete images) to base its color on
the source alpha type. Prior to adding the support to decode opaque to
any, it was fine to use either source or dest (which would have yielded
the same result). If the client requests non-opaque, we do not want this
to switch the fill value from black to transparent. This also allows
simplifying the signatures for getFillValue and onGetFillValue.

In CodexTest, expect the same result when decoding opaque to *premul,
and compare to the opaque version.

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

Review URL: https://codereview.chromium.org/1641273003
/external/skia/dm/DM.cpp
1497f9f2641b539f0bc45b4f1496ceab7d56b18c 02-Feb-2016 scroggo <scroggo@google.com> Update SK_IMAGE_VERSION to test RAW

Bump SK_IMAGE_VERSION to test the images in v2 in GoogleStorage, which
includes the images from v1 plus test images for SkRawCodec.

Only define skia_decodes_raw on platforms that support it, rather than
defining it always and checking additional conditions to determine
whether to support raw. Further, define it and SK_CODEC_DECODES_RAW
for all targets, so we can use the compile flag in other targets.

In DM, exclude the raw extensions if SK_CODEC_DECODES_RAW is not defined.

Blacklist raw extensions on NexusPlayer, which was running out of memory
when running them.

BUG=skia:4829

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

Review URL: https://codereview.chromium.org/1612113002
/external/skia/dm/DM.cpp
ad38ed6003ad89a21e40d76987db4bba7d42f3d0 29-Jan-2016 scroggo <scroggo@google.com> Revert of Treat bad values passed to --images as a fatal error (patchset #17 id:320001 of https://codereview.chromium.org/1611323004/ )

Reason for revert:
Speculative to fix windows bots

Original issue's description:
> Treat bad values passed to --images as a fatal error
>
> If an option is passed to --images that is either a non-existent path or
> a folder with no images matching the supported types, assume this is
> an error and exit, so they can supply a valid path instead.
>
> Share code between DM and nanobench in SkCommonFlags.
>
> nanobench now behaves more like DM - it will check a directory for
> images that match the supported extensions.
>
> Only consider image paths ending in RAW suffixes as images if
> SK_CODE_DECODES_RAW is defined. This prevents us from seeing failure
> to decode errors on platforms that cannot decode it.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1611323004
>
> Committed: https://skia.googlesource.com/skia/+/7579786f3bd5a8fda84a1abc45b16213c3371f93

TBR=mtklein@google.com,borenet@google.com,msarett@google.com

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
# Not skipping CQ checks because original CL landed more than 1 days ago.

Review URL: https://codereview.chromium.org/1653543002
/external/skia/dm/DM.cpp
4d9eaea1740568548c7a954fdc3b4f7ee8df1e49 29-Jan-2016 scroggo <scroggo@google.com> Print a message when DM finishes

When running from the command line, it is obvious when DM finishes,
since it brings the prompt back up. But in XCode, it just sits
there, so my glance doesn't let me know that it's finished. Make
it more obvious that DM is done.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1650113002

Review URL: https://codereview.chromium.org/1650113002
/external/skia/dm/DM.cpp
7579786f3bd5a8fda84a1abc45b16213c3371f93 28-Jan-2016 scroggo <scroggo@google.com> Treat bad values passed to --images as a fatal error

If an option is passed to --images that is either a non-existent path or
a folder with no images matching the supported types, assume this is
an error and exit, so they can supply a valid path instead.

Share code between DM and nanobench in SkCommonFlags.

nanobench now behaves more like DM - it will check a directory for
images that match the supported extensions.

Only consider image paths ending in RAW suffixes as images if
SK_CODE_DECODES_RAW is defined. This prevents us from seeing failure
to decode errors on platforms that cannot decode it.

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

Review URL: https://codereview.chromium.org/1611323004
/external/skia/dm/DM.cpp
0edf1693dfd8360f5b8256e0700c2240854c010f 27-Jan-2016 scroggo <scroggo@google.com> Stop testing SkImageDecoder in DM/nanobench

We have already used it for comparison, and are switching forward
to using SkCodec. This also allows us to simplify the code for checking
the extensions we support for images.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1641663002

Review URL: https://codereview.chromium.org/1641663002
/external/skia/dm/DM.cpp
8d61f0dd1b6fde5202a14dfafcc1bceccf0d74ad 25-Jan-2016 benjaminwagner <benjaminwagner@google.com> Add pre_log option to nanobench; make this option default true in nanobench_flags.py and dm_flags.py.

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

Review URL: https://codereview.chromium.org/1612483002
/external/skia/dm/DM.cpp
916de9ff18cf3caa29c0821b55244060b6f84f9d 25-Jan-2016 yujieqin <yujieqin@google.com> Add RAW decoding into Skia.

TBR=reed@google.com

BUG=skia:

(Based on the work from ebrauer in https://codereview.chromium.org/1459473007)
(Based on the work from adaubert in https://codereview.chromium.org/1494003003)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1520403003

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

Review URL: https://codereview.chromium.org/1520403003
/external/skia/dm/DM.cpp
c85a9fde77f91979afea0efa38f63d8efceb4138 25-Jan-2016 msarett <msarett@google.com> Revert of Prototype of RAW decoding in Skia. (patchset #32 id:610001 of https://codereview.chromium.org/1520403003/ )

Reason for revert:
A few build failures on Chrome OS/Android.

Original issue's description:
> Add RAW decoding into Skia.
>
> TBR=reed@google.com
>
> BUG=skia:
>
> (Based on the work from ebrauer in https://codereview.chromium.org/1459473007)
> (Based on the work from adaubert in https://codereview.chromium.org/1494003003)
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1520403003
>
> Committed: https://skia.googlesource.com/skia/+/6bd8639f8c142eedf543f4e5f3b02d2bf11df308

TBR=scroggo@google.com,adaubert@google.com,yujieqin@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1635443002
/external/skia/dm/DM.cpp
6bd8639f8c142eedf543f4e5f3b02d2bf11df308 25-Jan-2016 yujieqin <yujieqin@google.com> Add RAW decoding into Skia.

TBR=reed@google.com

BUG=skia:

(Based on the work from ebrauer in https://codereview.chromium.org/1459473007)
(Based on the work from adaubert in https://codereview.chromium.org/1494003003)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1520403003

Review URL: https://codereview.chromium.org/1520403003
/external/skia/dm/DM.cpp
b714fb0199e8727ef2b6cddbee7eba6046f01554 22-Jan-2016 msarett <msarett@google.com> Add getYUV8Planes() API to SkCodec

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

Review URL: https://codereview.chromium.org/1549473003
/external/skia/dm/DM.cpp
5286f0222ccb65ce1dbe235adc225b79057dd0ae 22-Jan-2016 mtklein <mtklein@chromium.org> DM: dump a zero-results .json file right at startup.

This way, if DM runs, the file will be there, even if it crashes before the
first time we'd ordinarily write out the file (currently, any time
the number of tasks remaining to do becomes evenly divisible by 500).

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

Review URL: https://codereview.chromium.org/1626493002
/external/skia/dm/DM.cpp
ba6ada74e8658571c451f375b3e7736da83ea578 21-Jan-2016 mtklein <mtklein@chromium.org> DM: dump images for task failures too (but not skipped tasks)

This will get us back to uploading things like serialize-8888 mismatches.

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

Review URL: https://codereview.chromium.org/1614443002
/external/skia/dm/DM.cpp
bb25b5324965d53253fc3ad9f43b7d6faa2f9100 13-Jan-2016 msarett <msarett@google.com> Add CodecZeroInit test to DMSrcSink

This should not cause any diffs on Gold.

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

Review URL: https://codereview.chromium.org/1577853004
/external/skia/dm/DM.cpp
4a34ecbe352114bd8403b134eb72f6e63bec0b11 08-Jan-2016 mtklein <mtklein@chromium.org> DM: more invariants

- add ViaPicture
- run ViaPicture on most bots
- run ViaSecondPicture (tests SkPictureRecorder reuse) and ViaTwice (tests caching) on some bots
- extend ViaSerialization reference checking to ViaPicture, ViaSecondPicture,
ViaSingletonPictures, and ViaTwice
- suppress current reference check failures with --blacklist

I'm open to following up on changing how those suppressions work.

Passing --nocheck turns off these invariant checks, letting us debug failures with normal image diff tools.

CQ_EXTRA_TRYBOTS=client.skia:Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot

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

Review URL: https://codereview.chromium.org/1569823006
/external/skia/dm/DM.cpp
7c554222ddd03d3817ab197a0bd92badc6f1f7c9 08-Jan-2016 reed <reed@google.com> remove SkGPipe

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

Review URL: https://codereview.chromium.org/1568883003
/external/skia/dm/DM.cpp
3405800d7a5407365143eed93e300fd5896cacee 07-Jan-2016 kkinnunen <kkinnunen@nvidia.com> Make SkGLContext lifetime more well-defined

Remove refcounting from SkGLContext.

SkGLContext is expected to behave like GrContextFactory would own
it, as implied by the GrContextFactory function.

If it is refcounted, this does not hold.

Also other use sites, such as in SkOSWindow_win (command buffer gl
object), confirm the behavior. The object is explicitly owned and
destroyed, not shared.

Also fixes potential crashes from using GL context of an abandoned
context.

Also fixes potential crashes in DM/nanobench, if the GrContext lives
longer than GLContext through internal refing of GrContext.

Moves the non-trivial implementations from GrContextFactory.h to
.cpp, just for consistency sake.

Changes pathops_unittest.gyp. The pathops_unittest uses
GrContextFactory, but did not link to its implementation. The reason
they worked was that the implementation used (constructors, destructors)
happened to be in the .h file.

This works towards being able to use command buffer and NVPR from
the SampleApp.

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

Committed: https://skia.googlesource.com/skia/+/830e012187f951d49d7e46e196ac8d1e653a25da

Review URL: https://codereview.chromium.org/1511773005
/external/skia/dm/DM.cpp
cd50bcae10c823aa8b9970c88b6e74bdea7bc124 05-Jan-2016 mtklein <mtklein@chromium.org> Spin off more thread-safe work in DM.

Even in GPU configs, encoding a .png and writing to disk is thread safe.
This CL moves that work to an SkTaskGroup, offloading it from the GPU
thread to a threadpool.

In my brief local testing, this makes DM run in about half the time
for GPU-bound work, e.g.

$ out/Release/dm --src gm --config gpudft -w output
Before: 43.79 real 37.01 user 4.28 sys
After : 23.64 real 39.31 user 4.46 sys

This won't affect the bots much, as they already skip .png generation
when gold.skia.org already has a .png of an image with a given hash.
(Most of the time saved here is under WriteToDisk() after the
gUninterestingHashes check.)

CQ_EXTRA_TRYBOTS=client.skia:Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Release-Trybot

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

Review URL: https://codereview.chromium.org/1561553002
/external/skia/dm/DM.cpp
54e2ca5a2338b6700fd4c147ad2f934c70ecac90 05-Jan-2016 jcgregorio <jcgregorio@google.com> Revert of Make SkGLContext lifetime more well-defined (patchset #7 id:120001 of https://codereview.chromium.org/1511773005/ )

Reason for revert:
Broke tests on Android, iOS, Mac and Windows.

Original issue's description:
> Make SkGLContext lifetime more well-defined
>
> Remove refcounting from SkGLContext.
>
> SkGLContext is expected to behave like GrContextFactory would own
> it, as implied by the GrContextFactory function.
>
> If it is refcounted, this does not hold.
>
> Also other use sites, such as in SkOSWindow_win (command buffer gl
> object), confirm the behavior. The object is explicitly owned and
> destroyed, not shared.
>
> Also fixes potential crashes from using GL context of an abandoned
> context.
>
> Also fixes potential crashes in DM/nanobench, if the GrContext lives
> longer than GLContext through internal refing of GrContext.
>
> Moves the non-trivial implementations from GrContextFactory.h to
> .cpp, just for consistency sake.
>
> Changes pathops_unittest.gyp. The pathops_unittest uses
> GrContextFactory, but did not link to its implementation. The reason
> they worked was that the implementation used (constructors, destructors)
> happened to be in the .h file.
>
> This works towards being able to use command buffer and NVPR from
> the SampleApp.
>
> BUG=skia:2992
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1511773005
>
> Committed: https://skia.googlesource.com/skia/+/830e012187f951d49d7e46e196ac8d1e653a25da

TBR=bsalomon@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1555053003
/external/skia/dm/DM.cpp
830e012187f951d49d7e46e196ac8d1e653a25da 05-Jan-2016 kkinnunen <kkinnunen@nvidia.com> Make SkGLContext lifetime more well-defined

Remove refcounting from SkGLContext.

SkGLContext is expected to behave like GrContextFactory would own
it, as implied by the GrContextFactory function.

If it is refcounted, this does not hold.

Also other use sites, such as in SkOSWindow_win (command buffer gl
object), confirm the behavior. The object is explicitly owned and
destroyed, not shared.

Also fixes potential crashes from using GL context of an abandoned
context.

Also fixes potential crashes in DM/nanobench, if the GrContext lives
longer than GLContext through internal refing of GrContext.

Moves the non-trivial implementations from GrContextFactory.h to
.cpp, just for consistency sake.

Changes pathops_unittest.gyp. The pathops_unittest uses
GrContextFactory, but did not link to its implementation. The reason
they worked was that the implementation used (constructors, destructors)
happened to be in the .h file.

This works towards being able to use command buffer and NVPR from
the SampleApp.

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

Review URL: https://codereview.chromium.org/1511773005
/external/skia/dm/DM.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/dm/DM.cpp
3e980c3d88fbc509b79e7ccef16ca38f5bbfb180 23-Dec-2015 kkinnunen <kkinnunen@nvidia.com> Add config options to run different GPU APIs to dm and nanobench

Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.

Extended form: 'backend(option=value,...)'

Possible backends and options:

gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.

Predefined configs:

gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005

Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b

Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd

Review URL: https://codereview.chromium.org/1490113005
/external/skia/dm/DM.cpp
0f515bd4284ee6e88cd04c62cb6c67e1f23db616 22-Dec-2015 rmistry <rmistry@google.com> Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #21 id:400001 of https://codereview.chromium.org/1490113005/ )

Reason for revert:
The Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug builder fails after this CL.

Links to specific builds:
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1689
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1690
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1691

Original issue's description:
> Add config options to run different GPU APIs to dm and nanobench
>
> Add extended config specification form that can be used to run different
> gpu backend with different APIs.
>
> The configs can be specified with the form:
> gpu(api=string,dit=bool,nvpr=bool,samples=int)
>
> This replaces and removes the --gpuAPI flag.
>
> All existing configs should still work.
>
> Adds following documentation:
>
> out/Debug/dm --help config
>
> Flags:
> --config: type: string default: 565 8888 gpu nonrendering
> Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
> nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
> xps or use extended form 'backend(option=value,...)'.
>
> Extended form: 'backend(option=value,...)'
>
> Possible backends and options:
>
> gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
> api type: string default: native.
> Select graphics API to use with gpu backend.
> Options:
> native Use platform default OpenGL or OpenGL ES backend.
> gl Use OpenGL.
> gles Use OpenGL ES.
> debug Use debug OpenGL.
> null Use null OpenGL.
> dit type: bool default: false.
> Use device independent text.
> nvpr type: bool default: false.
> Use NV_path_rendering OpenGL and OpenGL ES extension.
> samples type: int default: 0.
> Use multisampling with N samples.
>
> Predefined configs:
>
> gpu = gpu()
> msaa4 = gpu(samples=4)
> msaa16 = gpu(samples=16)
> nvprmsaa4 = gpu(nvpr=true,samples=4)
> nvprmsaa16 = gpu(nvpr=true,samples=16)
> gpudft = gpu(dit=true)
> gpudebug = gpu(api=debug)
> gpunull = gpu(api=null)
> debug = gpu(api=debug)
> nullgpu = gpu(api=null)
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
>
> Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
>
> Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd

TBR=mtklein@google.com,bsalomon@google.com,joshualitt@google.com,scroggo@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1548683002
/external/skia/dm/DM.cpp
9ebc3f0ee6db215dde461dc4777d85988cf272dd 22-Dec-2015 kkinnunen <kkinnunen@nvidia.com> Add config options to run different GPU APIs to dm and nanobench

Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.

Extended form: 'backend(option=value,...)'

Possible backends and options:

gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.

Predefined configs:

gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005

Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b

Review URL: https://codereview.chromium.org/1490113005
/external/skia/dm/DM.cpp
4dabf83cbe3096eaa7b80c101ba0e9c277b560d2 18-Dec-2015 joshualitt <joshualitt@google.com> Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #18 id:340001 of https://codereview.chromium.org/1490113005/ )

Reason for revert:
This CL changed 1200 images on gold, when I wouldn't expect any diffs from the description.

Original issue's description:
> Add config options to run different GPU APIs to dm and nanobench
>
> Add extended config specification form that can be used to run different
> gpu backend with different APIs.
>
> The configs can be specified with the form:
> gpu(api=string,dit=bool,nvpr=bool,samples=int)
>
> This replaces and removes the --gpuAPI flag.
>
> All existing configs should still work.
>
> Adds following documentation:
>
> out/Debug/dm --help config
>
> Flags:
> --config: type: string default: 565 8888 gpu nonrendering
> Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
> nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
> xps or use extended form 'backend(option=value,...)'.
>
> Extended form: 'backend(option=value,...)'
>
> Possible backends and options:
>
> gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
> api type: string default: native.
> Select graphics API to use with gpu backend.
> Options:
> native Use platform default OpenGL or OpenGL ES backend.
> gl Use OpenGL.
> gles Use OpenGL ES.
> debug Use debug OpenGL.
> null Use null OpenGL.
> dit type: bool default: false.
> Use device independent text.
> nvpr type: bool default: false.
> Use NV_path_rendering OpenGL and OpenGL ES extension.
> samples type: int default: 0.
> Use multisampling with N samples.
>
> Predefined configs:
>
> gpu = gpu()
> msaa4 = gpu(samples=4)
> msaa16 = gpu(samples=16)
> nvprmsaa4 = gpu(nvpr=true,samples=4)
> nvprmsaa16 = gpu(nvpr=true,samples=16)
> gpudft = gpu(dit=true)
> gpudebug = gpu(api=debug)
> gpunull = gpu(api=null)
> debug = gpu(api=debug)
> nullgpu = gpu(api=null)
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
>
> Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b

TBR=mtklein@google.com,bsalomon@google.com,scroggo@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1536963002
/external/skia/dm/DM.cpp
c8b4336444e7b90382e04e33665fb3b8490b825b 18-Dec-2015 kkinnunen <kkinnunen@nvidia.com> Add config options to run different GPU APIs to dm and nanobench

Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.

Extended form: 'backend(option=value,...)'

Possible backends and options:

gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.

Predefined configs:

gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005

Review URL: https://codereview.chromium.org/1490113005
/external/skia/dm/DM.cpp
4ff653cab2e1e3cfb02c91df9c9013fc927aa1ee 14-Dec-2015 reed <reed@google.com> Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #12 id:220001 of https://codereview.chromium.org/1490113005/ )

Reason for revert:
speculative revert to see if it unblocks the DEPS roll

https://codereview.chromium.org/1529443002

Original issue's description:
> Add config options to run different GPU APIs to dm and nanobench
>
> Add extended config specification form that can be used to run different
> gpu backend with different APIs.
>
> The configs can be specified with the form:
> gpu(api=string,dit=bool,nvpr=bool,samples=int)
>
> This replaces and removes the --gpuAPI flag.
>
> All existing configs should still work.
>
> Adds following documentation:
>
> out/Debug/dm --help config
>
> Flags:
> --config: type: string default: 565 8888 gpu nonrendering
> Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
> nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
> xps or use extended form 'backend(option=value,...)'.
>
> Extended form: 'backend(option=value,...)'
>
> Possible backends and options:
>
> gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
> api type: string default: native.
> Select graphics API to use with gpu backend.
> Options:
> native Use platform default OpenGL or OpenGL ES backend.
> gl Use OpenGL.
> gles Use OpenGL ES.
> debug Use debug OpenGL.
> null Use null OpenGL.
> dit type: bool default: false.
> Use device independent text.
> nvpr type: bool default: false.
> Use NV_path_rendering OpenGL and OpenGL ES extension.
> samples type: int default: 0.
> Use multisampling with N samples.
>
> Predefined configs:
>
> gpu = gpu()
> msaa4 = gpu(samples=4)
> msaa16 = gpu(samples=16)
> nvprmsaa4 = gpu(nvpr=true,samples=4)
> nvprmsaa16 = gpu(nvpr=true,samples=16)
> gpudft = gpu(dit=true)
> gpudebug = gpu(api=debug)
> gpunull = gpu(api=null)
> debug = gpu(api=debug)
> nullgpu = gpu(api=null)
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23

TBR=bsalomon@google.com,scroggo@google.com,joshualitt@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1528473002
/external/skia/dm/DM.cpp
e13ca329fca4c28cf4e078561f591ab27b743d23 14-Dec-2015 kkinnunen <kkinnunen@nvidia.com> Add config options to run different GPU APIs to dm and nanobench

Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
--config: type: string default: 565 8888 gpu nonrendering
Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
xps or use extended form 'backend(option=value,...)'.

Extended form: 'backend(option=value,...)'

Possible backends and options:

gpu(api=string,dit=bool,nvpr=bool,samples=int) GPU backend
api type: string default: native.
Select graphics API to use with gpu backend.
Options:
native Use platform default OpenGL or OpenGL ES backend.
gl Use OpenGL.
gles Use OpenGL ES.
debug Use debug OpenGL.
null Use null OpenGL.
dit type: bool default: false.
Use device independent text.
nvpr type: bool default: false.
Use NV_path_rendering OpenGL and OpenGL ES extension.
samples type: int default: 0.
Use multisampling with N samples.

Predefined configs:

gpu = gpu()
msaa4 = gpu(samples=4)
msaa16 = gpu(samples=16)
nvprmsaa4 = gpu(nvpr=true,samples=4)
nvprmsaa16 = gpu(nvpr=true,samples=16)
gpudft = gpu(dit=true)
gpudebug = gpu(api=debug)
gpunull = gpu(api=null)
debug = gpu(api=debug)
nullgpu = gpu(api=null)

BUG=skia:2992

Review URL: https://codereview.chromium.org/1490113005
/external/skia/dm/DM.cpp
55eeae97227fa2523207bc67523da5b9eb663536 11-Dec-2015 kkinnunen <kkinnunen@nvidia.com> Run debug gl context for DEF_GPU_TEST_FOR_ALL_CONTEXTS

Run debug gl context for tests defined with
DEF_GPU_TEST_FOR_ALL_CONTEXTS.

Review URL: https://codereview.chromium.org/1514023002
/external/skia/dm/DM.cpp
62d3b101106602d87cad91b0ac97c10003ca33a5 11-Dec-2015 msarett <msarett@google.com> Revert of DM: fix `--config $VIA-pdf` to not crash (patchset #3 id:40001 of https://codereview.chromium.org/1513323002/ )

Reason for revert:
I believe that this is breaking master-skia in Android.

Original issue's description:
> DM: fix `--config $VIA-pdf` to not crash
>
> Committed: https://skia.googlesource.com/skia/+/6bce4177cb72faac9c10d01d57e17168ae7ecadf

TBR=mtklein@google.com,halcanary@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1513053004
/external/skia/dm/DM.cpp
30da5f7a1e4cf0daa2f284b4cae5128b23f0db96 10-Dec-2015 herb <herb@google.com> Change SkTaskGroup to use std::function. Ripple all the changes.

BUG=skia:4634

Review URL: https://codereview.chromium.org/1519573003
/external/skia/dm/DM.cpp
6bce4177cb72faac9c10d01d57e17168ae7ecadf 10-Dec-2015 halcanary <halcanary@google.com> DM: fix `--config $VIA-pdf` to not crash

Review URL: https://codereview.chromium.org/1513323002
/external/skia/dm/DM.cpp
5219fd9ff7aa6ebf64c905ad40f5e0027a39962b 10-Dec-2015 kkinnunen <kkinnunen@nvidia.com> Make NVPR a GL context option instead of a GL context

Make NVPR a GL context option instead of a GL context.
This may enable NVPR to be run with command buffer
interface.

No functionality change in DM or nanobench. NVPR can
only be run with normal GL APIs.

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/eeebdb538d476c1bfc8b63a946094ca1b505ecd1

Committed: https://skia.googlesource.com/skia/+/64492c43c3faee7ab0f69b1c84e0267616f85e52

Review URL: https://codereview.chromium.org/1448883002
/external/skia/dm/DM.cpp
bc4e003d39636ec7fbc80511828b5c2b327e9f13 09-Dec-2015 mtklein <mtklein@chromium.org> DM: tally notes at the end rather than showing them as they finish.

This should make the (veto) and (skipped: ) both less verbose and easier to grok.

Looks like this'll bring the log files down from ~50M to ~1.5M.

BUG=skia:

Review URL: https://codereview.chromium.org/1516563002
/external/skia/dm/DM.cpp
9d66696f6b1651b52adad1b0202aca013ef7da58 09-Dec-2015 borenet <borenet@google.com> Revert of Make NVPR a GL context option instead of a GL context (patchset #9 id:160001 of https://codereview.chromium.org/1448883002/ )

Reason for revert:
"Could not create surface" on Linux GTX660 bots

Original issue's description:
> Make NVPR a GL context option instead of a GL context
>
> Make NVPR a GL context option instead of a GL context.
> This may enable NVPR to be run with command buffer
> interface.
>
> No functionality change in DM or nanobench. NVPR can
> only be run with normal GL APIs.
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/eeebdb538d476c1bfc8b63a946094ca1b505ecd1
>
> Committed: https://skia.googlesource.com/skia/+/64492c43c3faee7ab0f69b1c84e0267616f85e52

TBR=mtklein@google.com,bsalomon@google.com,jvanverth@google.com,scroggo@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1513703002
/external/skia/dm/DM.cpp
64492c43c3faee7ab0f69b1c84e0267616f85e52 08-Dec-2015 kkinnunen <kkinnunen@nvidia.com> Make NVPR a GL context option instead of a GL context

Make NVPR a GL context option instead of a GL context.
This may enable NVPR to be run with command buffer
interface.

No functionality change in DM or nanobench. NVPR can
only be run with normal GL APIs.

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/eeebdb538d476c1bfc8b63a946094ca1b505ecd1

Review URL: https://codereview.chromium.org/1448883002
/external/skia/dm/DM.cpp
be8216a922241cc8f3ea3b813608fcb06936fde0 04-Dec-2015 msarett <msarett@google.com> Make SkAndroidCodec support ico

BUG=skia:

Review URL: https://codereview.chromium.org/1472933002
/external/skia/dm/DM.cpp
97ff7f56620a50e83e433b158a86ff082935ed47 04-Dec-2015 scroggo <scroggo@google.com> Revert of Make SkAndroidCodec support ico (patchset #7 id:130002 of https://codereview.chromium.org/1472933002/ )

Reason for revert:
Crashing: https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-NexusPlayer-CPU-SSE4-x86-Release/builds/1499/steps/dm/logs/stdio

Also, related ASAN failures:
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN/builds/3676/steps/dm/logs/stdio

Original issue's description:
> Make SkAndroidCodec support ico
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/1603e9310f62cf0dd543cdb09dea06aa78373f13

TBR=djsollen@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1498903004
/external/skia/dm/DM.cpp
1603e9310f62cf0dd543cdb09dea06aa78373f13 04-Dec-2015 msarett <msarett@google.com> Make SkAndroidCodec support ico

BUG=skia:

Review URL: https://codereview.chromium.org/1472933002
/external/skia/dm/DM.cpp
a18a8bca24f8b927c360e36f23d2fd08c6378805 04-Dec-2015 kkinnunen <kkinnunen@nvidia.com> Skip dm GPU configs when context creation fails

Skip dm GPU configs when context creation fails instead of stopping
the whole dm run.

Review URL: https://codereview.chromium.org/1497713002
/external/skia/dm/DM.cpp
a0a024e323ebf73ea4559d4b29f937902703828b 01-Dec-2015 bsalomon <bsalomon@google.com> Revert of Make NVPR a GL context option instead of a GL context (patchset #2 id:20001 of https://codereview.chromium.org/1448883002/ )

Reason for revert:
BUG=skia:4609

skbug.com/4609

Seems like GrContextFactory needs to fail when the NVPR option is requested but the driver version isn't sufficiently high.

Original issue's description:
> Make NVPR a GL context option instead of a GL context
>
> Make NVPR a GL context option instead of a GL context.
> This may enable NVPR to be run with command buffer
> interface.
>
> No functionality change in DM or nanobench. NVPR can
> only be run with normal GL APIs.
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/eeebdb538d476c1bfc8b63a946094ca1b505ecd1

TBR=mtklein@google.com,jvanverth@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1486153002
/external/skia/dm/DM.cpp
eeebdb538d476c1bfc8b63a946094ca1b505ecd1 01-Dec-2015 kkinnunen <kkinnunen@nvidia.com> Make NVPR a GL context option instead of a GL context

Make NVPR a GL context option instead of a GL context.
This may enable NVPR to be run with command buffer
interface.

No functionality change in DM or nanobench. NVPR can
only be run with normal GL APIs.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1448883002
/external/skia/dm/DM.cpp
179a8f5f7feab052e24596d0d04ab5cf2ccab5e0 20-Nov-2015 kkinnunen <kkinnunen@nvidia.com> Generate list of GPU contexts outside SurfaceTest tests

Add support for feeding the tests with contexts directly to the unit
test framework.

This fixes the problem where tests are more complex than needed just in
order to run the test code with multiple backends.

Also makes it possible to change the logic how contexts are
created. Instead of direct numbering, the different testable contexts
may be generated from filtered cross-product of context options. For
example: currently NVPR is a type of context. However, it could be also
an on/off feature of any context. In order to test this kind of context,
the enumeration can not be just of context type. It's simpler
to move the enumeration out of the tests.

A test targeting both normal and GPU backends would look like:

static void test_obj_behavior(skiatest::Reporter* reporter,
SkObj* obj, [other params] ) {
... test with obj and param ..
}
DEF_TEST(ObjBehavior, reporter) {
for (auto& object : generate_object) {
for (auto& other_param : generate_other_variant) {
test_obj_behavior(reporter, object, other_param);
}
}
}
#if SK_SUPPORT_GPU
DEF_GPUTEST_FOR_ALL_CONTEXTS(ObjBehavior_Gpu, reporter, context) {
for (auto& object : generate_gpu_object) {
for (auto& other_param : generate_other_variant) {
test_obj_behavior(reporter, object, other_param);
}
}
}
#endif

Uses the feature in SurfaceTests as an example.

Moves SkSurface -related tests from ImageTest to SurfaceTest.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1446453003
/external/skia/dm/DM.cpp
5af4e0bc8fd17944f3c0527462aeba367f6d590a 17-Nov-2015 msarett <msarett@google.com> Make SkAndroidCodec support gif

Involves a few bug fixes in SkCodec_libgif and a bit more
complexity in SkSwizzler.

BUG=skia:4405

Review URL: https://codereview.chromium.org/1445313002
/external/skia/dm/DM.cpp
887e18e5f7b79397a3d4df7f5c74de13ba3a95d4 17-Nov-2015 msarett <msarett@google.com> Make SkAndroidCodec support bmp

BUG=skia:

Review URL: https://codereview.chromium.org/1443783002
/external/skia/dm/DM.cpp
33c762332403afb557dad62d0e67ac74e291ae27 16-Nov-2015 msarett <msarett@google.com> Make SkAndroidCodec support wbmp

BUG=skia:

Review URL: https://codereview.chromium.org/1445643002
/external/skia/dm/DM.cpp
4b0778ec491513d1dab752fddb7520aac19ad47b 13-Nov-2015 msarett <msarett@google.com> Remove dependency on src/android from dm and nanobench

BUG=skia:

Review URL: https://codereview.chromium.org/1443033002
/external/skia/dm/DM.cpp
84a80652752976c9abe42d28e467c362baff3e39 11-Nov-2015 msarett <msarett@google.com> Reorganize BRD code in new tools directory

Rename SkCodecTools.h to SkBitmapRegionDecoderPriv.h

Move BRD code to its own directory in tools. This
allows us to not need to expose the entire tools
directory in Android.

BUG=skia:

Review URL: https://codereview.chromium.org/1417393004
/external/skia/dm/DM.cpp
5c9e34a350cd641910c86151aa39f863cdf25cc3 11-Nov-2015 msarett <msarett@google.com> Delete dead BitmapRegionDecoder code in tools

This approach to subset decoding is no longer supported.
We have replaced it with an implementation that does not
depend on forked libraries.
https://codereview.chromium.org/1406153015/

BUG=skia:

Review URL: https://codereview.chromium.org/1406033007
/external/skia/dm/DM.cpp
164d302ebf182a2db0044ba46126f9ed1e6cf138 11-Nov-2015 msarett <msarett@google.com> Delete dead subset test code from dm

This approach to subset decoding is no longer supported.
We have replaced it with an implementation that does not
depend on forked libraries.
https://codereview.chromium.org/1406153015/

BUG=skia:

Review URL: https://codereview.chromium.org/1416673010
/external/skia/dm/DM.cpp
6950de6c4166fabb35e6c756fc009e0cf1c47819 07-Nov-2015 halcanary <halcanary@google.com> Comments Style: s/skbug.com/bug.skia.org/
DOCS_PREVIEW= https://skia.org/?cl=1432503003

Review URL: https://codereview.chromium.org/1432503003
/external/skia/dm/DM.cpp
1aaaba5216aea73bd9c1d1bf0fdf62005b7cf836 06-Nov-2015 Matt Sarett <msarett@google.com> Fix the build on Android devices
/external/skia/dm/DM.cpp
5cb4885b4cd1ac5eb3fc92dac5f5509d7c810464 06-Nov-2015 msarett <msarett@google.com> Rename SkBitmapRegionDecoder and Create function

We no longer need to worry about namespace
conflicts SkBitmapRegionDecoder in Android (which
we are replacing).

Additionally, the static Create() function does not
need to repeat the name BitmapRegionDecoder.

BUG=skia:

Review URL: https://codereview.chromium.org/1415243007
/external/skia/dm/DM.cpp
501b7344f116ccc821d437d324aa7883d7ce97bf 03-Nov-2015 scroggo <scroggo@chromium.org> Combine native sampling with sampling

In SkSampledCodec, allow the native codec to do its scaling first, then
sample on top of that. Since the only codec which can do native scaling
is JPEG, and we know what it can do, hard-code for JPEG. Check to see
if the sampleSize is something JPEG supports, or a multiple of
something it supports. If so, use JPEG directly or combine them.

BUG=skia:4320

Review URL: https://codereview.chromium.org/1417583009
/external/skia/dm/DM.cpp
f27f08b76d3c99bbca8b56a38faddbb58239c94c 03-Nov-2015 mtklein <mtklein@chromium.org> DM+VB: WallTimer -> SkTime::GetNSecs().

The same timer with a simpler interface.

BUG=skia:

Review URL: https://codereview.chromium.org/1427033003
/external/skia/dm/DM.cpp
27a58348b2a38bf8cca16dfd8f332d8cd5773270 28-Oct-2015 scroggo <scroggo@google.com> Add missing include for sleep().

This used to be leaked unconditionally by libc++.

Change-Id: I984ab7328ff3a2499c3c89a6862feaa62b6166de

Author: Dan Albert<danalbert@google.com>

Cherry-pick of https://android-review.googlesource.com/#/c/178189/1

This fixes the AOSP mips build.

Review URL: https://codereview.chromium.org/1425843003
/external/skia/dm/DM.cpp
26ad17b8f872fc8bc18df7f49067edbd8b9799e8 22-Oct-2015 msarett <msarett@google.com> Implementation of SkBitmapRegionDecoder using SkAndroidCodec

Includes testing in DM and nanobench

BUG=skia:

Review URL: https://codereview.chromium.org/1402863002
/external/skia/dm/DM.cpp
3d9d7a7213748761d46ade183e11aa7cb55313c1 21-Oct-2015 msarett <msarett@google.com> Create an SkAndroidCodec API separate from SkCodec

We will implement this API using SkCodecs.

SkAndroidCodecs will be used to implement the
BitmapRegionDecoder Java API (and possibly
BitmapFactory).

BUG=skia:

Review URL: https://codereview.chromium.org/1406223002
/external/skia/dm/DM.cpp
2e2ea38bb77d42bab292919de5d80286cc354782 16-Oct-2015 mtklein <mtklein@chromium.org> SkRemote

BUG=skia:

Review URL: https://codereview.chromium.org/1391023005
/external/skia/dm/DM.cpp
c8d1dd48c01f562cfffe64da0e5cee5ed2713541 15-Oct-2015 mtklein <mtklein@chromium.org> SkTHash: hash from fnptr to functor type

Passing &SkGoodHash to SkTHashMap and SkTHashSet doesn't guarantee that it's actually instantiated. Using a functor does.

BUG=skia:

Review URL: https://codereview.chromium.org/1405053002
/external/skia/dm/DM.cpp
14bbe1dcd58c386da8168bba496d19f066dc56fd 12-Oct-2015 msarett <msarett@google.com> Enable more testing for scaled webps

BUG=skia:

Review URL: https://codereview.chromium.org/1401093002
/external/skia/dm/DM.cpp
f174e928732d69a0884d07168862265a97da10d8 01-Oct-2015 scroggo <scroggo@chromium.org> Update libwebp and resume testing scaled webp

libwebp has a fix for [1]. Update to the commit that contains the fix.

Update libwebp.gypi, corresponding to libwebp's latest makefile.

Turn back on DM testing for scaled webp, now that it should no longer
use uninitialized memory.

[1] https://code.google.com/p/webp/issues/detail?id=254

BUG=skia:4038

Committed: https://skia.googlesource.com/skia/+/0575d3e6c272744a66ab3281f9871366717df339

Review URL: https://codereview.chromium.org/1280073002
/external/skia/dm/DM.cpp
7a14b310d6c618fa2151d93a43b29f9599adc32a 01-Oct-2015 halcanary <halcanary@google.com> SkPDF: Implement drawImage*() properly

drawImage calls now properly embeds the original jpeg.

NOTE: drawBitmap*() calls no longer embed JPEG files when
possible (this is in advance of eliminating bitmaps backed
by encoded data). Chromium has already moved from
drawBitmap to drawImage.

Comparisons:

control:
total PDF drawImage/drawBitmap calls: 8010
total PDF jpeg images: 0
total PDF regular images: 3581

experiament:
total PDF drawImage/drawBitmap calls: 8014
total PDF jpeg images: 271
total PDF regular images: 3311
total PDF regular images: 3582 (271 + 3311)

When comparing rendered output there were perceptual
differences in the following four GMs: colorcube, emboss,
colormatrix, and tablecolorfilter. All of these differences
were improvements (that is, closer to the 8888 rendering)
due fixing a bug with colorfilters and forgetting to call
notifyPixelsChanged.

No SKPs had perceptual differences.

Total PDF size dropped from 133964 kB to 126276 kB, a 5.7%
improvement (mostly due to restoring use of JPG images in
SKPs).

BUG=skia:4370

Review URL: https://codereview.chromium.org/1372783003
/external/skia/dm/DM.cpp
46c574725676b26ada63ac15e42cda309dcd5090 30-Sep-2015 scroggo <scroggo@google.com> Merge SkCodec with SkScanlineDecoder

Benefits:
- This mimics other decoding APIs (including the ones SkCodec relies
on, e.g. a png_struct, which can be used to decode an entire image or
one line at a time).

- It allows a client to ask us to do what we can do efficiently - i.e.
start from encoded data and either decode the whole thing or scanlines.

- It removes the duplicate methods which appeared in both SkCodec and
SkScanlineDecoder (some of which, e.g. in SkJpegScanlineDecoder, just
call fCodec->sameMethod()).

- It simplifies moving more checks into the base class (e.g. the
examples in skbug.com/4284).

BUG=skia:4175
BUG=skia:4284

=====================================================================

SkScanlineDecoder.h/.cpp:
Removed.

SkCodec.h/.cpp:
Add methods, enums, and variables which were previously in
SkScanlineDecoder.
Default fCurrScanline to -1, as a sentinel that start has not been
called.

General changes:
Convert SkScanlineDecoders to SkCodecs.

General changes in SkCodec subclasses:
Merge SkScanlineDecoder implementation into SkCodec. Most (all?) owned
an SkCodec, so they now call this-> instead of fCodec->.

SkBmpCodec.h/.cpp:
Replace the unused rowOrder method with an override for
onGetScanlineOrder.
Make getDstRow const, since it is called by onGetY, which is const.

SkCodec_libpng.h/.cpp:
Make SkPngCodec an abstract class, with two subclasses which handle
scanline decoding separately (they share code for decoding the entire
image). Reimplement onReallyHasAlpha so that it can return the most
recent result (e.g. after a scanline decode which only decoded part
of the image) or a better answer (e.g. if the whole image is known to
be opaque).
Compute fNumberPasses early, so we know which subclass to instantiate.
Make SkPngInterlaceScanlineDecoder use the base class' fCurrScanline
rather than a separate variable.

CodexTest.cpp:
Add tests for the state changes in SkCodec (need to call start before
decoding scanlines; calling getPixels means that start will need to
be called again before decoding more scanlines).
Add a test which decodes in stripes, currently only used for an
interlaced PNG.

TODO: Add tests for onReallyHasAlpha.

Review URL: https://codereview.chromium.org/1365313002
/external/skia/dm/DM.cpp
c11c62f4a235677f3921bceed331db91ca98aaaf 28-Sep-2015 halcanary <halcanary@google.com> DM: PDFSink sets rasterizer keyword

Review URL: https://codereview.chromium.org/1376573002
/external/skia/dm/DM.cpp
7f69144aaabbedf51ad2a1feddc9e0689f2c5ee9 22-Sep-2015 msarett <msarett@google.com> Add nanobench tests for BitmapRegionDecoder

SkBitmapRegionDecoderInterface provides an interface
for multiple implementations of Android's
BitmapRegionDecoder.

We already have correctness tests in DM that will enable us
to compare the quality of our various BRD implementations.

We also need these performance tests to compare the speed
of our various implementations.

BUG=skia:4357

Review URL: https://codereview.chromium.org/1344993003
/external/skia/dm/DM.cpp
cc334b36de5c4508266c322dfa44039d8156dc70 22-Sep-2015 mtklein <mtklein@chromium.org> fix DM?

BUG=skia:

Review URL: https://codereview.chromium.org/1359833005
/external/skia/dm/DM.cpp
6c50a8f4ab0747b319914c4b600a2e74c6d6e721 18-Sep-2015 msarett <msarett@google.com> Use rounding when converting desiredScale to a sampleSize

Right now we have a bug in Gold where some images are labeled
_0.167 and others are labeled _0.166. They are all 1/6
scales and should be labeled the same way and compared.

The fix involves changing 0.166 to 0.167 in the list of
scales that we test on, but SkScaledCodec does not scale
to 0.167 as I expected.

SkScaledCodec converts 0.167 to sampleSize = 5.999 and then
casts to sampleSize = 5. I would argue that we should do
a true round, so 0.167 represents a sampleSize of 6.

In general, this CL change onGetScaledDimensions so that
we now round desiredScale to the nearest sampleSize.

BUG=skia:

Review URL: https://codereview.chromium.org/1356923002
/external/skia/dm/DM.cpp
eddbefb4a5794b1d9f4e58a7cdf4e768b837c17f 11-Sep-2015 hendrikw <hendrikw@chromium.org> skia: Add ANGLE with GL backend to nanobench/DM

This will allow us to test this without hacking it in, might be useful
for others too.

Review URL: https://codereview.chromium.org/1338003002
/external/skia/dm/DM.cpp
6efbe0537732a729d5bd500707dd0d8b0fc83553 11-Sep-2015 msarett <msarett@google.com> Remove jpegs with uninitialized memory from Gold

BitmapRegionSampler (uses SkImageDecoder) will often scale
to a power of 2 regardless of the sampleSize requested.
This is skbug.com/4319.

Consider a 60x60 image.
To decode a subset with sample size 3, we might ask for the
following.
[x, y, w, h] = [-15, -15, 30, 30]
sampleSize = 3

Since w = 30 and h = 30, this should give us a 10x10
result. Only the bottom right 5x5 quadrant of this 10x10
subset will actually be in the image. We should get a 5
pixel border on the top and left because we ask for 15
extra pixels on the top and left.

Unfortunately, SkImageDecoder will take our requested
sample size of 3, and then decide to use a sample size of
2. Not only will it scale the image by 2, but it will also
scale the border by 2. So while we are expecting pixel
data to begin at offset (5, 5) of the result bitmap, it
actually begins at offset (7, 7). Making things worse,
the pixels between (5, 5) and (7, 7) are uninitialized,
causing problems on Gold.

Options for fixing this include:
(1) Not testing decodes with a border.
(2) Changing the test to check the size of the output
bitmap.
(3) Disable the tests.

I think it's best to just disable these tests. We know
they don't work, so why do we need to see the results on
Gold?

BUG=skia:4319

Review URL: https://codereview.chromium.org/1313233007
/external/skia/dm/DM.cpp
d69ece6a03d497cead8dc5c5ea2d682e49800df4 10-Sep-2015 mtklein <mtklein@chromium.org> DM: add --key and --properties to PNG description field.

This tags each image with the bot that created it.

BUG=skia:4322

Review URL: https://codereview.chromium.org/1332903002
/external/skia/dm/DM.cpp
a5783aeff042ccaf517e50dee3660a4925f5f694 09-Sep-2015 msarett <msarett@google.com> Provides various implementations of Android's SkBitmapRegionDecoder.

Implements testing in DM for these implementations.

nanobench testing will follow after this.

TBR=scroggo
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/76f755e6d54a32f9887ad254ce59a3a62f28bde4

Review URL: https://codereview.chromium.org/1288963002
/external/skia/dm/DM.cpp
90e8ab79beffbe82fcd439eb84473f402224db7b 08-Sep-2015 bsalomon <bsalomon@google.com> Re-enable nvpr text rendering in DM.

Review URL: https://codereview.chromium.org/1306733007
/external/skia/dm/DM.cpp
8fd97eab1d9c17c662e08f6b3dbd7be49ec0a838 08-Sep-2015 msarett <msarett@google.com> Revert of Provides multiple implementations of Android's SkBitmapRegionDecoder (patchset #16 id:360001 of https://codereview.chromium.org/1288963002/ )

Reason for revert:
Breaking Android bots
Bad use of the utils folder

Original issue's description:
> Provides various implementations of Android's SkBitmapRegionDecoder.
>
> Implements testing in DM for these implementations.
>
> nanobench testing will follow after this.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/76f755e6d54a32f9887ad254ce59a3a62f28bde4

TBR=scroggo@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1322773004
/external/skia/dm/DM.cpp
76f755e6d54a32f9887ad254ce59a3a62f28bde4 04-Sep-2015 msarett <msarett@google.com> Provides various implementations of Android's SkBitmapRegionDecoder.

Implements testing in DM for these implementations.

nanobench testing will follow after this.

BUG=skia:

Review URL: https://codereview.chromium.org/1288963002
/external/skia/dm/DM.cpp
36c3796fbf6df5f1253f6ce48fb74a6d72f79bae 02-Sep-2015 msarett <msarett@google.com> Remove unwanted images in Gold

These extra outputs were caused by recent changes to
push_codec_srcs.
https://codereview.chromium.org/1327433003/

*** First, I would argue that we do not want to test
"native" modes (ex: codec, scanline, etc) to scales
that require sampling (ex: 0.1, 0.2, etc). Right now,
we are trying to scale jpegs to 0.1, settling for 0.125
as the closest option, and then trying to compare the
0.125 scaled image to the actual 0.1 scaled image in
Gold.

*** Second, I messed up and caused our test setup to
try to decode to kIndex8 and kGray8 "always" instead
of only when it is recommended. The bad effect of this
happens because we can decode jpegs to kGray8 even if
they are color images. Right now in Gold, we have a
bunch of untriaged gray versions of color images.

The second issue would have been caught if we signaled
a fatal failure for invalid conversions. Maybe we should
look into this now that 565 is supported everywhere?

BUG=skia:

Review URL: https://codereview.chromium.org/1314163007
/external/skia/dm/DM.cpp
9e707a04127f35b199bb943b6f50ff4cf60506f8 01-Sep-2015 msarett <msarett@google.com> Various improvements to CodecSrc testing in dm

*** Add CodecMode and ScaledCodecMode (in place of
NormalMode), so now we test SkCodec's getPixels() and
SkScaledCodec's getPixels()

*** Don't attempt to test scanline and codec modes using
the dimensions that were recommended for SkScaledCodec.

*** Change tags so that each scale gets its own output
folder.

TODO: Make ScanlineMode and ScanlineSubsetMode support
kOutOfOrder etc. I think this belongs with the gif CL -
I don't want to add test modes that we don't run yet.

BUG=skia:4202
BUG=skia:4238

Review URL: https://codereview.chromium.org/1327433003
/external/skia/dm/DM.cpp
885bf0925514b9dfe3365bab227d36897d866b5d 27-Aug-2015 hendrikw <hendrikw@chromium.org> skia: add ability to load command_buffer_gles2

BUG=skia:

Review URL: https://codereview.chromium.org/1306823003
/external/skia/dm/DM.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/dm/DM.cpp
60e0fee6d4acff638ccc9670c4055aced529a7a0 26-Aug-2015 bungeman <bungeman@google.com> Remove include of stdlib.h from SkTypes.h.

Unfortunately, immintrin.h (which is also included by SkTypes)
includes xmmintrin.h which includes mm_malloc.h which includes
stdlib.h for malloc even though, from the implementation, it is
difficult to see why.

Fortunately, arm_neon.h does not seem to be involved in such
shenanigans, so building for Android will keep things sane.

TBR=reed@google.com
Doesn't change Skia API, just moves an include.

Review URL: https://codereview.chromium.org/1313203003
/external/skia/dm/DM.cpp
c64137c245dd24be54f37d762c0855bd719cb3ad 25-Aug-2015 mtklein <mtklein@chromium.org> DM: "wb" (binary mode) may matter on Windows

I suspect we might be doing some funky /n -> /r/n translations without 'b'.
This kills the PNG.

BUG=skia:

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/1303063008
/external/skia/dm/DM.cpp
fccb77d59eb545396780f50c0c6026c0f4a66bde 24-Aug-2015 mtklein <mtklein@chromium.org> DM: use SkBitmap::reset()

BUG=skia:

Review URL: https://codereview.chromium.org/1310373004
/external/skia/dm/DM.cpp
a5114d7f26524f75b96e63ffd796d44749b6248c 24-Aug-2015 mtklein <mtklein@chromium.org> Have DM manually encode its .png outputs.

This eliminates some variability on various axes: different PNG encoders, different libpng versions, different formats (RGB, indexed), different unpremultiplication, different sRGB tags.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/3cc0dfffb70c0bd08ed8899efcd2e98da86a6ec7

CQ_EXTRA_TRYBOTS=client.skia:Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Debug-Trybot

Review URL: https://codereview.chromium.org/1304443002
/external/skia/dm/DM.cpp
451af5062e6bf9c665126d84516e0baafa27ecc4 19-Aug-2015 reed <reed@google.com> remove SkDeferredCanvas

Waiting a day or so to see if the blink-removal of SkDeferredCanvas sticks

BUG=skia:

Review URL: https://codereview.chromium.org/1269093002
/external/skia/dm/DM.cpp
8c9a67ae4b635e063e8d3d15201442ed321de44e 19-Aug-2015 mtklein <mtklein@chromium.org> Revert of Have DM manually encode its .png outputs. (patchset #2 id:20001 of https://codereview.chromium.org/1304443002/ )

Reason for revert:
derek + Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Debug

Original issue's description:
> Have DM manually encode its .png outputs.
>
> This eliminates some variability on various axes: different PNG encoders, different libpng versions, different formats (RGB, indexed), different unpremultiplication, different sRGB tags.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3cc0dfffb70c0bd08ed8899efcd2e98da86a6ec7

TBR=stephana@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1297383002
/external/skia/dm/DM.cpp
3cc0dfffb70c0bd08ed8899efcd2e98da86a6ec7 19-Aug-2015 mtklein <mtklein@chromium.org> Have DM manually encode its .png outputs.

This eliminates some variability on various axes: different PNG encoders, different libpng versions, different formats (RGB, indexed), different unpremultiplication, different sRGB tags.

BUG=skia:

Review URL: https://codereview.chromium.org/1304443002
/external/skia/dm/DM.cpp
cc2feb161f756c4035a407296567654d86bc7be7 14-Aug-2015 scroggo <scroggo@chromium.org> Support more swizzles to 565 in SkCodec

Add more swizzling functions for swizzling to 565. Much of this
code was revived from crrev.com/1055743003 (for BMP). Also added
swizzling functions for WBMP.

Consolidate the static function conversion_possible.

In SkCodec::getPixels, check that the alphatype corresponds to the
colorType. This prevents requesting 565 + non-opaque.

In SkIcoCodec, report that the image is unpremul (instead of
whatever the largest embedded codec thinks), but modify the
requested info to have the alpha type expected/required by the
embedded codec.

Add tests for decoding to 565.

BUG=skia:3257
BUG=skia:3683

Review URL: https://codereview.chromium.org/1277213002
/external/skia/dm/DM.cpp
8f4ba76742c329bc4d5e1b8ca376d27922bd00b1 14-Aug-2015 emmaleer <emmaleer@google.com> SkScaledCodec class

This class does scaling by using a scanlineDecoder.
getScanlines and skipScanlines are used for y sampling,
the swizzler is used for x sampling

this class is currently only working for png and jpeg images
I will update other Codec types to work soon

For SkJpegCodec to implement width wise swizzling it now
uses a swizzler. I ran performance tests on this change.
Here are the performance test results:
https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee

Committed: https://skia.googlesource.com/skia/+/d518ea7927f9f4e0ed5b4134d1b4f48243855a47

Committed: https://skia.googlesource.com/skia/+/b157917507d4f7d2651f0aeb566d31603cc02240

Review URL: https://codereview.chromium.org/1260673002
/external/skia/dm/DM.cpp
b0a32cc38fcd8f37a23dfa19e928aeca529eaf14 14-Aug-2015 egdaniel <egdaniel@google.com> Revert of SkScaledCodec class (patchset #35 id:680001 of https://codereview.chromium.org/1260673002/ )

Reason for revert:
breaking ubuntu bots

Original issue's description:
> SkScaledCodec class
>
> This class does scaling by using a scanlineDecoder.
> getScanlines and skipScanlines are used for y sampling,
> the swizzler is used for x sampling
>
> this class is currently only working for png and jpeg images
> I will update other Codec types to work soon
>
> For SkJpegCodec to implement width wise swizzling it now
> uses a swizzler. I ran performance tests on this change.
> Here are the performance test results:
> https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee
>
> Committed: https://skia.googlesource.com/skia/+/d518ea7927f9f4e0ed5b4134d1b4f48243855a47
>
> Committed: https://skia.googlesource.com/skia/+/b157917507d4f7d2651f0aeb566d31603cc02240

TBR=scroggo@google.com,msarett@google.com,djsollen@google.com,mtklein@google.com,emmaleer@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1285173003
/external/skia/dm/DM.cpp
b157917507d4f7d2651f0aeb566d31603cc02240 14-Aug-2015 emmaleer <emmaleer@google.com> SkScaledCodec class

This class does scaling by using a scanlineDecoder.
getScanlines and skipScanlines are used for y sampling,
the swizzler is used for x sampling

this class is currently only working for png and jpeg images
I will update other Codec types to work soon

For SkJpegCodec to implement width wise swizzling it now
uses a swizzler. I ran performance tests on this change.
Here are the performance test results:
https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee

Committed: https://skia.googlesource.com/skia/+/d518ea7927f9f4e0ed5b4134d1b4f48243855a47

Review URL: https://codereview.chromium.org/1260673002
/external/skia/dm/DM.cpp
c7993d747fff40328b6666845761efbbbfe720b7 13-Aug-2015 emmaleer <emmaleer@google.com> Revert of SkScaledCodec class (patchset #34 id:660001 of https://codereview.chromium.org/1260673002/ )

Reason for revert:
Seg-faulting:
http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Release/builds/1608/steps/dm/logs/stdio

Original issue's description:
> SkScaledCodec class
>
> This class does scaling by using a scanlineDecoder.
> getScanlines and skipScanlines are used for y sampling,
> the swizzler is used for x sampling
>
> this class is currently only working for png and jpeg images
> I will update other Codec types to work soon
>
> For SkJpegCodec to implement width wise swizzling it now
> uses a swizzler. I ran performance tests on this change.
> Here are the performance test results:
> https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee
>
> Committed: https://skia.googlesource.com/skia/+/d518ea7927f9f4e0ed5b4134d1b4f48243855a47

TBR=scroggo@google.com,msarett@google.com,djsollen@google.com,mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1294613002
/external/skia/dm/DM.cpp
d518ea7927f9f4e0ed5b4134d1b4f48243855a47 13-Aug-2015 emmaleer <emmaleer@google.com> SkScaledCodec class

This class does scaling by using a scanlineDecoder.
getScanlines and skipScanlines are used for y sampling,
the swizzler is used for x sampling

this class is currently only working for png and jpeg images
I will update other Codec types to work soon

For SkJpegCodec to implement width wise swizzling it now
uses a swizzler. I ran performance tests on this change.
Here are the performance test results:
https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee

Review URL: https://codereview.chromium.org/1260673002
/external/skia/dm/DM.cpp
e5aaa07c351815f023a0842820eb769c6d4b4ed3 13-Aug-2015 emmaleer <emmaleer@google.com> Revert of SkScaledCodec class (patchset #32 id:620001 of https://codereview.chromium.org/1260673002/ )

Reason for revert:
Segfaulting:
http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Release/builds/1605/steps/dm/logs/stdio

Original issue's description:
> SkScaledCodec class
>
> This class does scaling by using a scanlineDecoder.
> getScanlines and skipScanlines are used for y sampling,
> the swizzler is used for x sampling
>
> this class is currently only working for png and jpeg images
> I will update other Codec types to work soon
>
> For SkJpegCodec to implement width wise swizzling it now
> uses a swizzler. I ran performance tests on this change.
> Here are the performance test results:
> https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/0944100ac89f797714eeae0cf2875e2335ff52ee

TBR=scroggo@google.com,msarett@google.com,djsollen@google.com,mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1294593002
/external/skia/dm/DM.cpp
0944100ac89f797714eeae0cf2875e2335ff52ee 13-Aug-2015 emmaleer <emmaleer@google.com> SkScaledCodec class

This class does scaling by using a scanlineDecoder.
getScanlines and skipScanlines are used for y sampling,
the swizzler is used for x sampling

this class is currently only working for png and jpeg images
I will update other Codec types to work soon

For SkJpegCodec to implement width wise swizzling it now
uses a swizzler. I ran performance tests on this change.
Here are the performance test results:
https://docs.google.com/a/google.com/spreadsheets/d/1D7-Q_GXD_dI68LZO005NNvb8Wq2Ee0wEBEPG72671yw/edit?usp=sharing

BUG=skia:

Review URL: https://codereview.chromium.org/1260673002
/external/skia/dm/DM.cpp
0df0e43488dc785815d3234d9bd60bad91532f98 07-Aug-2015 scroggo <scroggo@google.com> Revert of Update libwebp and resume testing scaled webp (patchset #2 id:20001 of https://codereview.chromium.org/1280073002/ )

Reason for revert:
Compile failures, e.g.

http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-Arm7-Debug-Android_NoNeon/builds/1427/steps/build%20most/logs/stdio

Original issue's description:
> Update libwebp and resume testing scaled webp
>
> libwebp has a fix for [1]. Update to the commit that contains the fix.
>
> Update libwebp.gypi, corresponding to libwebp's latest makefile.
>
> Turn back on DM testing for scaled webp, now that it should no longer
> use uninitialized memory.
>
> Fix a warning in config.h
>
> [1] https://code.google.com/p/webp/issues/detail?id=254
>
> BUG=skia:4038
>
> Committed: https://skia.googlesource.com/skia/+/0575d3e6c272744a66ab3281f9871366717df339

TBR=djsollen@google.com,msarett@google.com,scroggo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4038

Review URL: https://codereview.chromium.org/1278173004
/external/skia/dm/DM.cpp
0575d3e6c272744a66ab3281f9871366717df339 07-Aug-2015 scroggo <scroggo@chromium.org> Update libwebp and resume testing scaled webp

libwebp has a fix for [1]. Update to the commit that contains the fix.

Update libwebp.gypi, corresponding to libwebp's latest makefile.

Turn back on DM testing for scaled webp, now that it should no longer
use uninitialized memory.

Fix a warning in config.h

[1] https://code.google.com/p/webp/issues/detail?id=254

BUG=skia:4038

Review URL: https://codereview.chromium.org/1280073002
/external/skia/dm/DM.cpp
c0e1af1422a0e3c9ba5fc2d95cebc3adbe6b2d25 05-Aug-2015 mtklein <mtklein@chromium.org> Revert of Intentionally crash DM to make sure all bots are up-to-date. (patchset #1 id:1 of https://codereview.chromium.org/1274693002/ )

Reason for revert:
win x64 looks fixed

Original issue's description:
> Intentionally crash DM to make sure all bots are up-to-date.
>
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3749b9646103f544f17aa926fab050f1e5178b17

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

Review URL: https://codereview.chromium.org/1275543003
/external/skia/dm/DM.cpp
3749b9646103f544f17aa926fab050f1e5178b17 05-Aug-2015 Mike Klein <mtklein@chromium.org> Intentionally crash DM to make sure all bots are up-to-date.

NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1274693002 .
/external/skia/dm/DM.cpp
99cab4e3081e7e0ae8a72eb53cb42b1bef3719a3 31-Jul-2015 mtklein <mtklein@chromium.org> DM: track a direct/indirect bit for each Sink too.

The decoding tests can now veto indirect sinks like pipe-8888.

This moves Sink type detection from automatic to explicit; I can't think of any
way to automatically differentiate pipe-8888 from 8888 based only on the
output. (They should ideally be identical, after all.)

BUG=skia:4138

Review URL: https://codereview.chromium.org/1263113002
/external/skia/dm/DM.cpp
e0effd60800bd7c07667e31a6a66e3def8de70c8 29-Jul-2015 mtklein <mtklein@chromium.org> Allow Srcs to veto Sinks based on their broad type.

This breaks Sinks down into three auto-detected types:
- GPU: anything that requests to be run in the GPU enclave
- Vector: anything that writes to the stream instead of the bitmap
- Raster: everything else

Some examples: gpu -> GPU, msaa16 -> GPU, 8888 -> raster, pdf -> vector,
svg -> vector, pipe-8888 -> raster, tiles_rt-gpu -> GPU

This lets image decoding sinks veto non-raster backends explicitly,
and can let particular GMs veto GPU or non-GPU sinks as they like.

BUG=skia:

Review URL: https://codereview.chromium.org/1239953004
/external/skia/dm/DM.cpp
1818acb6a4b11cd9a1d44ce5dde77452502a9796 24-Jul-2015 caryclark <caryclark@google.com> rename portable_typeface_always to portable_typeface

TBR=reed@google.com

Review URL: https://codereview.chromium.org/1257773002
/external/skia/dm/DM.cpp
b636b45971bc5e64e3b103169577cbc874bc064d 22-Jul-2015 scroggo <scroggo@chromium.org> Add the ability to decode a subset to SkCodec

This allows codecs that support subsets natively (i.e. WEBP) to do so.

Add a field on SkCodec::Options representing the subset.

Add a method on SkCodec to find a valid subset which approximately
matches a desired subset.

Implement subset decodes in SkWebpCodec.

Add a test in DM for decoding subsets.
Notice that we only start on even boundaries. This is due to the
way libwebp's API works. SkWEBPImageDecoder does not take this into
account, which results in visual artifacts.

FIXME: Subsets with scaling are not pixel identical, but close. (This
may be fine, though - they are not perceptually different. We'll just
need to mark another set of images in gold as valid, once
https://skbug.com/4038 is fixed, so we can tests scaled webp without
generating new images on each run.)

Review URL: https://codereview.chromium.org/1240143002
/external/skia/dm/DM.cpp
6f818b39af8058f2818ae2263c823c06df5e2a0a 13-Jul-2015 scroggo <scroggo@chromium.org> Do not attempt to scale webp.

Scaling webp ends triggers warnings on our valgrind bot. It also results in
generating many images in Skia Gold that look mostly the same except
for a few pixels along the right edge.

BUG=skia:4038

Review URL: https://codereview.chromium.org/1227843005
/external/skia/dm/DM.cpp
711a245dda74d92db8508c2ec835d62ed09b4d1b 08-Jul-2015 mtklein <mtklein@chromium.org> DM runs more than 100k tests now.

BUG=skia:

Review URL: https://codereview.chromium.org/1217493006
/external/skia/dm/DM.cpp
38408460addd4104f4b321bd085f6855c902231b 08-Jul-2015 mtklein <mtklein@chromium.org> DM: swizzle BGRA to RGBA before calculating pixel MD5.

We name our .pngs by pixel hashes for gold. For 8888 images, we're hashing
SkPMColors, which have platform-dependent order: BGRA on Linux and Windows,
RGBA otherwise. This means we can end up with pixel-identical pngs with
different hashes, which is confusing.

This CL standardizes on RGBA for 8888 configs, arbitrarily chosen so that
Android ends up a no-op. Long-term, this should eliminate most of the
0-pixel-diff problems we see on gold.skia.org. There are other ways to end up
with the same .png from different SkBitmaps (think, red 565 square vs. red 8888
square) but they're rather less common / likely.

This will temporarily create a giant 0-pixel-diff problem on gold.skia.org.
Any Linux or Windows images which are not already pixel-identical to a Mac or
Android image should show up as untriaged hashes that are pixel-identical to
their version just before landing (we're only changing the hash, not the .png).
This means anything vaguely platform dependent (fonts, GPUs) will probably show
up as needing a triage but with a zero diff from a previous image.

If this goes well, we might do the same for 565. Just want to leave them out
for now to cut down on the triaging I need to do in one go.

BUG=skia:

Review URL: https://codereview.chromium.org/1226933005
/external/skia/dm/DM.cpp
1b24933e52f50773de29332387a12721811f3012 07-Jul-2015 mtklein <mtklein@chromium.org> Remove SkThread.h, include SkMutex.h or SkAtomics.h as appropriate.

SkThread.h doesn't do anything anymore execept include those two,
and thankfully, it doesn't seem to be mentioned outside Skia.

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

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/c50acf2321d7a934c80d754e9cbe936dfb8eb4cc

Review URL: https://codereview.chromium.org/1215393002
/external/skia/dm/DM.cpp
1c8a587120fd33854974457cf2a795ead98183a9 07-Jul-2015 msarett <msarett@google.com> Add libjpeg-turbo library (depends on yasm)
Mangle external function names to avoid conflict with libjpeg
Take advantage of direct color conversion (RGBA, BGRA, 565)
Prepare to use jpeg_skip_scanlines (when it is upstreamed)

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/b60c3f8291529303299262dba19b1a896060bd2d

Committed: https://skia.googlesource.com/skia/+/f8bf9181d7b0463c8e371755cfbb9ece90b34fc5

Committed: https://skia.googlesource.com/skia/+/e9e3ee33f30c14c31afd5fc3fe4dda7f15783c75

Committed: https://skia.googlesource.com/skia/+/40141b57f061fbfcc2fa38da942d9efe25aca4d0

Review URL: https://codereview.chromium.org/1180983002
/external/skia/dm/DM.cpp
94a2fbc6cf7cc14d7e6149eb22455db6aca06b8f 02-Jul-2015 jvanverth <jvanverth@google.com> Revert of Switch SkJpegCode to libjpeg-turbo (patchset #29 id:750001 of https://codereview.chromium.org/1180983002/)

Reason for revert:
DEPS roll failing

Original issue's description:
> Add libjpeg-turbo library (depends on yasm)
> Mangle external function names to avoid conflict with libjpeg
> Take advantage of direct color conversion (RGBA, BGRA, 565)
> Prepare to use jpeg_skip_scanlines (when it is upstreamed)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/b60c3f8291529303299262dba19b1a896060bd2d
>
> Committed: https://skia.googlesource.com/skia/+/f8bf9181d7b0463c8e371755cfbb9ece90b34fc5
>
> Committed: https://skia.googlesource.com/skia/+/e9e3ee33f30c14c31afd5fc3fe4dda7f15783c75
>
> Committed: https://skia.googlesource.com/skia/+/40141b57f061fbfcc2fa38da942d9efe25aca4d0

TBR=scroggo@google.com,djsollen@google.com,emmaleer@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1226543003
/external/skia/dm/DM.cpp
02802f64ea0b1fc9223386328a95280b74092c94 02-Jul-2015 jvanverth <jvanverth@google.com> Revert of Remove SkThread.h, include SkMutex.h or SkAtomics.h as appropriate. (patchset #4 id:60001 of https://codereview.chromium.org/1215393002/)

Reason for revert:
Breaking the roll.

E.g. on android_chromium_gn_compile_dbg:

FAILED: /b/build/goma/gomacc ../../third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ -MMD -MF obj/skia/ext/libskia.SkMemory_new_handler.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=1 -DENABLE_NOTIFICATIONS -DENABLE_BROWSER_CDMS -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DDONT_EMBED_BUILD_METADATA -DUSE_OPENSSL=1 -DUSE_OPENSSL_CERTS=1 -DNO_TCMALLOC -DDISABLE_NACL -DENABLE_CONFIGURATION_POLICY -DENABLE_SUPERVISED_USERS=1 -DENABLE_AUTOFILL_DIALOG=1 -DUSE_PROPRIETARY_CODECS -DV8_USE_EXTERNAL_STARTUP_DATA -DVIDEO_HOLE=1 -DMOBILE_SAFE_BROWSING -DSAFE_BROWSING_SERVICE -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -DANDROID -DHAVE_SYS_UIO_H -DCOMPONENT_BUILD -D__GNU_SOURCE=1 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -DSKIA_IMPLEMENTATION=1 -DSK_ARM_HAS_OPTIONAL_NEON -DSK_GAMMA_APPLY_TO_A8 -DSK_GAMMA_EXPONENT=1.4 -DSK_GAMMA_CONTRAST=0.0 -DSK_DEFAULT_FONT_CACHE_LIMIT=1048576 -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSKIA_DLL -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_SUPPORT_GPU=1 -DSK_BUILD_FOR_ANDROID -DUSE_CHROMIUM_SKIA -DXML_STATIC -I../.. -Igen -I../../third_party/skia/include/private -I../../third_party/skia/src/core -I../../third_party/skia/src/image -I../../third_party/skia/src/opts -I../../third_party/skia/src/pdf -I../../third_party/skia/src/ports -I../../third_party/skia/src/sfnt -I../../third_party/skia/src/utils -I../../third_party/skia/src/lazy -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu -I../../third_party/zlib -I../../third_party/expat/files/lib -I../../third_party/freetype-android/include -I../../third_party/freetype-android/src/include -I../../third_party/android_tools/ndk/sources/android/cpufeatures -fno-strict-aliasing -march=armv7-a -mfloat-abi=softfp -mtune=generic-armv7-a -mthumb -mthumb-interwork -fno-tree-sra -fno-caller-saves -funwind-tables -fPIC -pipe -ffunction-sections -funwind-tables -fno-short-enums -finline-limit=64 -mfpu=vfpv3-d16 -isystem../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libcxx/include -isystem../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/include -isystem../../third_party/android_tools/ndk/sources/android/support/include -fvisibility=hidden --sysroot=/b/build/slave/android_chromium_gn/build/src/third_party/android_tools/ndk/platforms/android-16/arch-arm -Os -fdata-sections -ffunction-sections -fomit-frame-pointer -g1 -Wno-format -Wendif-labels -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wno-extra -Wno-ignored-qualifiers -Wno-type-limits -Wno-unused-local-typedefs -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -Wno-deprecated -Wno-narrowing -Wno-literal-suffix -Wno-error=c++0x-compat -Wno-non-virtual-dtor -Wno-sign-promo -c ../../skia/ext/SkMemory_new_handler.cpp -o obj/skia/ext/libskia.SkMemory_new_handler.o
../../skia/ext/SkMemory_new_handler.cpp:12:52: fatal error: third_party/skia/include/core/SkThread.h: No such file or directory
#include "third_party/skia/include/core/SkThread.h"

Original issue's description:
> Remove SkThread.h, include SkMutex.h or SkAtomics.h as appropriate.
>
> SkThread.h doesn't do anything anymore execept include those two,
> and thankfully, it doesn't seem to be mentioned outside Skia.
>
> No public API changes.
> TBR=reed@google.com
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c50acf2321d7a934c80d754e9cbe936dfb8eb4cc

TBR=mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1214603003
/external/skia/dm/DM.cpp
40141b57f061fbfcc2fa38da942d9efe25aca4d0 01-Jul-2015 msarett <msarett@google.com> Add libjpeg-turbo library (depends on yasm)
Mangle external function names to avoid conflict with libjpeg
Take advantage of direct color conversion (RGBA, BGRA, 565)
Prepare to use jpeg_skip_scanlines (when it is upstreamed)

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/b60c3f8291529303299262dba19b1a896060bd2d

Committed: https://skia.googlesource.com/skia/+/f8bf9181d7b0463c8e371755cfbb9ece90b34fc5

Committed: https://skia.googlesource.com/skia/+/e9e3ee33f30c14c31afd5fc3fe4dda7f15783c75

Review URL: https://codereview.chromium.org/1180983002
/external/skia/dm/DM.cpp
c50acf2321d7a934c80d754e9cbe936dfb8eb4cc 01-Jul-2015 mtklein <mtklein@chromium.org> Remove SkThread.h, include SkMutex.h or SkAtomics.h as appropriate.

SkThread.h doesn't do anything anymore execept include those two,
and thankfully, it doesn't seem to be mentioned outside Skia.

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

BUG=skia:

Review URL: https://codereview.chromium.org/1215393002
/external/skia/dm/DM.cpp
aa2a7de0ffaf8f864a7afc68bbd34ccb25876246 01-Jul-2015 msarett <msarett@google.com> Revert of Switch SkJpegCode to libjpeg-turbo (patchset #28 id:710001 of https://codereview.chromium.org/1180983002/)

Reason for revert:
Broke iOS build.

Original issue's description:
> Add libjpeg-turbo library (depends on yasm)
> Mangle external function names to avoid conflict with libjpeg
> Take advantage of direct color conversion (RGBA, BGRA, 565)
> Prepare to use jpeg_skip_scanlines (when it is upstreamed)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/b60c3f8291529303299262dba19b1a896060bd2d
>
> Committed: https://skia.googlesource.com/skia/+/f8bf9181d7b0463c8e371755cfbb9ece90b34fc5
>
> Committed: https://skia.googlesource.com/skia/+/e9e3ee33f30c14c31afd5fc3fe4dda7f15783c75

TBR=scroggo@google.com,djsollen@google.com,emmaleer@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1213093003
/external/skia/dm/DM.cpp
e9e3ee33f30c14c31afd5fc3fe4dda7f15783c75 01-Jul-2015 msarett <msarett@google.com> Add libjpeg-turbo library (depends on yasm)
Mangle external function names to avoid conflict with libjpeg
Take advantage of direct color conversion (RGBA, BGRA, 565)
Prepare to use jpeg_skip_scanlines (when it is upstreamed)

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/b60c3f8291529303299262dba19b1a896060bd2d

Committed: https://skia.googlesource.com/skia/+/f8bf9181d7b0463c8e371755cfbb9ece90b34fc5

Review URL: https://codereview.chromium.org/1180983002
/external/skia/dm/DM.cpp
f657b1093ef22390d3ce1eb56686a8185408a84f 29-Jun-2015 msarett <msarett@google.com> Revert of Switch SkJpegCode to libjpeg-turbo (patchset #25 id:680001 of https://codereview.chromium.org/1180983002/)

Reason for revert:
yasm is leaking memory :(.

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN/builds/926/steps/build%20dm/logs/stdio

Original issue's description:
> Add libjpeg-turbo library (depends on yasm)
> Mangle external function names to avoid conflict with libjpeg
> Take advantage of direct color conversion (RGBA, BGRA, 565)
> Prepare to use jpeg_skip_scanlines (when it is upstreamed)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/b60c3f8291529303299262dba19b1a896060bd2d
>
> Committed: https://skia.googlesource.com/skia/+/f8bf9181d7b0463c8e371755cfbb9ece90b34fc5

TBR=scroggo@google.com,djsollen@google.com,emmaleer@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1214023003
/external/skia/dm/DM.cpp
f8bf9181d7b0463c8e371755cfbb9ece90b34fc5 29-Jun-2015 msarett <msarett@google.com> Add libjpeg-turbo library (depends on yasm)
Mangle external function names to avoid conflict with libjpeg
Take advantage of direct color conversion (RGBA, BGRA, 565)
Prepare to use jpeg_skip_scanlines (when it is upstreamed)

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/b60c3f8291529303299262dba19b1a896060bd2d

Review URL: https://codereview.chromium.org/1180983002
/external/skia/dm/DM.cpp
2766c00fc0b6a07d46e5f74cdad45da2ef625237 26-Jun-2015 mtklein <mtklein@chromium.org> remove SkInstCnt

It's been outclassed by Valgrind and leak sanitizer,
and it seems to be causing problems for external folks building Skia.

I'm not sure why our own builds seem unaffected.

Latest thread:
https://groups.google.com/forum/#!topic/skia-discuss/oj9FsQwwSF0

BUG=skia:

Review URL: https://codereview.chromium.org/1217573002
/external/skia/dm/DM.cpp
c0bdecb920a957665f66adefd3f3fb865e32e5d0 25-Jun-2015 mtklein <mtklein@google.com> Revert of Switch SkJpegCode to libjpeg-turbo (patchset #11 id:540001 of https://codereview.chromium.org/1180983002/)

Reason for revert:
https://uberchromegw.corp.google.com/i/client.skia.compile/builders/Build-Ubuntu-GCC-MipsDSP2-Debug-Android/builds/1136/steps/build%20most/logs/stdio

Original issue's description:
> Add libjpeg-turbo library (depends on yasm)
> Mangle external function names to avoid conflict with libjpeg
> Take advantage of direct color conversion (RGBA, BGRA, 565)
> Prepare to use jpeg_skip_scanlines (when it is upstreamed)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/b60c3f8291529303299262dba19b1a896060bd2d

TBR=scroggo@google.com,djsollen@google.com,emmaleer@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1199253006
/external/skia/dm/DM.cpp
b60c3f8291529303299262dba19b1a896060bd2d 25-Jun-2015 msarett <msarett@google.com> Add libjpeg-turbo library (depends on yasm)
Mangle external function names to avoid conflict with libjpeg
Take advantage of direct color conversion (RGBA, BGRA, 565)
Prepare to use jpeg_skip_scanlines (when it is upstreamed)

BUG=skia:

Review URL: https://codereview.chromium.org/1180983002
/external/skia/dm/DM.cpp
6f5e619b877b0dc1a42910637a6ffe37add98001 18-Jun-2015 scroggo <scroggo@google.com> Add SkWebpCodec, for decoding .webp images.

Based on SkImageDecoder_libwebp.

TODO:
Support YUV? (Longer term - may influence our API for SkImageGenerator)

BUG=skia:3257

Review URL: https://codereview.chromium.org/1044433002
/external/skia/dm/DM.cpp
f53ce808e9ff942c0bbc3c968e3d9393461c20db 15-Jun-2015 caryclark <caryclark@google.com> call portable font cleanup only once at app end

R=mtklein@google.com

Review URL: https://codereview.chromium.org/1180593005
/external/skia/dm/DM.cpp
824996aac96fdab1f326715782f354c104ec3204 12-Jun-2015 djsollen <djsollen@google.com> Update DM to respect blacklists for tests

Review URL: https://codereview.chromium.org/1173363011
/external/skia/dm/DM.cpp
0a24297be4737f5fe23b3b918b193260e64ab32d 11-Jun-2015 msarett <msarett@google.com> DM testing for skipping and scaling

BUG=skia:

Review URL: https://codereview.chromium.org/1175993005
/external/skia/dm/DM.cpp
83ca628cb6c959524edc3a696d7c3b5f7f1826ba 10-Jun-2015 caryclark <caryclark@google.com> Today's gm include many differences caused by platform font implementations.
This experiment replaces the label used in the aaxfermodes gm with
aliased text generated from paths common to all platforms.

Since there is no way today to generate all dm output from trybots,
this will be checked in to confirm that this strategy provides simpler
output across devices.

This does not introduce a new public interface; instead, dm uses
a extern backdoor to install the SkTypeface::CreateFromName
handler.

Review URL: https://codereview.chromium.org/1163283002
/external/skia/dm/DM.cpp
821e10ed41394adbdcd989ea9b32b059042cf0e9 04-Jun-2015 bsalomon <bsalomon@google.com> Add prelog flag to DM

Review URL: https://codereview.chromium.org/1158263004
/external/skia/dm/DM.cpp
9700206b67ef2a0aab9a8211c8a901d5123afa9f 27-May-2015 emmaleer <emmaleer@google.com> New CodeSrc* draw mode kScanline_Subset_Mode

kScanline_Subset_Mode decodes the image in subsets using a
scanline decoder.
The number of subsets can be specified by changing the constant divisor.
The number of subsets is equal to divisor*divisor.

Review URL: https://codereview.chromium.org/1157153003
/external/skia/dm/DM.cpp
50bc0510078b599c25a9bd2d34f1701521a0e142 19-May-2015 reed <reed@google.com> implement --quiet for DM

BUG=skia:

Review URL: https://codereview.chromium.org/1139413003
/external/skia/dm/DM.cpp
6fbf4b3a7f0a3304649c482ab0a911dc147a6825 06-May-2015 mtklein <mtklein@chromium.org> Do we still need this DOUBLE_LOOP feature?

If so, let's do it this way so it works for all source types and doesn't need
to be chosen at compile time.

BUG=skia:

Review URL: https://codereview.chromium.org/1129693003
/external/skia/dm/DM.cpp
d31c13d0441aecc8b2a4fa4f45fd5e59584cb3ea 05-May-2015 mtklein <mtklein@chromium.org> DM: add a Via to simulate SP pictures.

Will use this to test the other CL that adds small SkPicture implementations.

Not quite sure why patch_primitive doesn't draw the same in 8888 and sp-8888, but everything else does, so I'm not going to let that hold me back for now.

BUG=skia:

Review URL: https://codereview.chromium.org/1126613005
/external/skia/dm/DM.cpp
06a22f618cd2adbbd33634a701b5cf8353886d63 05-May-2015 reed <reed@google.com> add deferred config to DM

BUG=skia:

Review URL: https://codereview.chromium.org/1113273006
/external/skia/dm/DM.cpp
d75c466ef57ef4dbdf96390b2c01121e4de36f23 30-Apr-2015 mtklein <mtklein@chromium.org> DM+nanobench: print both current and max RSS.

out/Debug/dm:
( 360/380 MB 2112) 396ms gpu gm xfermodes

out/Release/nanobench:
32/33 MB 1659 2.46µs 2.55µs 2.54µs 2.67µs 2% ▄▄▄▅▅▃▂▁▂█ gpu gradient_conicalZero_clamp_hicolor

out/Debug/nanobench:
42/42 MB desk_css3gradients.skp_1 8888

BUG=skia:

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/1115203002
/external/skia/dm/DM.cpp
9e43cabaa1ff26167e990f0bcb9a5c20d662d52c 29-Apr-2015 msarett <msarett@google.com> Requires a minor API change to pass the color table to getScanlineDecoder, as we do with getPixels().

BUG=skia:3722

Review URL: https://codereview.chromium.org/1061713007
/external/skia/dm/DM.cpp
6393c0653e5338a093c3908a410bdfd2ea1bdcab 27-Apr-2015 mtklein <mtklein@chromium.org> Add source-data sharding to DM.

E.g. out/Debug/dm --shards 4 --shard 1

This shards all inputs, GMs, SKPs, tests, etc.

BUG=skia:

Review URL: https://codereview.chromium.org/1109813002
/external/skia/dm/DM.cpp
05641a5582bbb3ee40dc2c9ba21d837df9340583 21-Apr-2015 mtklein <mtklein@chromium.org> DM: failure to canary a sink is now fatal.

This requires we remove NVPR from the default set of configs, as we only find
out at runtime that it's not available. All the other defaults will either be
compiled in and supported, or not compiled in and non-fatally skipped as
unknown configs.

BUG=skia:

Review URL: https://codereview.chromium.org/1100773003
/external/skia/dm/DM.cpp
e16b04aa6041efb6507546547737e9603fa1606e 15-Apr-2015 msarett <msarett@google.com> SkJpegCodec

Enables basic decoding for jpegs

Includes rewinding

565, YUV, and Jpeg encoding are not yet implemented

BUG=skia:3257

Review URL: https://codereview.chromium.org/1076923002
/external/skia/dm/DM.cpp
a669bc37c613a18a07a879eb791253e5246f455a 14-Apr-2015 djsollen <djsollen@google.com> cleanup codec names being produced by dm and uploaded to gold

Review URL: https://codereview.chromium.org/1072933004
/external/skia/dm/DM.cpp
164d5b09b79e4794911a5a4ffb02f4a12f1f0c94 14-Apr-2015 msarett <msarett@google.com> Fixing use of initialized memory.

Disabling scanline decoding to kIndex8 until it can be implemented.

BUG=skia:3715

Review URL: https://codereview.chromium.org/1082923002
/external/skia/dm/DM.cpp
438b2adefb9e9213e0ddaf0609405d3087a1cf0a 09-Apr-2015 msarett <msarett@google.com> ***Disables swizzles to 565.
We may want to enable swizzles to 565
for images that are encoded in a format
similar to 565, however, we do not want
to take images that decode naturally to
kN32 and then convert them to 565.

***Enable swizzles to kIndex_8. For images
encoded in a color table format, we suggest
that they be decoded to kIndex_8. When we
decode, we only allow conversion to kIndex_8
if it matches the suggested color type (except
wbmp which seems good as is).

***Modify dm to test images that decode to
kIndex_8.

BUG=skia:3257
BUG=skia:3440

Review URL: https://codereview.chromium.org/1055743003
/external/skia/dm/DM.cpp
b0531a790cc4ec2f903c79206c0c1053108664f5 07-Apr-2015 mtklein <mtklein@chromium.org> Move uninteresting MD5 check to after adding it to JSON.

BUG=skia:3676

Review URL: https://codereview.chromium.org/1067053002
/external/skia/dm/DM.cpp
b7e8d69fc21a3043348fd9b76876471e0a6ae7fe 07-Apr-2015 mtklein <mtklein@chromium.org> Add a Via to DM that records into two pictures and draws using the second.

I'm going to start hacking on SkCanvas a bit to allow a fast reset method,
and I want to have some testing checking me.

BUG=skia:

Review URL: https://codereview.chromium.org/1062043004
/external/skia/dm/DM.cpp
09ed480906881b6f84bb28c772786928ba3a59d6 03-Apr-2015 borenet <borenet@google.com> Add --uninterestingHashesFile to DM

The file is expected to contain a list of strings. If the hash for
any result is in this file, don't write an image for it.

BUG=skia:3521

Review URL: https://codereview.chromium.org/1059363002
/external/skia/dm/DM.cpp
0d243ffe352f6b0063286334c79f1ea84b3b48fa 03-Apr-2015 mtklein <mtklein@chromium.org> Doesn't usually matter for well-formed blacklists,
but helps us not run off the end.

BUG=skia:

Review URL: https://codereview.chromium.org/1059243002
/external/skia/dm/DM.cpp
54416de52381ac11dd755100a8025debf595873a 03-Apr-2015 djsollen <djsollen@google.com> Update DM to allow Src's to have optional options.

Review URL: https://codereview.chromium.org/1059513002
/external/skia/dm/DM.cpp
4808757d7a8bbe8c773a312a894738e9ff701b5f 02-Apr-2015 borenet <borenet@google.com> Remove all code related to NaCl

BUG=skia:3600
DOCS_PREVIEW= https://skia.org/?cl=1036283002

Review URL: https://codereview.chromium.org/1036283002
/external/skia/dm/DM.cpp
8c8f22a3bba18edaad41d6ac8451a77aa093a958 01-Apr-2015 msarett <msarett@google.com> Creating a new wrapper for gif decoder

BUG=skia:3257
BUG=skia:3534

Review URL: https://codereview.chromium.org/1022673011
/external/skia/dm/DM.cpp
a096d7a6d03662073f4cd46f7db5fe2cf5495c36 27-Mar-2015 halcanary <halcanary@google.com> SkCodec: add wbmp class

Review URL: https://codereview.chromium.org/1006583005
/external/skia/dm/DM.cpp
36352bf5e38f45a70ee4f4fc132a38048d38206d 26-Mar-2015 mtklein <mtklein@chromium.org> C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}

NOPRESUBMIT=true

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002

Review URL: https://codereview.chromium.org/1037793002
/external/skia/dm/DM.cpp
9c59ebc0db7cade1537591813430f7be47123e76 25-Mar-2015 scroggo <scroggo@google.com> Test scanline decoding in DM.

BUG=skia:3475

Review URL: https://codereview.chromium.org/999173010
/external/skia/dm/DM.cpp
478652e918d73a4c0330e27e03eaa9564138c0f7 25-Mar-2015 scroggo <scroggo@google.com> Add copyright headers DM.

Review URL: https://codereview.chromium.org/1037713003
/external/skia/dm/DM.cpp
9bde918754bc292469d801f156f3b626eb3db780 25-Mar-2015 msarett <msarett@google.com> Enabling ico decoding with use of png and bmp decoders

BUG=skia:3257

NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/1011343003
/external/skia/dm/DM.cpp
7aa846c6837f527067e7ab5fdeacdbd502696382 24-Mar-2015 tomhudson <tomhudson@google.com> Revert of Enabling ico decoding with use of png and bmp decoders (patchset #10 id:280001 of https://codereview.chromium.org/1011343003/)

Reason for revert:
Reverting on suspicion of massive bot failures - possible command line too long?

Original issue's description:
> Enabling ico decoding with use of png and bmp decoders
>
> BUG=skia:3257
>
> Committed: https://skia.googlesource.com/skia/+/15bfd075d38e4422a477e22940d06a137f66cc97

TBR=scroggo@google.com,reed@google.com,djsollen@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3257

Review URL: https://codereview.chromium.org/1022843005
/external/skia/dm/DM.cpp
15bfd075d38e4422a477e22940d06a137f66cc97 24-Mar-2015 msarett <msarett@google.com> Enabling ico decoding with use of png and bmp decoders

BUG=skia:3257

Review URL: https://codereview.chromium.org/1011343003
/external/skia/dm/DM.cpp
02f46cf878535fb79317d15ebed66dfa3f2cd772 20-Mar-2015 mtklein <mtklein@chromium.org> Some usability ideas around SkTHash.

- By default, use new SkGoodHash to hash keys, which is:
* for 4 byte values, use SkChecksum::Mix,
* for SkStrings, use SkChecksum::Murmur3 on the data,
* for other structs, shallow hash the struct with Murmur3.
- Expand SkChecksum::Murmur3 to support non-4-byte-aligned data.
- Add const foreach() methods.
- Have foreach() take a functor, which allows lambdas.

BUG=skia:

Review URL: https://codereview.chromium.org/1021033002
/external/skia/dm/DM.cpp
9b77ddde08efe702256355a333cf31ade8f15bb0 19-Mar-2015 scroggo <scroggo@google.com> Run CodecSrc DM.

Rather than making SkCodec an option instead of SkImageDecoder,
create a separate CodecSrc. This allows us to compare the two.

For both CodecSrc and ImageSrc, do not decode to a gpu backend.

BUG=skia:3475

Review URL: https://codereview.chromium.org/978823002
/external/skia/dm/DM.cpp
b37cb41a8bfc1bdf65fb8387c24d45da7cf8b7da 18-Mar-2015 mtklein <mtklein@chromium.org> Display currently running tests as the keepalive message.

...
( 466MB 550) 31.9ms gpu gm colorwheelnative
( 466MB 549) 50.1ms gpu gm colorwheel
( 468MB 548) 512ms gpu gm colortype_xfermodes
Currently running:
unit test PathOpsRectsThreaded
unit test PathOpsSimplifyDegeneratesThreaded
unit test PathOpsSimplifyQuadralateralsThreaded
gpu gm colortype

( 468MB 547) 90.8ms gpu gm colortype
( 469MB 546) 2.03s unit test PathOpsSimplifyDegeneratesThreaded
...

BUG=skia:

Review URL: https://codereview.chromium.org/1017903002
/external/skia/dm/DM.cpp
95553d917c73ef333ede967521560957a5b6a0ad 12-Mar-2015 mtklein <mtklein@chromium.org> DM: display current memory usage (instead of peak) when available.

Seems strictly more useful.

This implements Mac and Windows, which seemed easy. Don't know how to do this on Linux yet.

BUG=skia:

CQ_EXTRA_TRYBOTS=client.skia:Test-Mac10.9-MacMini6.2-HD4000-x86_64-Debug-Trybot

NOTREECHECKS=true
TBR=halcanary@google.com

Review URL: https://codereview.chromium.org/990723002
/external/skia/dm/DM.cpp
2e1c47e13551dfc592bd3d92074f3f4b69c4b6a9 12-Mar-2015 mtklein <mtklein@chromium.org> Rejigger keep-alive thread so TSAN and LSAN don't complain.

BUG=skia:

Review URL: https://codereview.chromium.org/1006443002
/external/skia/dm/DM.cpp
de6fc2bf464b734f35449c40421064b33cd9e2b4 12-Mar-2015 mtklein <mtklein@chromium.org> DM: add keepalive for Valgrind bot.

BUG=skia:

Review URL: https://codereview.chromium.org/998263003
/external/skia/dm/DM.cpp
a6def476e98f92e6789dfa402283a7c44ee26cee 11-Mar-2015 mtklein <mtklein@chromium.org> DM: show skipped and --blacklist notes only in verbose mode.

In non-verbose mode, these notes will spin away too fast to read anyway,
unless they're so long they end up leaving junk on the terminal.

NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/989083002
/external/skia/dm/DM.cpp
4089ef7c982592fadeec441438c551ffb4c746be 05-Mar-2015 mtklein <mtklein@chromium.org> DM: support non-fatal errors

Tasks that produce a non-fatal error will bail out before writing their output to
disk and hash to dm.json, but not count as failures.

This also makes true failures bail out before writing their results. If the DM
program failed, we probably don't want to triage that image result.

We use this new feature first to skip image subset decoding when we detect it's
not supported. Here's a snippet of an example run, where in this case only
.webp are subset decodable:

...
( 15MB 12) 172µs 8888 subset color_wheel.jpg (skipped: Subset decoding not supported.)
( 15MB 11) 9.05ms 8888 subset randPixels.webp
( 16MB 10) 863µs 8888 subset baby_tux.png (skipped: Subset decoding not supported.)
...

Only outputs corresponding to the .webp show up, both on disk and in the .json.

BUG=skia:

Review URL: https://codereview.chromium.org/980333002
/external/skia/dm/DM.cpp
64de1e179012302d5f3b805d0736a583ad91c6a2 05-Mar-2015 tomhudson <tomhudson@google.com> ViaAndroidSDK for DM

Make a Via for DM which transforms a set of draws to be more like what
we'd see through the Android Framework's HWUI API. Only built inside
Android's framework because we depend on HWUI classes for half of
those transformations.

Tested with --config androidsdk-8888 and --config androidsdk-hwui.

R=djsollen@google.com,mtklein@google.com,reed@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/974913002
/external/skia/dm/DM.cpp
47ef4d5d934bba86848aa238efab21f54a160c1a 03-Mar-2015 halcanary <halcanary@google.com> XPS, DM: add SkDocument::CreateXPS

- SkDocument::CreateXPS() function added, returns NULL on non-Windows OS.

- DM: (Windows only) an XPSSink is added, fails on non-Windows OS

- DM: Common code for PDFSink::draw and XPSSink::draw are factored into
draw_skdocument static function.

- SkDocument_XPS (Windows only) implementation of SkDocument via
SkXPSDevice.

- SkDocument_XPS_None (non-Windows) returns NULL for
SkDocument::CreateXPS().

- gyp/xps.gyp refactored.

- SkXPSDevice::drawTextOnPath removed (see http://crrev.com/925343003 )

- SkXPSDevice::drawPath supports conics via SkAutoConicToQuads.

Review URL: https://codereview.chromium.org/963953002
/external/skia/dm/DM.cpp
c2574f3657b1359496a4eba5b191961974b3a64f 03-Mar-2015 halcanary <halcanary@google.com> Revert of XPS, DM: add SkDocument::CreateXPS (patchset #8 id:310001 of https://codereview.chromium.org/963953002/)

Reason for revert:
breaking iOS build.

Original issue's description:
> XPS, DM: add SkDocument::CreateXPS
>
> - SkDocument::CreateXPS() function added, returns NULL on non-Windows OS.
>
> - DM: (Windows only) an XPSSink is added, fails on non-Windows OS
>
> - DM: Common code for PDFSink::draw and XPSSink::draw are factored into
> draw_skdocument static function.
>
> - SkDocument_XPS (Windows only) implementation of SkDocument via
> SkXPSDevice.
>
> - SkDocument_XPS_None (non-Windows) returns NULL for
> SkDocument::CreateXPS().
>
> - gyp/xps.gyp refactored.
>
> - SkXPSDevice::drawTextOnPath removed (see http://crrev.com/925343003 )
>
> - SkXPSDevice::drawPath supports conics via SkAutoConicToQuads.
>
> NOPRESUBMIT=true
>
> Committed: https://skia.googlesource.com/skia/+/00d39bcbfc8394a9b48b86b04ab06ec19091fa43

TBR=reed@google.com,bungeman@google.com,mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/978443002
/external/skia/dm/DM.cpp
00d39bcbfc8394a9b48b86b04ab06ec19091fa43 03-Mar-2015 halcanary <halcanary@google.com> XPS, DM: add SkDocument::CreateXPS

- SkDocument::CreateXPS() function added, returns NULL on non-Windows OS.

- DM: (Windows only) an XPSSink is added, fails on non-Windows OS

- DM: Common code for PDFSink::draw and XPSSink::draw are factored into
draw_skdocument static function.

- SkDocument_XPS (Windows only) implementation of SkDocument via
SkXPSDevice.

- SkDocument_XPS_None (non-Windows) returns NULL for
SkDocument::CreateXPS().

- gyp/xps.gyp refactored.

- SkXPSDevice::drawTextOnPath removed (see http://crrev.com/925343003 )

- SkXPSDevice::drawPath supports conics via SkAutoConicToQuads.

NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/963953002
/external/skia/dm/DM.cpp
eebc39ad5a1dcbde1b10a9b2ab54679549522b52 23-Feb-2015 tomhudson <tomhudson@google.com> Add HWUI Sink to DM on Android Framework builds

Allows "hwui" as a --config argument to dm, drawing through the Android
Framework's HWUI backend.

R=djsollen@google.com,mtklein@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/943393002
/external/skia/dm/DM.cpp
a82f562725cc7309fa158f04d4faa9859be318f5 20-Feb-2015 mtklein <mtklein@chromium.org> Use simpler SkTHashSet in DM to store reference gold

It's simpler and doesn't leak the gold anymore.

BUG=skia:

Review URL: https://codereview.chromium.org/940283006
/external/skia/dm/DM.cpp
d603b22903bf7c023226bf52bd7c1f49a9bee1bf 17-Feb-2015 mtklein <mtklein@chromium.org> Suggested version with 'undo'.

BUG=skia:

Review URL: https://codereview.chromium.org/931483002
/external/skia/dm/DM.cpp
95f192d19938b98a45dd1fa4112d965f60d10516 13-Feb-2015 msarett <msarett@google.com> Adding new benchmark to test image decoding performance.

BUG=skia:

Review URL: https://codereview.chromium.org/918673002
/external/skia/dm/DM.cpp
6dee2ad388152cd960253021009f109d45db1fe4 05-Feb-2015 mtklein <mtklein@chromium.org> Try again to use a C++11 feature in DM as a canary.

CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu13.10-GCC4.8-NaCl-Release-Trybot,Build-Mac10.7-Clang-Arm7-Debug-iOS-Trybot

BUG=skia:

Review URL: https://codereview.chromium.org/898863003
/external/skia/dm/DM.cpp
b9eb4ac0f1c29d6fe10ad7ff81ed8326ac1ea043 03-Feb-2015 mtklein <mtklein@chromium.org> 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
/external/skia/dm/DM.cpp
e67164d9b3a0fcc5f7d2a4149041284f7cde31b9 02-Feb-2015 mtklein <mtklein@chromium.org> DM: wire up --leaks / -l again

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

BUG=skia:

Review URL: https://codereview.chromium.org/893043002
/external/skia/dm/DM.cpp
8a4527e98a57b1d2dd248a635f0c4fa227be2089 01-Feb-2015 mtklein <mtklein@chromium.org> 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
/external/skia/dm/DM.cpp
edc93bc74003e2c19219ba0b30383868b5371a96 30-Jan-2015 mtklein <mtklein@chromium.org> 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
/external/skia/dm/DM.cpp
8d17a13a71edb0d8412e4354c428582b74587b79 30-Jan-2015 mtklein <mtklein@chromium.org> DM: paths as implict strings too.

BUG=skia:

Review URL: https://codereview.chromium.org/891823002
/external/skia/dm/DM.cpp
022afb8384019b448c7c1c62a9ff63fa9e477737 30-Jan-2015 halcanary <halcanary@google.com> DM::NullSink

Motivation: The null sink can act as a control for experiments.

Review URL: https://codereview.chromium.org/873723007
/external/skia/dm/DM.cpp
23b03c3c5a79d624c12bd1af5d11ba87967c53e2 30-Jan-2015 halcanary <halcanary@google.com> dm: allow multiple --images flags, allow single files

Review URL: https://codereview.chromium.org/872993005
/external/skia/dm/DM.cpp
fc37ad168090637973bf21452aa2685cfcbb273c 30-Jan-2015 halcanary <halcanary@google.com> dm: allow multiple --skp flags, allow single files

Review URL: https://codereview.chromium.org/885353002
/external/skia/dm/DM.cpp
9c3f17d6e859a11535f40497cb9f6e777d15f62e 28-Jan-2015 mtklein <mtklein@chromium.org> Fold gmtoskp into DM, as --src gm --config skp.

BUG=skia:

Review URL: https://codereview.chromium.org/885733002
/external/skia/dm/DM.cpp
62bd1a69ea49318aa5022151262c842887e0ecf4 27-Jan-2015 mtklein <mtklein@chromium.org> add -r to DM

$ out/Debug/dm -w good
$ out/Debug/dm -r good -w bad && echo "hooray no diffs!"

BUG=skia:

Review URL: https://codereview.chromium.org/863093003
/external/skia/dm/DM.cpp
a17241bd0a59efd6c30a007db8f10274b8f80f26 23-Jan-2015 mtklein <mtklein@chromium.org> Write dm.json periodically instead of only once at the end.

This way if a bot crashes, we might get some partial results in gold rather
than none. We do the same sort of thing in nanobench for perf.

BUG=skia:3255

Review URL: https://codereview.chromium.org/872443003
/external/skia/dm/DM.cpp
55e88b226ccb85d2c712a9e3e9e1f5bdcaac05ac 22-Jan-2015 mtklein <mtklein@chromium.org> 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
/external/skia/dm/DM.cpp
7edca21226017e6b87a0c95fa571d34c36ceca04 21-Jan-2015 mtklein <mtklein@chromium.org> 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
/external/skia/dm/DM.cpp
6c5fed2d5c18129a2ae6ef461d75e388f1b0bacd 20-Jan-2015 mtklein <mtklein@chromium.org> DM: --tests -> --src tests

BUG=skia:3255

Review URL: https://codereview.chromium.org/856173002
/external/skia/dm/DM.cpp
19f306013e2a88acb7f5c7322c6f751c8a74f6e4 20-Jan-2015 mtklein <mtklein@chromium.org> Allow pdf as a --config.

We just can't run this on the bots yet. It's fine locally.

BUG=skia:3255

Review URL: https://codereview.chromium.org/857373002
/external/skia/dm/DM.cpp
9264a95608c08623f2955823703e5c77558cafa8 20-Jan-2015 mtklein <mtklein@chromium.org> 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
/external/skia/dm/DM.cpp
87f3ba4847aa575016eb3a21e944197d757df8c0 20-Jan-2015 halcanary <halcanary@google.com> Simplify skiatest framework.

skiatest::Test class is now a simple struct. Some
functionalty, such as counting errors or timing is now
handled elsewhere.

skiatest:Reporter is now a simpler abstract class. The two
implementations handle test errors.

DM and pathops_unittest updated.

Review URL: https://codereview.chromium.org/830513004
/external/skia/dm/DM.cpp
05982367f5ee85a5f0359bb9063c3dbefbd5aa59 16-Jan-2015 mtklein <mtklein@google.com> Revert of Add temporary blacklist debugging. (patchset #1 id:1 of https://codereview.chromium.org/805643004/)

Reason for revert:
fixed!

Original issue's description:
> Add temporary blacklist debugging.
>
> Not sure why blacklists don't seem to work on bots. They look right.
>
> NOTREECHECKS=true
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/f77156e1925cd5d5504070fe5533a4c456732c1b

TBR=mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/851903003
/external/skia/dm/DM.cpp
f77156e1925cd5d5504070fe5533a4c456732c1b 16-Jan-2015 mtklein <mtklein@chromium.org> Add temporary blacklist debugging.

Not sure why blacklists don't seem to work on bots. They look right.

NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/805643004
/external/skia/dm/DM.cpp
9dc0910c2cf4cc41a9a7eaa6bcee914844155205 16-Jan-2015 mtklein <mtklein@chromium.org> newlines after failures

NOTREECHECKS=true

BUG=skia:3255

Review URL: https://codereview.chromium.org/853123003
/external/skia/dm/DM.cpp
2f64eec5df75d96178c667ebba0be965eae16440 15-Jan-2015 mtklein <mtklein@chromium.org> Totally serialize gpu tests on Windows.

NOTREECHECKS=true

BUG=skia:3255

Review URL: https://codereview.chromium.org/845193006
/external/skia/dm/DM.cpp
e1315526cdec7ab08b0a2940f449dd7e1c9173ff 15-Jan-2015 mtklein <mtklein@chromium.org> Turn back on image and subset sources now that they're blacklisted on Android.

To land after https://codereview.chromium.org/850403002/

NOTREECHECKS=true

BUG=skia:3255

Review URL: https://codereview.chromium.org/857483003
/external/skia/dm/DM.cpp
a2ef642b00fdd58512b0889d12796d963a27f739 15-Jan-2015 mtklein <mtklein@chromium.org> DM: add basic --blacklist <config> <srcType> <name> functionality.

NOTREECHECKS=true

BUG=skia:3255

Review URL: https://codereview.chromium.org/817573005
/external/skia/dm/DM.cpp
82d2843cc59dc048b7d8d1d928dab743d8e85a3b 15-Jan-2015 mtklein <mtklein@chromium.org> turn back on gpu tests

NOTREECHECKS=true

BUG=skia:3255

Review URL: https://codereview.chromium.org/817573004
/external/skia/dm/DM.cpp
748ca3bf2d170708f263693e8579e6722389d0ef 15-Jan-2015 mtklein <mtklein@chromium.org> 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
/external/skia/dm/DM.cpp
114c3cd0543d77aa0ac08d8af436ac7f9d32714d 15-Jan-2015 mtklein <mtklein@google.com> 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
/external/skia/dm/DM.cpp
709d2c3e5062c5b57f91273bfc11a751f5b2bb88 15-Jan-2015 mtklein <mtklein@chromium.org> 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
/external/skia/dm/DM.cpp
9e398f79c95640359847a153f53f30a2823be40c 10-Jan-2015 halcanary <halcanary@google.com> add --rasterPDF flag to DM

If no rasterizer is compiled in, this flag does nothing. Default
value (true) gives the same behavior as before.

Review URL: https://codereview.chromium.org/830333005
/external/skia/dm/DM.cpp
1d09ee7c04d635e93bb85d2e2ac39f445f5540aa 15-Dec-2014 scroggo <scroggo@google.com> Add more filetypes to DM's image tests.

ico, wbmp, plus the alternate suffix jpeg.

Also check for capitalized versions, since files sometimes use
capitalized suffixes.

BUG=skia:3235

Review URL: https://codereview.chromium.org/798383003
/external/skia/dm/DM.cpp
f6139f7c3867a70a750620cd34ce10338a54086e 13-Dec-2014 mtklein <mtklein@chromium.org> Add image decoding mode to DM.

This is meant to supplant skimage.

BUG=skia:3235

Review URL: https://codereview.chromium.org/802793002
/external/skia/dm/DM.cpp
3b27adef0a52f6d321fdee7412ef69e7a7284bcc 13-Nov-2014 jcgregorio <jcgregorio@google.com> Revert of Make nanobench and dm be usable from Chromium build (patchset #5 id:80001 of https://codereview.chromium.org/657373002/)

Reason for revert:
Causing breakages on Mac build.

Original issue's description:
> Make nanobench and dm be usable from Chromium build
>
> Move the app logic for each app as follows:
>
> <app>.cpp -- the file which contains main(). Embedders that compile
> their own apps, such as ios shell, upcoming Chromium dm etc, do not use this.
>
> <app>_main.cpp -- the main logic of the Skia test application. This will be
> used by Skia -compiled apps as well as embedder -compiled apps.
>
> <app>_main.h -- the API for the main logic. This will be
> used by Skia -compiled apps as well as embedder -compiled apps.
>
> This way (the upcoming) Chromium dm can setup its Chromium-specific setup
> in custom main(), and then call dm_main(), without the need of any
> SK_BUILD_FOR_XXXX defines controlling whether the tool defines main or not.
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/c092d3bdab5f723576cc0346cea3ee282a9cb444

TBR=mtklein@chromium.org,mtklein@google.com,borenet@google.com,kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/724073002
/external/skia/dm/DM.cpp
c092d3bdab5f723576cc0346cea3ee282a9cb444 13-Nov-2014 kkinnunen <kkinnunen@nvidia.com> Make nanobench and dm be usable from Chromium build

Move the app logic for each app as follows:

<app>.cpp -- the file which contains main(). Embedders that compile
their own apps, such as ios shell, upcoming Chromium dm etc, do not use this.

<app>_main.cpp -- the main logic of the Skia test application. This will be
used by Skia -compiled apps as well as embedder -compiled apps.

<app>_main.h -- the API for the main logic. This will be
used by Skia -compiled apps as well as embedder -compiled apps.

This way (the upcoming) Chromium dm can setup its Chromium-specific setup
in custom main(), and then call dm_main(), without the need of any
SK_BUILD_FOR_XXXX defines controlling whether the tool defines main or not.

BUG=skia:2992

Review URL: https://codereview.chromium.org/657373002
/external/skia/dm/DM.cpp
4736e1434ae329e3a737dfd9504c22b3fc13dc72 07-Nov-2014 jvanverth <jvanverth@google.com> Get gpudft support working in dm, gm, nanobench and bench_pictures

Adds a new config to test distance field text.
Clean up some flags and #defines to read "distance field text",
not "distance field fonts" to be consistent with Chromium

NOTREECHECKS=true

Committed: https://skia.googlesource.com/skia/+/06ba179838ba4fe187cf290750aeeb4a02a2960b

Review URL: https://codereview.chromium.org/699453005
/external/skia/dm/DM.cpp
aa30ab3079ad3c1f408e3f170dac1cdd42ed2b62 06-Nov-2014 jvanverth <jvanverth@google.com> Revert of Get gpudft support working in dm, gm, nanobench and bench_pictures (patchset #2 id:20001 of https://codereview.chromium.org/699453005/)

Reason for revert:
Not compiling in ANGLE build

Original issue's description:
> Get gpudft support working in dm, gm, nanobench and bench_pictures
>
> Adds a new config to test distance field text.
> Clean up some flags and #defines to read "distance field text",
> not "distance field fonts" to be consistent with Chromium
>
> NOTREECHECKS=true
>
> Committed: https://skia.googlesource.com/skia/+/06ba179838ba4fe187cf290750aeeb4a02a2960b

TBR=bsalomon@google.com,mtklein@google.com,reed@google.com
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/707723005
/external/skia/dm/DM.cpp
06ba179838ba4fe187cf290750aeeb4a02a2960b 06-Nov-2014 jvanverth <jvanverth@google.com> Get gpudft support working in dm, gm, nanobench and bench_pictures

Adds a new config to test distance field text.
Clean up some flags and #defines to read "distance field text",
not "distance field fonts" to be consistent with Chromium

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/699453005
/external/skia/dm/DM.cpp
7a10fb6bead0f63623307a7ff71b1dd323534a7f 04-Nov-2014 scroggo <scroggo@google.com> Separate JSON functions from DMWriteTask.

Add JsonWriter, which handles Json output from DM, in preparation for
adding json output for tests. This change should not affect behavior.

BUG=skia:2454

Review URL: https://codereview.chromium.org/702513003
/external/skia/dm/DM.cpp
3dc5d704599688a5af4ec2c4cbd5bb685ff121c3 27-Oct-2014 halcanary <halcanary@google.com> Use MacOS's CoreGraphics PDF Rasterizer in DM

BUG=3061

Review URL: https://codereview.chromium.org/650323004
/external/skia/dm/DM.cpp
06cddec8570cbf29f89e89736afb0487b5b95abd 24-Oct-2014 bsalomon <bsalomon@google.com> Print GPU cache stats in nanobench/dm with veryVerbose

Review URL: https://codereview.chromium.org/680553002
/external/skia/dm/DM.cpp
197ceda92966359962c51923a01dd2b0018b080f 09-Sep-2014 mtklein <mtklein@chromium.org> Remove expectations / -r from DM entirely.

It's getting tricky to coordinate changes to output for bots with -r,
and -r is not widely used. The suggested alternative is to run skdiff.

BUG=skia:
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/553583004
/external/skia/dm/DM.cpp
23c94f05cad79f6f8d303c1b4ffb6d0b91671e83 08-Sep-2014 mtklein <mtklein@chromium.org> Let .skps have Expectations (i.e. work with -r) too.

BUG=skia:
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/549183002
/external/skia/dm/DM.cpp
1d0f1642e8bc0fda200972926e2eaa99744e4d93 08-Sep-2014 mtklein <mtklein@chromium.org> Start to rework DM JSON handling.

DM's striking off into its own JSON world. This gets strawman implementations
in place for writing and reading a JSON file mapping test name to hashes.

For what it's worth, I basically want to change _all_ these pieces,
- MD5 is slow and we can replace it with something faster,
- JSON schema needs room to grow more data,
- it'd be nice to hash once instead of twice when reading and writing,
- this code wants lots of refactoring,
but this gives us a starting platform to work on these bits at our leisure.

E.x. file for now:

mtklein@mtklein ~/skia (dm)> cat good/dm.json
{
"3x3bitmaprect_565" : "fc70d985fbfbe70e3a3c9dc626d4f5bc",
"3x3bitmaprect_8888" : "df1591dde35907399734ea19feb76663",
"3x3bitmaprect_gpu" : "df1591dde35907399734ea19feb76663",
"aaclip_565" : "1862798689b838a7ab0dc0652b9ace3a",
"aaclip_8888" : "47bb314329f0ce243f1d83fd583decb7",
"aaclip_gpu" : "75f72412d0ef4815770202d297246e7d",
...

BUG=skia:
R=jcgregorio@google.com, stephana@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/546873002
/external/skia/dm/DM.cpp
406654be7a930b484159f5bca107d3b11d8a9ede 04-Sep-2014 mtklein <mtklein@chromium.org> SkThreadPool ~~> SkTaskGroup

SkTaskGroup is like SkThreadPool except the threads stay in
one global pool. Each SkTaskGroup itself is tiny (4 bytes)
and its wait() method applies only to tasks add()ed to that
instance, not the whole thread pool.

This means we don't need to bring up new thread pools when
tests themselves want to use multithreading (e.g. pathops,
quilt). We just create a new SkTaskGroup and wait for that
to complete. This should be more efficient, and allow us
to expand where we use threads to really latency sensitive
places. E.g. we can probably now use these in nanobench
for CPU .skp rendering.

Now that all threads are sharing the same pool, I think we
can remove most of the custom mechanism pathops tests use
to control threading. They'll just ride on the global pool
with all other tests now.

This (temporarily?) removes the GPU multithreading feature
from DM, which we don't use.

On my desktop, DM runs a little faster (57s -> 55s) in
Debug, and a lot faster in Release (36s -> 24s). The bots
show speedups of similar proportions, cutting more than a
minute off the N4/Release and Win7/Debug runtimes.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/9c7207b5dc71dc5a96a2eb107d401133333d5b6f

R=caryclark@google.com, bsalomon@google.com, bungeman@google.com, mtklein@google.com, reed@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/531653002
/external/skia/dm/DM.cpp
2460bbdfbb1d55ef307c3189c661e65de1a7affb 03-Sep-2014 mtklein <mtklein@google.com> Revert of SkThreadPool ~~> SkTaskGroup (patchset #4 id:60001 of https://codereview.chromium.org/531653002/)

Reason for revert:
Leaks, leaks, leaks.

Original issue's description:
> SkThreadPool ~~> SkTaskGroup
>
> SkTaskGroup is like SkThreadPool except the threads stay in
> one global pool. Each SkTaskGroup itself is tiny (4 bytes)
> and its wait() method applies only to tasks add()ed to that
> instance, not the whole thread pool.
>
> This means we don't need to bring up new thread pools when
> tests themselves want to use multithreading (e.g. pathops,
> quilt). We just create a new SkTaskGroup and wait for that
> to complete. This should be more efficient, and allow us
> to expand where we use threads to really latency sensitive
> places. E.g. we can probably now use these in nanobench
> for CPU .skp rendering.
>
> Now that all threads are sharing the same pool, I think we
> can remove most of the custom mechanism pathops tests use
> to control threading. They'll just ride on the global pool
> with all other tests now.
>
> This (temporarily?) removes the GPU multithreading feature
> from DM, which we don't use.
>
> On my desktop, DM runs a little faster (57s -> 55s) in
> Debug, and a lot faster in Release (36s -> 24s). The bots
> show speedups of similar proportions, cutting more than a
> minute off the N4/Release and Win7/Debug runtimes.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/9c7207b5dc71dc5a96a2eb107d401133333d5b6f

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

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/533393002
/external/skia/dm/DM.cpp
9c7207b5dc71dc5a96a2eb107d401133333d5b6f 03-Sep-2014 mtklein <mtklein@chromium.org> SkThreadPool ~~> SkTaskGroup

SkTaskGroup is like SkThreadPool except the threads stay in
one global pool. Each SkTaskGroup itself is tiny (4 bytes)
and its wait() method applies only to tasks add()ed to that
instance, not the whole thread pool.

This means we don't need to bring up new thread pools when
tests themselves want to use multithreading (e.g. pathops,
quilt). We just create a new SkTaskGroup and wait for that
to complete. This should be more efficient, and allow us
to expand where we use threads to really latency sensitive
places. E.g. we can probably now use these in nanobench
for CPU .skp rendering.

Now that all threads are sharing the same pool, I think we
can remove most of the custom mechanism pathops tests use
to control threading. They'll just ride on the global pool
with all other tests now.

This (temporarily?) removes the GPU multithreading feature
from DM, which we don't use.

On my desktop, DM runs a little faster (57s -> 55s) in
Debug, and a lot faster in Release (36s -> 24s). The bots
show speedups of similar proportions, cutting more than a
minute off the N4/Release and Win7/Debug runtimes.

BUG=skia:
R=caryclark@google.com, bsalomon@google.com, bungeman@google.com, mtklein@google.com, reed@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/531653002
/external/skia/dm/DM.cpp
60c7707958a542112add1dcb246cdf9135dda870 14-Aug-2014 mtklein <mtklein@chromium.org> Guard ANGLE and MESA instead of defining them as native when unsupported.

Since we've added "angle" to the default list of configs we've been running
kNative_GLContextType tests twice in DM, once for the real native, once for
angle. This pointlessly doubles the GPU critical path in DM. Whoops.

NOTREECHECKS=true

BUG=skia:
R=bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/471063002
/external/skia/dm/DM.cpp
72ebb9f1dc1ed4d64127b02fed93446b278069d1 07-Aug-2014 mtklein <mtklein@chromium.org> DM: conserve memory when using --skps

- limit to maximum 1000x1000 viewport like in bench_pictures and nanobench
- use lazy bitmap decoding when reading the pictures from disk

BUG=skia:
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/448263002
/external/skia/dm/DM.cpp
36ea6c81c2a249ef344d438943050ec960631f0d 05-Aug-2014 mtklein <mtklein@chromium.org> For some reason, starting tests before gms makes DM run much faster.

Must be getting the path ops tests going early helps?

On my desktop,
Release: 50s -> 24s
Debug: 62s -> 40s

BUG=skia:
R=bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/435423003
/external/skia/dm/DM.cpp
92007583e43115998412ac8b0a06cc2780eb025c 01-Aug-2014 mtklein <mtklein@chromium.org> SKPs-as-benches in nanobench

This is meant to replace bench_pictures.

CQ_EXTRA_TRYBOTS=tryserver.skia:Build-Mac10.7-Clang-Arm7-Release-iOS-Trybot

BUG=skia:
R=bsalomon@google.com, jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/425393004
/external/skia/dm/DM.cpp
992c7b03ef7914a18bfd78e965b0b4c99a5f5672 31-Jul-2014 Cary Clark <caryclark@google.com> Add standard fonts to all GMs.

Allow GM results to be compared across machines and platforms by
standardizing the fonts used by all tests.

This adds runtime flags to DM to use either the system font context (the
default), the fonts in the resources directory ( --resourceFonts ) or a set
of canonical paths generated from the fonts ( --portableFonts ).

This CL should leave the current DM results unchanged by default.

If the portable font data or resource font is missing when DM is run, it
falls back to using the system font context.

The create_test_font tool generates the paths and metrics read by DM
with the --portableFonts flag set, and generates the font substitution
tables read by DM with the --resourceFonts flag set.

If DM is run in SkDebug mode with the --reportUsedChars flag set, it
generates the corresponding data compiled into the create_test_font tool.

All GM tests set their typeface information by calling either

sk_tool_utils::set_portable_typeface or
sk_tool_utils::portable_typeface .

(The former takes the paint, the latter returns a SkTypeface.) These calls
can be removed in the future when the Font Manager can be superceded.

BUG=skia:2687
R=mtklein@google.com

Review URL: https://codereview.chromium.org/407183003
/external/skia/dm/DM.cpp
a8e2e1504b9af6ba791637f228debaa23953064a 29-Jul-2014 tfarina <tfarina@chromium.org> Cleanup: Rename SkOSPath functions.

Mostly for brevity and matches better with Python:

Python | Old C++ | New C++
os.path.join | SkOSPath::SkPathJoin | SkOSPath::Join
os.path.basename | SkOSPath::SkBasename | SkOSPath::Basename

BUG=None
TEST=make all
R=mtklein@google.com, bsalomon@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/428443002
/external/skia/dm/DM.cpp
a98683bc50a3fe1241396f0ae20e35c7b1133fa9 28-Jul-2014 halcanary <halcanary@google.com> dm prints out number of matching skp files

R=bungeman@google.com, mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/421713002
/external/skia/dm/DM.cpp
17f0b6df7248b9bbdaddacc3a6c9c6efe4ae278e 22-Jul-2014 caryclark <caryclark@google.com> share dm and command flags

Share command flags between dm and unit tests.
Also, allow dm's core to be included by itself and iOSShell.

Command line flags that are the same (or nearly the same) in DM
and in skia_tests have been moved to common_flags. Authors,
please check to see that the shared common flag is correct for
the tool.

For iOS, the 'tool_main' entry point has a wrapper to allow multiple
tools to be statically linked in the iOSShell.
Since SkCommandLineFlags::Parse can only be called once, these calls
are disabled in the IOS build.

Since the iOS app directory is dynamically assigned a name, use '@' to
select it. (This is the same convention chosen by the Mobile Harness
iOS file system utilities.)

Move the heart of dm.gyp into dm.gypi so that it can be included by
itself and iOSShell.gyp.

Add tools/flags/SkCommonFlags.* to define and declare common
command line flags.

Add support for dm to iOSShell.

BUG=skia:
R=scroggo@google.com, mtklein@google.com, jvanverth@google.com, bsalomon@google.com

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/389653004
/external/skia/dm/DM.cpp
3125e02062b9d42df706208d3465834673748c34 17-Jul-2014 mtklein <mtklein@google.com> Revert of Revert of Revert of Force DM rebuild. (https://codereview.chromium.org/402663003/)

Reason for revert:
we have to go deeper

Original issue's description:
> Revert of Revert of Force DM rebuild. (https://codereview.chromium.org/399123002/)
>
> Reason for revert:
> jkl;
>
> Original issue's description:
> > Revert of Force DM rebuild. (https://codereview.chromium.org/400723002/)
> >
> > Reason for revert:
> > asdf
> >
> > Original issue's description:
> > > Force DM rebuild.
> > >
> > > BUG=skia:
> > >
> > > Committed: https://skia.googlesource.com/skia/+/8a10de1
> >
> > TBR=mtklein@chromium.org
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/f42e08c12533f2a165bc08451f5ab5dd1363618b
>
> TBR=mtklein@chromium.org
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/41f30cd87ece55971b17e4a59873cf31100ee1a0

R=mtklein@chromium.org
TBR=mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/397293004
/external/skia/dm/DM.cpp
41f30cd87ece55971b17e4a59873cf31100ee1a0 17-Jul-2014 mtklein <mtklein@google.com> Revert of Revert of Force DM rebuild. (https://codereview.chromium.org/399123002/)

Reason for revert:
jkl;

Original issue's description:
> Revert of Force DM rebuild. (https://codereview.chromium.org/400723002/)
>
> Reason for revert:
> asdf
>
> Original issue's description:
> > Force DM rebuild.
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/8a10de1
>
> TBR=mtklein@chromium.org
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/f42e08c12533f2a165bc08451f5ab5dd1363618b

R=mtklein@chromium.org
TBR=mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/402663003
/external/skia/dm/DM.cpp
f42e08c12533f2a165bc08451f5ab5dd1363618b 17-Jul-2014 mtklein <mtklein@google.com> Revert of Force DM rebuild. (https://codereview.chromium.org/400723002/)

Reason for revert:
asdf

Original issue's description:
> Force DM rebuild.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/8a10de1

R=mtklein@chromium.org
TBR=mtklein@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/399123002
/external/skia/dm/DM.cpp
8a10de173f3d22ecda59641a905bc7f64f622940 17-Jul-2014 Mike Klein <mtklein@google.com> Force DM rebuild.

BUG=skia:

Review URL: https://codereview.chromium.org/400723002
/external/skia/dm/DM.cpp
103ae71cdd6520f3059c3a18545ac18d5d649f91 16-Jul-2014 mtklein <mtklein@chromium.org> Remove benches from DM.

This idea turned out to be more redundant than useful.

BUG=skia:
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/399463003
/external/skia/dm/DM.cpp
80549fcdd50269d7e069d6db02b395fca128056c 30-Jun-2014 kkinnunen <kkinnunen@nvidia.com> Support using OpenGL ES context on desktop

Support using OpenGL ES context on desktop for unix and Android platforms. This
is mainly useful in development.

Add --gpuAPI flag to gm, dm, bench, bench_pictures and render_pictures. The
possible parameters for the flag are "gl" and "gles".

R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/319043005
/external/skia/dm/DM.cpp
d3e474e20c6f0f24ddb6b2643e92975d60190daa 27-Jun-2014 mtklein <mtklein@chromium.org> Deprecate SkPicture::clone().

Chrome will need -DSK_SUPPORT_LEGACY_PICTURE_CLONE.

This removes the modes from our tools that use clone(). No
bots run these. DM used clone() in a way that we can just
share the picture now.

I plan to bring back the ability to test multithreaded
picture rendering soon.

BUG=skia:2378
R=robertphillips@google.com, mtklein@google.com, bsalomon@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/338633011
/external/skia/dm/DM.cpp
05ead8afe5e4db21f9004334ac339bdad48d5057 23-Jun-2014 rmistry <rmistry@google.com> Revert of Support using OpenGL ES context on desktop (https://codereview.chromium.org/319043005/)

Reason for revert:
Caused segmentation fault on many builders. Please see reverted CL's msg #21 for details.

Original issue's description:
> Support using OpenGL ES context on desktop
>
> Support using OpenGL ES context on desktop for unix and Android platforms. This
> is mainly useful in development.
>
> Add --gpuAPI flag to gm, dm, bench, bench_pictures and render_pictures. The
> possible parameters for the flag are "gl" and "gles".
>
> Committed: https://skia.googlesource.com/skia/+/74fc727dc88ee24d89f88cb1709f963e9073aeb3

R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com, kkinnunen@nvidia.com
TBR=bsalomon@google.com, kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true

Author: rmistry@google.com

Review URL: https://codereview.chromium.org/351583002
/external/skia/dm/DM.cpp
74fc727dc88ee24d89f88cb1709f963e9073aeb3 23-Jun-2014 kkinnunen <kkinnunen@nvidia.com> Support using OpenGL ES context on desktop

Support using OpenGL ES context on desktop for unix and Android platforms. This
is mainly useful in development.

Add --gpuAPI flag to gm, dm, bench, bench_pictures and render_pictures. The
possible parameters for the flag are "gl" and "gles".

R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/319043005
/external/skia/dm/DM.cpp
f168b86d7fafc5c20c87bebc6fd393cb17e120ca 19-Jun-2014 tfarina <tfarina@chromium.org> Remove Sk prefix from some bench classes.

This idea came while commenting on
https://codereview.chromium.org/343583005/

Since SkBenchmark, SkBenchLogger and SkGMBench are not part of the Skia library,
they should not have the Sk prefix.

BUG=None
TEST=make all
R=mtklein@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/347823004
/external/skia/dm/DM.cpp
bcbc1788b478b1e54079318ad073e8490aa66fae 18-Jun-2014 tfarina <tfarina@chromium.org> Refactor how we handle resources path in Tests.

This idea emerged while doing https://codereview.chromium.org/321723002/
(commit 880914c35c8f7fc2e9c57134134c883baf66e538).

BUG=None
TEST=make tests && out/Debug/tests
R=mtklein@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/346453002
/external/skia/dm/DM.cpp
30e6e2af14e84216b1c113fd7500d0822bc81daa 18-Jun-2014 mtklein <mtklein@chromium.org> Add basic stacktrace handler using libunwind.

This means we will all have to apt-get install libunwind8-dev on Linux. Mac comes with everything we need already.

BUG=skia:
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/343583005
/external/skia/dm/DM.cpp
f01a6c3663970ccd6e1882e76a887e0fda467b77 18-Jun-2014 scroggo <scroggo@google.com> In Android framework, make tools depend on jsoncpp

Always build the tools with JSON, but either build our own
or use the system's.

Rename skia_build_json_writer to skia_use_system_jsoncpp,
since we now always build with JSON.

Remove SK_BUILD_JSON_WRITER, which was only there so
we could build without JSON it in the framework.

BUG=skia:2448
R=djsollen@google.com, reed@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/303913002
/external/skia/dm/DM.cpp
e4d3e605f74a23d050abad29909af421d8b1cf1a 06-Jun-2014 mtklein <mtklein@chromium.org> DM: SKP source / PDF backend

Removed expectations code for PDF backend for now, given that we don't have any, and refactored a little to make that cleaner.

We can now test .skp -> .pdf -> .png in DM. Neat eh?

BUG=skia:2598
R=halcanary@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/316643003
/external/skia/dm/DM.cpp
30bf3e2ffcb78fc76e5a62b2ca67638e0411cba9 03-Jun-2014 mtklein <mtklein@chromium.org> DM: add pdf

BUG=skia:2598
R=halcanary@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/312873002
/external/skia/dm/DM.cpp
a65e2fdc9af4b0b0415888a560d6ebd779bc3148 30-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> add --dryRun flag to dm

BUG=2294
R=mtklein@google.com

Author: humper@google.com

Review URL: https://codereview.chromium.org/305963007

git-svn-id: http://skia.googlecode.com/svn/trunk@14999 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
39e8d93337c7e37d2b09dc710a05a9beefef5c2c 29-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> DM tweaks

- Don't print status updates for skipped tasks or count them as pending tasks.
- Refactor DMReporter a bit for better symmetry, be more explicit about
how we read atomics (that is, approximately) in printStatus() (née finish()).
- Remove mutex locking from printStatus().

BUG=skia:
R=halcanary@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/309483003

git-svn-id: http://skia.googlecode.com/svn/trunk@14977 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
a267d41f271521eace90843bd2300af882050aa8 16-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix windows build.

Windows won't let me insert #ifdefs inside macro expansion.

R=borenet@google.com
TBR=borenet
NOTRY=true

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/289853003

git-svn-id: http://skia.googlecode.com/svn/trunk@14769 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
120c99993e60e7aedb0838f09d6f1b1d2f576c78 16-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Generate Android.mk for DM.

ifdef out code that won't build where we don't have jsoncpp.

Include ctype instead of string.h for tolower.

Depends on https://codereview.chromium.org/282053002/

BUG=skia:2447
R=mtklein@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/290603002

git-svn-id: http://skia.googlecode.com/svn/trunk@14768 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
90b5a2a653b312ff9bcd7102412da2dbeb52368c 14-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> DM: Add --skps.

This does render_pictures, plus checks SkRecord optimizations.

Disable an SkRecord optimization that draws several bot SKPs wrong. (To be investigated.)

BUG=skia:2378
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/270543004

git-svn-id: http://skia.googlecode.com/svn/trunk@14739 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
9dccafa8fcc8a9ad55a7cd11ca7d02a9d57eb144 02-May-2014 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix type in DM/mesa

TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/269723004

git-svn-id: http://skia.googlecode.com/svn/trunk@14531 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
28fcae2ec77eb16a79e155f8d788b20457f1c951 11-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/234243002/)

Reason for revert:
Want to reland the original CL.

Original issue's description:
> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)
>
> Reason for revert:
> breaking the Chrome deps roll.
> http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio
>
> Original issue's description:
> > Rename kPMColor_SkColorType to kN32_SkColorType.
> >
> > The new name better represents what this flag means.
> >
> > BUG=skia:2384
> >
> > Committed: http://code.google.com/p/skia/source/detail?r=14117
>
> TBR=reed@google.com,scroggo@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14144

R=reed@google.com, bensong@google.com
TBR=bensong@google.com, reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/235523003

git-svn-id: http://skia.googlecode.com/svn/trunk@14156 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
96edc2459820f0f60ea9b57959c1e5018ef95e28 11-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)

Reason for revert:
Chrome's side of define changes not easy to figure out quickly. Reverting this for DEPS roll for now.

Original issue's description:
> Rename kPMColor_SkColorType to kN32_SkColorType.
>
> The new name better represents what this flag means.
>
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14117

R=reed@google.com, scroggo@google.com
TBR=reed@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384

Author: bensong@google.com

Review URL: https://codereview.chromium.org/234833003

git-svn-id: http://skia.googlecode.com/svn/trunk@14149 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
d923288e50b5a69afb0bdd5c161191b24cab8345 11-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/234243002/)

Reason for revert:
fixes on the chrome side are landing (brettw), keep fingers crossed.

Original issue's description:
> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)
>
> Reason for revert:
> breaking the Chrome deps roll.
> http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio
>
> Original issue's description:
> > Rename kPMColor_SkColorType to kN32_SkColorType.
> >
> > The new name better represents what this flag means.
> >
> > BUG=skia:2384
> >
> > Committed: http://code.google.com/p/skia/source/detail?r=14117
>
> TBR=reed@google.com,scroggo@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14144

R=reed@google.com, scroggo@google.com
TBR=reed@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384

Author: bensong@google.com

Review URL: https://codereview.chromium.org/233813004

git-svn-id: http://skia.googlecode.com/svn/trunk@14145 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
757ebd20ef284b6428eb9f4b9b69826cc3640a82 11-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)

Reason for revert:
breaking the Chrome deps roll.
http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio

Original issue's description:
> Rename kPMColor_SkColorType to kN32_SkColorType.
>
> The new name better represents what this flag means.
>
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14117

R=reed@google.com, scroggo@google.com
TBR=reed@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384

Author: bensong@google.com

Review URL: https://codereview.chromium.org/234243002

git-svn-id: http://skia.googlecode.com/svn/trunk@14144 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
149e9a107c356b0151433fb23c2b1c8d0634947c 09-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Rename kPMColor_SkColorType to kN32_SkColorType.

The new name better represents what this flag means.

BUG=skia:2384
R=reed@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/227433009

git-svn-id: http://skia.googlecode.com/svn/trunk@14117 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
787227d3560bd8021394b76ada2cb184ecf5c919 26-Mar-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Let DM work without a GPU.

Testing:

/m/s/skia (dm) $ d dm; and env GYP_DEFINES=skia_gpu=0 d dm
ninja: Entering directory `out/Debug'
ninja: no work to do.
(294 GMs, 620 benches) x 4 configs, 245 tests
4507 tasks leftUnsupported vertex-color/texture xfer mode.
Unsupported vertex-color/texture xfer mode.
0 tasks left
416.53user 9.86system 0:47.43elapsed 898%CPU (0avgtext+0avgdata
13353376maxresident)k
0inputs+0outputs (0major+3579906minor)pagefaults 0swaps
ninja: Entering directory `out/Debug'
[909/909] LINK dm
(287 GMs, 612 benches) x 4 configs, 227 tests
0 tasks left
365.24user 7.71system 0:14.55elapsed 2562%CPU (0avgtext+0avgdata
14718912maxresident)k
0inputs+0outputs (0major+3328269minor)pagefaults 0swaps

BUG=skia:
R=bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/213093004

git-svn-id: http://skia.googlecode.com/svn/trunk@13960 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
b6401863fbeb7bf5c12d88fb9de78c7b5a346457 12-Mar-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Add NVPR configs to DM

Add NVPR configs to DM. The bench and gm parts support NVPR already.

R=bsalomon@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/196633005

git-svn-id: http://skia.googlecode.com/svn/trunk@13763 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
ef57b7e65330d5f794a513630517907500f1c1d0 28-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> DM: make GPU tasks multithreaded again. Big refactor.

The main meat of things is in SkThreadPool. We can now give SkThreadPool a
type for each thread to create and destroy on its local stack. It's TLS
without going through SkTLS.

I've split the DM tasks into CpuTasks that run on threads with no TLS, and
GpuTasks that run on threads with a thread local GrContextFactory.

The old CpuTask and GpuTask have been renamed to CpuGMTask and GpuGMTask.

Upshot: default run of out/Debug/dm goes from ~45 seconds to ~20 seconds.

BUG=skia:
R=bsalomon@google.com, mtklein@google.com, reed@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/179233005

git-svn-id: http://skia.googlecode.com/svn/trunk@13632 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
38aeb0fd7a2bdab5e44531d96045dffe25c8e2b0 27-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> DM: also run benches once.

Also:
- make GrMemoryPoolBenches threadsafe
- some tweaks to various DM code
- rename GM::shortName() to getName() to match benches and tests

On my desktop, (289 GMs, 617 benches) x 4 configs, 227 tests takes 46s in Debug, 14s in Release. (Still minutes faster than running tests && bench && gm.) GPU singlethreading is definitely the limiting factor again; going to reexamine whether that's helpful to thread it again.

BUG=skia:
R=reed@google.com, bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/178473006

git-svn-id: http://skia.googlecode.com/svn/trunk@13603 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
0dc5bd149a8b69e8dc6d3b4713b827659c9b0a6b 26-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Let DM run unit tests.
- refactor GYPs and a few flags
- make GPU tests grab a thread-local GrContextFactory when needed as we do in DM for GMs
- add a few more UI features to make DM more like tests

I believe this makes the program 'tests' obsolete.

It should be somewhat faster to run the two sets together than running the old binaries serially:
- serial: tests 20s (3m18s CPU), dm 21s (3m01s CPU)
- together: 27s (6m21s CPU)

Next up is to incorporate benches. I'm only planning there on a single-pass sanity check, so that won't obsolete the program 'bench' just yet.

Tested: out/Debug/tests && out/Debug/dm && echo ok
BUG=skia:

Committed: http://code.google.com/p/skia/source/detail?r=13586

R=reed@google.com, bsalomon@google.com, mtklein@google.com, tfarina@chromium.org

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/178273002

git-svn-id: http://skia.googlecode.com/svn/trunk@13592 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
79e13260cf94427e6ccbfff8242bf85ed4c8187b 25-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of Let DM run unit tests. (https://codereview.chromium.org/178273002/)

Reason for revert:
broke tests

Original issue's description:
> Let DM run unit tests.
> - refactor GYPs and a few flags
> - make GPU tests grab a thread-local GrContextFactory when needed as we do in DM for GMs
> - add a few more UI features to make DM more like tests
>
> I believe this makes the program 'tests' obsolete.
>
> It should be somewhat faster to run the two sets together than running the old binaries serially:
> - serial: tests 20s (3m18s CPU), dm 21s (3m01s CPU)
> - together: 27s (6m21s CPU)
>
> Next up is to incorporate benches. I'm only planning there on a single-pass sanity check, so that won't obsolete the program 'bench' just yet.
>
> Tested: out/Debug/tests && out/Debug/dm && echo ok
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=13586

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

Author: reed@google.com

Review URL: https://codereview.chromium.org/179403010

git-svn-id: http://skia.googlecode.com/svn/trunk@13587 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
6bd250a2a340348434b7b16bd4e4b5da0f598e3e 25-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Let DM run unit tests.
- refactor GYPs and a few flags
- make GPU tests grab a thread-local GrContextFactory when needed as we do in DM for GMs
- add a few more UI features to make DM more like tests

I believe this makes the program 'tests' obsolete.

It should be somewhat faster to run the two sets together than running the old binaries serially:
- serial: tests 20s (3m18s CPU), dm 21s (3m01s CPU)
- together: 27s (6m21s CPU)

Next up is to incorporate benches. I'm only planning there on a single-pass sanity check, so that won't obsolete the program 'bench' just yet.

Tested: out/Debug/tests && out/Debug/dm && echo ok
BUG=skia:
R=reed@google.com, bsalomon@google.com, mtklein@google.com, tfarina@chromium.org

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/178273002

git-svn-id: http://skia.googlecode.com/svn/trunk@13586 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
15a140599942f70e47380e3f700a825c7cece3b4 16-Feb-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Change device factories to take SkImageInfo instead of SkBitmap::Config

patch from issue 167033002

BUG=skia:
R=reed@google.com

Author: reed@chromium.org

Review URL: https://codereview.chromium.org/168653002

git-svn-id: http://skia.googlecode.com/svn/trunk@13463 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
88e1ec84d08ee7639940514494e718b34b6f6301 09-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Add 565 to dm defaults.

Now that optimizations picture modes pass (are skipped) in 565, add 565 to the default configs DM runs.

BUG=skia:1994
R=bsalomon@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/132133002

git-svn-id: http://skia.googlecode.com/svn/trunk@12999 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
99589af4e333422639d7e873207dd323fdd6e808 10-Dec-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Add support for reading a directory of images with --expectations (-r).

DM writes out its images in a hierarchy that's a little different than GM,
so this can't read GM's output. But it can read its own, written with -w.

Example usage:
$ out/Release/dm -w /tmp/baseline
$ out/Release/dm -r /tmp/baseline -w /tmp/new
(and optionally)
$ mkdir /tmp/diff; out/Release/skdiff /tmp/baseline /tmp/new /tmp/diff

GM's IndividualImageExpectationsSource and Expectations are a little too eager
about decoding and hashing the expected images, so I took the opportunity to
add DM::Expectations that mostly replaces skiagm::ExpectationsSource and
skiagm::Expectations in DM. It mainly exists to move the image decoding and
comparison off the main thread, which would otherwise be a major speed
bottleneck.

I tried to use skiagm code where possible. One notable place where I differed
is in this new feature. When -r is a directory of images, DM does no hashing.
It considerably faster to read the expected file into an SkBitmap and do a
byte-for-byte comparison than to hash the two bitmaps and check those.

The example usage above isn't quite working 100% yet. Expectations on some GMs
fail, even with no binary change. I haven't pinned down whether this is due to
- a bug in DM
- flaky GMs
- unthreadsafe GMs
- flaky image decoding
- unthreadsafe image decoding
- something else
but I intend to. Leon, Derek and I have suspected PNG decoding isn't
threadsafe, but are as yet unable to prove it.

I also seem to be able to cause malloc to fail on my laptop if I run too many
configs at once, though I never seem to be using more than ~1G of RAM. Will
track that down too.

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

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/108963002

git-svn-id: http://skia.googlecode.com/svn/trunk@12596 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
d6bab0238655dbab24dfe92bd0b16b464310a8c7 02-Dec-2013 rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Reverting r12427

git-svn-id: http://skia.googlecode.com/svn/trunk@12428 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
5b39f5ba9c339d1e4dae391fee9ec1396feec180 02-Dec-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@12427 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
ca5bb87a31b8cfde73dfd7c554127ee9b3e1ab58 26-Nov-2013 mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> DM: write failed comparison mode .pngs one more level deep in the tree.

E.g. instead of having to compare
/tmp/dm/565/optimizations.png
vs.
/tmp/dm/replay/optimizations_565.png

it's now

/tmp/dm/565/optimizations.png
vs.
/tmp/dm/replay/565/optimizations.png

This lets working with skdiff go a lot more smoothly.

BUG=
R=bsalomon@google.com

Review URL: https://codereview.chromium.org/88773002

git-svn-id: http://skia.googlecode.com/svn/trunk@12402 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
cdd3620ac5ac76e30daaeb2c6fe75fa03083b5b5 25-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> DM: move --match check earlier to fix the "N GMs x M configs" log line.

BUG=
R=bsalomon@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/44443002

git-svn-id: http://skia.googlecode.com/svn/trunk@11963 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
846872f75bf3bfa86dbc3d4d672118959193487a 16-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Fix DM build failures:
- forgot tool_main;
- skip building where skia_gpu is false;
- lots of scalar -> int warnings;
- stray return on a void method;
- stifle warning about a uint32_t cast to bool

BUG=
R=bungeman@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/26468005

git-svn-id: http://skia.googlecode.com/svn/trunk@11821 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp
d36522d12d3e71958e50683a7eef43dc2a47d96d 16-Oct-2013 mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> dm is like gm, but faster and with fewer features.

This is sort of the near-minimal proof-of-concept skeleton.

- It can run existing GMs.
- It supports most configs (just not PDF).
- --replay is the only "fancy" feature it currently supports

Hopefully you will be disturbed by its speed.

BUG=
R=epoger@google.com

Review URL: https://codereview.chromium.org/22839016

git-svn-id: http://skia.googlecode.com/svn/trunk@11802 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/dm/DM.cpp