Commit Graph

549 Commits

Author SHA1 Message Date
mtklein
15923c9e47 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
2016-02-29 10:14:38 -08:00
mtklein
409d470a49 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
2016-02-29 07:38:01 -08:00
mtklein
f855729564 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
2016-02-29 06:35:29 -08:00
mtklein
e027f1705e 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
2016-02-26 15:53:06 -08:00
mtklein
27c3fddaac 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
2016-02-26 14:43:21 -08:00
scroggo
e4499849df 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
2016-02-25 11:03:47 -08:00
bsalomon
5ec26ae9bf Move Budgeted enum out of SkSurface, use in GrTextureProvider
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005
DOCS_PREVIEW= https://skia.org/?cl=1728093005

Committed: https://skia.googlesource.com/skia/+/57599fe6c0336feaeeeb9b1996e77b70219b483c
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/1728093005
2016-02-25 08:33:02 -08:00
bsalomon
bd500f09ce Revert of Move Budgeted enum out of SkSurface, use in GrTextureProvider (patchset #6 id:100001 of https://codereview.chromium.org/1728093005/ )
Reason for revert:
Need workaround for chrome to build

Original issue's description:
> Move Budgeted enum out of SkSurface, use in GrTextureProvider
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005
> DOCS_PREVIEW= https://skia.org/?cl=1728093005
>
> Committed: https://skia.googlesource.com/skia/+/57599fe6c0336feaeeeb9b1996e77b70219b483c

TBR=reed@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/1734043002
2016-02-25 06:52:12 -08:00
bsalomon
57599fe6c0 Move Budgeted enum out of SkSurface, use in GrTextureProvider
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005
DOCS_PREVIEW= https://skia.org/?cl=1728093005

Review URL: https://codereview.chromium.org/1728093005
2016-02-25 06:33:27 -08:00
kkinnunen
45c2c8166b 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
2016-02-25 02:03:43 -08:00
mtklein
3eed7ddb25 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
2016-02-24 19:07:07 -08:00
mtklein
da884c49e2 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
2016-02-24 18:00:23 -08:00
halcanary
7d57124a2a 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
2016-02-24 17:59:16 -08:00
mtklein
afae30aeef 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
2016-02-24 12:28:32 -08:00
mtklein
246ba3a8b4 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
2016-02-23 10:39:36 -08:00
msarett
b65e604f10 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
2016-02-23 05:37:25 -08:00
msarett
91c22b2ea6 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
2016-02-22 12:27:46 -08:00
mtklein
cbf897802b DM: remove unnecessary use of std::function
This draw_to_canvas() function doesn't need the power of std::function.

This skips a copy or two, which is nice, and seems to clear
up most of my MSAN problems.  Why?  I do not know.

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

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

Review URL: https://codereview.chromium.org/1718633002
2016-02-19 14:27:14 -08:00
msarett
8715d47e24 Make SkPicture/SkImageGenerator default to SkCodec
Remove reference to SkImageDecoder from SkPicture. Make the default
InstallPixelRefProc passed to CreateFromStream use
SkImageGenerator::NewFromEncoded instead.

Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator.
Remove the old version that used SkImageDecoder.

Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default
now behaves lazily.

Update all clients to use the default.

Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly.

This is a rebased version of:
https://codereview.chromium.org/1671193002/

TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1699183004
2016-02-17 10:02:29 -08:00
msarett
55f7bdd956 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
2016-02-16 13:24:54 -08:00
halcanary
7001576c71 SkDocument: remove use of SkTArray (part 1/3).
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1689683002

Review URL: https://codereview.chromium.org/1689683002
2016-02-11 07:59:59 -08:00
kjlubick
1de415f2c3 Revert of Make SkPicture/SkImageGenerator default to SkCodec (patchset #7 id:120001 of https://codereview.chromium.org/1671193002/ )
Reason for revert:
Breaks Ubuntu and Mac CMAKE

Original issue's description:
> Make SkPicture/SkImageGenerator default to SkCodec
>
> Remove reference to SkImageDecoder from SkPicture. Make the default
> InstallPixelRefProc passed to CreateFromStream use
> SkImageGenerator::NewFromEncoded instead.
>
> Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator.
> Remove the old version that used SkImageDecoder.
>
> Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default
> now behaves lazily.
>
> Update all clients to use the default.
>
> Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly.
>
> BUG=skia:4691
> BUG=skia:4290
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1671193002
>
> Committed: https://skia.googlesource.com/skia/+/026388a01864c74208ad57d1ba4f711602d101c6

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

Review URL: https://codereview.chromium.org/1685963004
2016-02-10 11:25:07 -08:00
scroggo
026388a018 Make SkPicture/SkImageGenerator default to SkCodec
Remove reference to SkImageDecoder from SkPicture. Make the default
InstallPixelRefProc passed to CreateFromStream use
SkImageGenerator::NewFromEncoded instead.

Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator.
Remove the old version that used SkImageDecoder.

Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default
now behaves lazily.

Update all clients to use the default.

Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly.

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

Review URL: https://codereview.chromium.org/1671193002
2016-02-10 11:15:21 -08:00
msarett
36c070d828 Enable ImageGenerator tests on direct raster and direct gpu backends
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1682973004

Review URL: https://codereview.chromium.org/1682973004
2016-02-10 06:48:21 -08:00
msarett
a23659fcee Disable indirect backends for image decode tests
BUG=skia:4924
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684713002

Review URL: https://codereview.chromium.org/1684713002
2016-02-09 12:39:17 -08:00
scroggo
3ac66e98f8 Optionally run RAW images serially
RAW images use a lot of memory. Add a new FLAG to run one at a time so
we have less risk of running out of memory.

Isolate RAW images to their own thread on particular devices where our
images cause OOM errors.

Locally, this drops the max memory use from 3945 MB to 1664 MB (running only --image --images <RAW images we test>)

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

Review URL: https://codereview.chromium.org/1681553003
2016-02-08 15:09:48 -08:00
mtklein
fc57a3375e DM: this must have been missing from the previous CL
It'd be neat to have an Android trybot.

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

Review URL: https://codereview.chromium.org/1678293002
2016-02-08 14:30:25 -08:00
mtklein
21eaf3b00a 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
2016-02-08 12:39:59 -08:00
msarett
13a036b7eb Test CodecImageGenerator on GPU bots
In crrev.com/1549473003, CodecImageGenerator implemented getYUV8Planes,
so that we can test on a GPU bot. Update the arguments to DM so that
we run CodecImageGenerator on GPU bots.

This is adapted from:
https://codereview.chromium.org/1663453002/

This will cause many untriaged images on Gold.
The GPU converts YUV->RGBA differently than we
do in software.

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

Review URL: https://codereview.chromium.org/1676663002
2016-02-08 09:10:47 -08:00
msarett
e1daa48b9a Fix Unpremul Index8 tests
TBR=scroggo@google.com

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

Review URL: https://codereview.chromium.org/1663323002
2016-02-03 15:31:18 -08:00
msarett
9e9444cad8 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
2016-02-03 12:39:11 -08:00
scroggo
8673714d75 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
2016-02-03 12:19:11 -08:00
halcanary
7a76f9c8f4 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
2016-02-03 11:53:19 -08:00
mtklein
136baaa927 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
2016-02-03 11:21:45 -08:00
scroggo
c5560bef14 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
2016-02-03 09:42:42 -08:00
scroggo
1497f9f264 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
2016-02-02 11:56:33 -08:00
scroggo
ad38ed6003 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
2016-01-29 14:41:55 -08:00
scroggo
4d9eaea174 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
2016-01-29 07:48:33 -08:00
scroggo
7579786f3b 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
2016-01-28 08:41:10 -08:00
scroggo
0edf1693df 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
2016-01-27 08:26:44 -08:00
benjaminwagner
8d61f0dd1b 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
2016-01-25 13:02:40 -08:00
msarett
01813e880a Fix leak of SkImageGenerator
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1638463002

Review URL: https://codereview.chromium.org/1638463002
2016-01-25 10:51:29 -08:00
yujieqin
916de9ff18 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
2016-01-25 08:26:16 -08:00
msarett
d03b7ae1e2 Do not test images with alpha to 565
This should handle the untriaged images in Gold.

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

Review URL: https://codereview.chromium.org/1635453002
2016-01-25 08:20:55 -08:00
msarett
c85a9fde77 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
2016-01-25 06:05:19 -08:00
yujieqin
6bd8639f8c 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
2016-01-25 05:29:03 -08:00
msarett
b714fb0199 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
2016-01-22 14:46:42 -08:00
mtklein
5286f0222c 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
2016-01-22 08:18:14 -08:00
mtklein
ba6ada74e8 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
2016-01-21 09:39:35 -08:00
msarett
bb25b53249 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
2016-01-13 09:31:39 -08:00
mtklein
4a34ecbe35 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
2016-01-08 10:19:35 -08:00
reed
7c554222dd 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
2016-01-08 06:30:14 -08:00
mtklein
5820fe846f DM: add a pixel check to serialize
If we're running through serialize and then drawing into some raster target (e.g. serialize-8888 like we run on the bots), make sure the serialized version is identical to what we'd get if we just drew into the rest of the pipeline (i.e. 8888).

Start by blacklisting all current failures.  This at least prevents further regression.

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

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

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

Review URL: https://codereview.chromium.org/1561993003
2016-01-07 07:38:29 -08:00
caryclark
60c0a76738 Revert of DM: add a pixel check to serialize (patchset #4 id:60001 of https://codereview.chromium.org/1561993003/ )
Reason for revert:
breaks windows bots; additional windows specific failures need to be blacklisted

Original issue's description:
> DM: add a pixel check to serialize
>
> If we're running through serialize and then drawing into some raster target (e.g. serialize-8888 like we run on the bots), make sure the serialized version is identical to what we'd get if we just drew into the rest of the pipeline (i.e. 8888).
>
> Start by blacklisting all current failures.  This at least prevents further regression.
>
> BUG=skia:4095
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1561993003
>
> Committed: https://skia.googlesource.com/skia/+/6eb4e36a93ea695e7adb771ea9ac3326680a8e98

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

Review URL: https://codereview.chromium.org/1563923003
2016-01-07 05:12:08 -08:00
kkinnunen
3405800d7a 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
2016-01-06 23:49:31 -08:00
mtklein
6eb4e36a93 DM: add a pixel check to serialize
If we're running through serialize and then drawing into some raster target (e.g. serialize-8888 like we run on the bots), make sure the serialized version is identical to what we'd get if we just drew into the rest of the pipeline (i.e. 8888).

Start by blacklisting all current failures.  This at least prevents further regression.

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

Review URL: https://codereview.chromium.org/1561993003
2016-01-06 14:20:30 -08:00
mtklein
cd50bcae10 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
2016-01-05 06:20:20 -08:00
jcgregorio
54e2ca5a23 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
2016-01-05 04:15:23 -08:00
kkinnunen
830e012187 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
2016-01-05 00:30:33 -08:00
mtklein
279c786409 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
2016-01-04 19:13:19 -08:00
mtklein
c8be09aaf2 Two malloc+bzero -> calloc.
I was profiling DM and noticed a couple spots where we malloc then bzero.
These might as well call calloc instead:
   - any time DM itself allocates bitmaps for raster drawing;
   - any time Skia allocates memory for a raster SkSurface.

We could use malloc for opaque surfaces, but it seems simpler to always calloc.

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

Review URL: https://codereview.chromium.org/1557713003
2016-01-04 18:56:57 -08:00
kkinnunen
3e980c3d88 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
2015-12-23 01:33:01 -08:00
rmistry
0f515bd428 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
2015-12-22 10:22:26 -08:00
kkinnunen
9ebc3f0ee6 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
2015-12-21 23:48:13 -08:00
joshualitt
4dabf83cbe 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
2015-12-18 06:02:18 -08:00
kkinnunen
c8b4336444 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
2015-12-18 03:27:32 -08:00
bsalomon
489147c78b Add option to control maximum GrBatch lookback
Review URL: https://codereview.chromium.org/1498653002
2015-12-14 12:13:09 -08:00
reed
4ff653cab2 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
2015-12-14 05:58:25 -08:00
kkinnunen
e13ca329fc 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
2015-12-14 04:49:17 -08:00
kkinnunen
55eeae9722 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
2015-12-10 23:19:29 -08:00
msarett
62d3b10110 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
2015-12-10 15:14:27 -08:00
herb
30da5f7a1e Change SkTaskGroup to use std::function. Ripple all the changes.
BUG=skia:4634

Review URL: https://codereview.chromium.org/1519573003
2015-12-10 14:12:33 -08:00
halcanary
6bce4177cb DM: fix --config $VIA-pdf to not crash
Review URL: https://codereview.chromium.org/1513323002
2015-12-10 12:46:42 -08:00
kkinnunen
5219fd9ff7 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
2015-12-10 06:28:13 -08:00
mtklein
9b439153fc no need for newlines in DM Errors
This should fix some odd formatting problems in the logs, e.g.

    Note tally:
    583x   (skipped: Cannot convert to requested color type.
    )
    4x     (--blacklist _ image decode 4bpp-pixeldata-cropped.bmp)

~~~>

    Note tally:
    583x   (skipped: Cannot convert to requested color type.)
    4x     (--blacklist _ image decode 4bpp-pixeldata-cropped.bmp)

BUG=skia:

Review URL: https://codereview.chromium.org/1508223006
2015-12-09 13:02:26 -08:00
mtklein
bc4e003d39 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
2015-12-09 08:37:35 -08:00
borenet
9d66696f6b 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
2015-12-09 07:03:51 -08:00
kkinnunen
64492c43c3 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
2015-12-08 01:24:40 -08:00
msarett
be8216a922 Make SkAndroidCodec support ico
BUG=skia:

Review URL: https://codereview.chromium.org/1472933002
2015-12-04 08:00:50 -08:00
scroggo
97ff7f5662 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
2015-12-04 07:09:57 -08:00
msarett
1603e9310f Make SkAndroidCodec support ico
BUG=skia:

Review URL: https://codereview.chromium.org/1472933002
2015-12-04 05:43:09 -08:00
kkinnunen
a18a8bca24 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
2015-12-03 23:04:50 -08:00
bsalomon
6dea83f244 Add option to draw wireframe batch bounds
Committed: https://skia.googlesource.com/skia/+/26489ef21ff5df33b8cb5943fddfd4604e203960

Review URL: https://codereview.chromium.org/1494473005
2015-12-03 12:58:06 -08:00
scroggo
e2725f5840 Revert of Add option to draw wireframe batch bounds (patchset #6 id:100001 of https://codereview.chromium.org/1494473005/ )
Reason for revert:
Looks to be responsible for breaking builds e.g. https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Mac10.9-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug/builds/3030/steps/dm/logs/stdio

Original issue's description:
> Add option to draw wireframe batch bounds
>
> Committed: https://skia.googlesource.com/skia/+/26489ef21ff5df33b8cb5943fddfd4604e203960

TBR=joshualitt@google.com,bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1492633007
2015-12-03 10:30:34 -08:00
bsalomon
26489ef21f Add option to draw wireframe batch bounds
Review URL: https://codereview.chromium.org/1494473005
2015-12-03 09:36:49 -08:00
bsalomon
a0a024e323 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
2015-12-01 07:58:44 -08:00
kkinnunen
eeebdb538d 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
2015-12-01 05:10:48 -08:00
bsalomon
69cfe95b7b Add debug option to clip each GrBatch to its device bounds
Review URL: https://codereview.chromium.org/1471083002
2015-11-30 13:27:47 -08:00
kkinnunen
179a8f5f7f 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
2015-11-20 13:32:25 -08:00
msarett
5af4e0bc8f 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
2015-11-17 11:18:03 -08:00
msarett
887e18e5f7 Make SkAndroidCodec support bmp
BUG=skia:

Review URL: https://codereview.chromium.org/1443783002
2015-11-17 08:46:02 -08:00
msarett
33c7623324 Make SkAndroidCodec support wbmp
BUG=skia:

Review URL: https://codereview.chromium.org/1445643002
2015-11-16 13:43:40 -08:00
msarett
4b0778ec49 Remove dependency on src/android from dm and nanobench
BUG=skia:

Review URL: https://codereview.chromium.org/1443033002
2015-11-13 09:59:11 -08:00
mtklein
64593525de Replace SkFunction with std::function
TBR=reed@google.com
No public API changes.

Review URL: https://codereview.chromium.org/1441753002
2015-11-12 10:41:05 -08:00
msarett
84a8065275 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
2015-11-10 15:49:46 -08:00
msarett
5c9e34a350 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
2015-11-10 15:24:10 -08:00
msarett
164d302ebf 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
2015-11-10 15:09:04 -08:00
halcanary
6950de6c41 Comments Style: s/skbug.com/bug.skia.org/
DOCS_PREVIEW= https://skia.org/?cl=1432503003

Review URL: https://codereview.chromium.org/1432503003
2015-11-07 05:29:00 -08:00
Matt Sarett
1aaaba5216 Fix the build on Android devices 2015-11-06 15:19:24 -05:00
msarett
5cb4885b4c 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
2015-11-06 08:56:32 -08:00