Commit Graph

177 Commits

Author SHA1 Message Date
scroggo
1d09ee7c04 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
2014-12-15 08:53:35 -08:00
mtklein
f6139f7c38 Add image decoding mode to DM.
This is meant to supplant skimage.

BUG=skia:3235

Review URL: https://codereview.chromium.org/802793002
2014-12-12 16:41:12 -08:00
bsalomon
ef3fcd877a More win64 warning fixes
Review URL: https://codereview.chromium.org/798723002
2014-12-12 08:51:39 -08:00
scroggo
895c43b28b Replace EncodeBitmap with an interface.
Gives more flexibility to the caller to decide whether to use the
encoded data returned by refEncodedData().

Provides an implementation that supports the old version of
SkPicture::serialize().

TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely

BUG=skia:3190

Review URL: https://codereview.chromium.org/784643002
2014-12-11 10:53:58 -08:00
scroggo
3030445799 Revert of Replace EncodeBitmap with an interface. (patchset #12 id:210001 of https://codereview.chromium.org/784643002/)
Reason for revert:
Failing serialization tasks in DM:

http://build.chromium.org/p/client.skia/builders/Test-Win8-ShuttleA-GTX660-x86-Debug/builds/352/steps/dm/logs/stdio

Original issue's description:
> Replace EncodeBitmap with an interface.
>
> Gives more flexibility to the caller to decide whether to use the
> encoded data returned by refEncodedData().
>
> Provides an implementation that supports the old version of
> SkPicture::serialize().
>
> TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely
>
> BUG=skia:3190
>
> Committed: https://skia.googlesource.com/skia/+/0c4aba6edb9900c597359dfa49d3ce4a41bc5dd1
>
> Committed: https://skia.googlesource.com/skia/+/02b217f80b01a7dda8493422e5257c36a9ce8464

TBR=reed@google.com,rmistry@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:3190

Review URL: https://codereview.chromium.org/783393004
2014-12-09 08:27:37 -08:00
scroggo
02b217f80b Replace EncodeBitmap with an interface.
Gives more flexibility to the caller to decide whether to use the
encoded data returned by refEncodedData().

Provides an implementation that supports the old version of
SkPicture::serialize().

TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely

BUG=skia:3190

Committed: https://skia.googlesource.com/skia/+/0c4aba6edb9900c597359dfa49d3ce4a41bc5dd1

Review URL: https://codereview.chromium.org/784643002
2014-12-09 07:44:36 -08:00
robertphillips
c0708cb7bc Revert of Replace EncodeBitmap with an interface. (patchset #11 id:190001 of https://codereview.chromium.org/784643002/)
Reason for revert:
Compilation is failing on some bots

Original issue's description:
> Replace EncodeBitmap with an interface.
>
> Gives more flexibility to the caller to decide whether to use the
> encoded data returned by refEncodedData().
>
> Provides an implementation that supports the old version of
> SkPicture::serialize().
>
> TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely
>
> BUG=skia:3190
>
> Committed: https://skia.googlesource.com/skia/+/0c4aba6edb9900c597359dfa49d3ce4a41bc5dd1

TBR=reed@google.com,scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:3190

Review URL: https://codereview.chromium.org/787833002
2014-12-09 05:35:07 -08:00
scroggo
0c4aba6edb Replace EncodeBitmap with an interface.
Gives more flexibility to the caller to decide whether to use the
encoded data returned by refEncodedData().

Provides an implementation that supports the old version of
SkPicture::serialize().

TODO: Update Chrome, so we can remove SK_LEGACY_ENCODE_BITMAP entirely

BUG=skia:3190

Review URL: https://codereview.chromium.org/784643002
2014-12-09 05:23:12 -08:00
mtklein
008f1ea581 Store DM failures in an array, not a single string.
This should fix the problem where a repeatedly failing test causes this assertion:
  ../../src/core/SkString.cpp:572: failed assertion "length >= 0 && length < SkToInt(kBufferSize)"

Example output:

0 GMs x 7 configs, 2 tests, 0 pictures
0 tasks left, 100 failed
Failures:
  test RTree: ../../tests/RTreeTest.cpp:77	0 != rtree.getCount()
  test RTree: ../../tests/RTreeTest.cpp:77	0 != rtree.getCount()
  test RTree: ../../tests/RTreeTest.cpp:77	0 != rtree.getCount()
  test RTree: ../../tests/RTreeTest.cpp:77	0 != rtree.getCount()
  < 95 lines elided >
  test RTree: ../../tests/RTreeTest.cpp:77	0 != rtree.getCount()
100 failures.

BUG=skia:

Review URL: https://codereview.chromium.org/741833002
2014-11-19 13:36:19 -08:00
jcgregorio
3b27adef0a 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
2014-11-13 08:06:40 -08:00
kkinnunen
c092d3bdab 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
2014-11-13 05:00:57 -08:00
jvanverth
4736e1434a 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
2014-11-07 07:12:46 -08:00
scroggo
0ee2627026 When running DM, write test failures to json.
Add skiatest::Failure to keep track of data about a test failure.

Reporter::reportFailed and ::onReportFailed now take Failure as a
parameter. This allows the implementation to treat the failure as it
wishes. Provide a helper to format the failure the same as prior to
the change.

Update the macros for calling reportFailed (REPORTER_ASSERT etc) to
create a Failure object.

Convert a direct call to reportFailed to the macro ERRORF.

Write Failures to Json.
Sample output when running dm on the dummy test crrev.com/705723004:
{
   "test_results" : {
      "failures" : [
         {
            "condition" : "0 > 3",
            "file_name" : "../../tests/DummyTest.cpp",
            "line_no" : 10,
            "message" : ""
         },
         {
            "condition" : "false",
            "file_name" : "../../tests/DummyTest.cpp",
            "line_no" : 4,
            "message" : ""
         },
         {
            "condition" : "1 == 3",
            "file_name" : "../../tests/DummyTest.cpp",
            "line_no" : 5,
            "message" : "I can too count!"
         },
         {
            "condition" : "",
            "file_name" : "../../tests/DummyTest.cpp",
            "line_no" : 6,
            "message" : "seven is 7"
         },
         {
            "condition" : "1 == 3",
            "file_name" : "../../tests/DummyTest.cpp",
            "line_no" : 14,
            "message" : "I can too count!"
         }
      ]
   }
}

Report all of the failures from one test.
Previously, if one test had multiple failures, only one was reportered.
e.g:

Failures:
  test Dummy: ../../tests/DummyTest.cpp:6   seven is 7
  test Dummy2: ../../tests/DummyTest.cpp:10 0 > 3
  test Dummy3: ../../tests/DummyTest.cpp:14 I can too count!: 1 == 3
3 failures.

Now, we get all the messages:

Failures:
  test Dummy: ../../tests/DummyTest.cpp:4   false
        ../../tests/DummyTest.cpp:5 I can too count!: 1 == 3
        ../../tests/DummyTest.cpp:6 seven is 7
  test Dummy2: ../../tests/DummyTest.cpp:10 0 > 3
  test Dummy3: ../../tests/DummyTest.cpp:14 I can too count!: 1 == 3
3 failures.

(Note that we still state "3 failures" because 3 DM::Tasks failed.)

BUG=skia:3082
BUG=skia:2454

Review URL: https://codereview.chromium.org/694703005
2014-11-07 06:07:32 -08:00
jvanverth
aa30ab3079 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
2014-11-06 13:52:45 -08:00
jvanverth
06ba179838 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
2014-11-06 13:38:52 -08:00
mtklein
2ecf86e55e Revert of Revert of Turn on NVPR 4x MSAA by default when supported in DM and nanobench. (patchset #1 id:1 of https://codereview.chromium.org/693933004/)
Reason for revert:
Try again with loops overflow fix landed.

Original issue's description:
> Revert of Turn on NVPR 4x MSAA by default when supported in DM and nanobench. (patchset #2 id:20001 of https://codereview.chromium.org/704563003/)
>
> Reason for revert:
> Timing out on nvpr when drawing conics. Fix will take some thought so reverting for now.
>
> Original issue's description:
> > Turn on NVPR 4x MSAA by default when supported in DM and nanobench.
> >
> > This brings DM and nanobench's default configs in line with GM's.
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/31f88675718966bbb7f09718b40de10c7e214739
>
> TBR=bsalomon@google.com,mtklein@google.com,mtklein@chromium.org
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/d5cd4ee5b81b51e43be7ed13f3c0f0f6c1b3fe14

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

Review URL: https://codereview.chromium.org/685923003
2014-11-06 08:06:39 -08:00
egdaniel
d5cd4ee5b8 Revert of Turn on NVPR 4x MSAA by default when supported in DM and nanobench. (patchset #2 id:20001 of https://codereview.chromium.org/704563003/)
Reason for revert:
Timing out on nvpr when drawing conics. Fix will take some thought so reverting for now.

Original issue's description:
> Turn on NVPR 4x MSAA by default when supported in DM and nanobench.
>
> This brings DM and nanobench's default configs in line with GM's.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/31f88675718966bbb7f09718b40de10c7e214739

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

Review URL: https://codereview.chromium.org/693933004
2014-11-05 14:21:33 -08:00
mtklein
31f8867571 Turn on NVPR 4x MSAA by default when supported in DM and nanobench.
This brings DM and nanobench's default configs in line with GM's.

BUG=skia:

Review URL: https://codereview.chromium.org/704563003
2014-11-05 12:28:26 -08:00
scroggo
7a10fb6bea 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
2014-11-04 07:21:10 -08:00
mtklein
e71cd54ed4 SkTaskGroup::batch(fn, args, N)
Porting QuiltTask isn't important in itself; this is mostly an API feeler.

BUG=skia:

Review URL: https://codereview.chromium.org/689673003
2014-10-29 14:17:13 -07:00
halcanary
3dc5d70459 Use MacOS's CoreGraphics PDF Rasterizer in DM
BUG=3061

Review URL: https://codereview.chromium.org/650323004
2014-10-27 06:24:11 -07:00
bsalomon
06cddec857 Print GPU cache stats in nanobench/dm with veryVerbose
Review URL: https://codereview.chromium.org/680553002
2014-10-24 10:40:50 -07:00
halcanary
daf36c1524 Fix DMWriteTask to write PDF files correctly
Previously, it was not rewinding the asset.

Review URL: https://codereview.chromium.org/659793004
2014-10-17 14:36:10 -07:00
tfarina
cf9b87389f Clarify what DM means in the README file.
It took me a while to figure out what this acronym meant. ;)
Googling for it lead me to gyp/dm.gyp.

BUG=None
TEST=None
R=mtklein@google.com

Review URL: https://codereview.chromium.org/638083003
2014-10-09 09:00:30 -07:00
tfarina
6b87df2997 Fix usage of SK_BUILD_* defines.
Since we just 'define' them, but not attribute anything to them, like
'1' for example, cpp expands it to nothing and that breaks the "#if"
clauses.

To fix that, uses "#if defined(...)" which will correctly check if your
macro name was defined or not.

BUG=skia:2850
TEST=make most
R=robertphillips@google.com

Review URL: https://codereview.chromium.org/628763005
2014-10-06 10:46:51 -07:00
bungeman
d51ce44d18 Handle getMemoryBase returning NULL in WriteTask.
DM::WriteTask::fData was changed from a data to a stream in
"SkData to SkStreamAsset to avoid unneeded copying"
https://skia.googlesource.com/skia/+/a4c6094177ebde18c706cbcfbd2013d0a088e0ee
However, DM::WriteTask::draw was not updated to handle this,
resulting in segfaults when trying to write out PDF files.

Review URL: https://codereview.chromium.org/627473002
2014-10-02 13:39:00 -07:00
mtklein
a9ceaf5364 Don't test the old picture backend anymore.
This saves a bunch of CPU time in DM, and even better, lets us tear it down!

BUG=skia:
R=robertphillips@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/612603002
2014-09-29 08:44:46 -07:00
mtklein
e51ac563de Remove underscores from mode identifiers.
Underscore is used as a field separator sometimes when parsing the task
name into a list of config, mode, etc.  (This itself is dumb and TODO(mtklein): fix.)
Underscores in the field names will really mess that up, both in directories generated
from human-mode -w, and in the .json file.

BUG=skia:
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/599503002
2014-09-23 09:20:14 -07:00
reed
4a8126e7f8 Introduce Props to surface (patchset #27 id:520001 of https://codereview.chromium.org/551463004/)"
This reverts commit 29c857d0f3.

TBR=

Author: reed@google.com

Review URL: https://codereview.chromium.org/588143004
2014-09-22 07:29:03 -07:00
reed
29c857d0f3 Revert of introduce Props to surface (patchset #27 id:520001 of https://codereview.chromium.org/551463004/)
Reason for revert:
Broke call site in WebKit

Original issue's description:
> introduce Props to surface (work in progress)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3716fd067a5621bb94a6cb08d72afec8bf3aceda

R=robertphillips@google.com, bsalomon@google.com, jvanverth@google.com, bungeman@google.com, fmalita@google.com, vangelis@chromium.org, reed@google.com
TBR=bsalomon@google.com, bungeman@google.com, fmalita@google.com, jvanverth@google.com, reed@google.com, robertphillips@google.com, vangelis@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: reed@chromium.org

Review URL: https://codereview.chromium.org/583773004
2014-09-21 10:25:07 -07:00
reed
3716fd067a introduce Props to surface (work in progress)
BUG=skia:
R=robertphillips@google.com, bsalomon@google.com, jvanverth@google.com, bungeman@google.com, fmalita@google.com, vangelis@chromium.org, reed@chromium.org

Author: reed@google.com

Review URL: https://codereview.chromium.org/551463004
2014-09-21 09:39:55 -07:00
mtklein
87e2437fe5 Add a "mode" tag to key in DM json output.
This lets us distinguish the original ("direct") runs from their replay modes.

There was a bit of a bug in here now fixed: we used the first entry in
fSuffixes as the config.  Actually, the last entry in suffixes is the
config.  This is moot when there's only one suffix (direct drawing), but
for mode drawing we were recording the mode as config!  Now it's correct.

Here's some example output where I rigged a bunch of modes to fail:

{
   "results" : [
      {
         "key" : {
            "config" : "565",
            "mode" : "default-nobbh",
            "name" : "xfermodes2"
         },
         "md5" : "2daf6f7e2b8e56543b92068a10d2179e",
         "options" : {
            "source_type" : "GM"
         }
      },
      {
         "key" : {
            "config" : "8888",
            "mode" : "default-nobbh",
            "name" : "xfermodes2"
         },
         "md5" : "490361e8a52800d29558bc23876da8c6",
         "options" : {
            "source_type" : "GM"
         }
      },
...
      {
         "key" : {
            "config" : "565",
            "mode" : "direct",
            "name" : "xfermodes2"
         },
         "md5" : "92a3801d5914d6c2662904a3bb50d2b9",
         "options" : {
            "source_type" : "GM"
         }
      },
...
      {
         "key" : {
            "config" : "8888",
            "mode" : "direct",
            "name" : "xfermodes2"
         },
         "md5" : "e7e8b3e9d31e601acaaff4633ed5f63a",
         "options" : {
            "source_type" : "GM"
         }
      },

BUG=skia:
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/586533005
2014-09-19 10:35:07 -07:00
mtklein
53e0be6d2b DM: --gpu and --cpu should only control top-level tasks.
This fixes a bug where we run some Android bots with --nocpu, and the
current behavior disables the (CPU-bound) WriteTasks the GPU bound GM
runs spawn off.  The WriteTasks don't run and we end up with "null" in
our .json files.

Tested locally: out/Release/dm --nocpu -w /tmp/out; ls /tmp/out
  dm.json  gpu/

BUG=skia:2938
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/578033002
2014-09-17 12:26:18 -07:00
mtklein
0b36e6b65f Add --matrix to DM, to play around with and maybe use on a bot.
BUG=skia:
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/563723005
2014-09-11 12:30:12 -07:00
mtklein
c54056c839 Back to hashing source content, not .png.
BUG=skia:
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/560453002
2014-09-09 08:42:04 -07:00
mtklein
ea65bfa8de Update DM JSON format.
Ex. dm --match patch -w bad --key arch x86 gpu nvidia model z620 --properties git_hash abcd build_number 20 ->

{
   "build_number" : "20",
   "git_hash" : "abcd",
   "key" : {
      "arch" : "x86",
      "gpu" : "nvidia",
      "model" : "z620"
   },
   "results" : [
      {
         "key" : {
            "config" : "565",
            "name" : "ninepatch-stretch"
         },
         "md5" : "f78cfafcbabaf815f3dfcf61fb59acc7",
         "options" : {
            "source_type" : "GM"
         }
      },
      {
         "key" : {
            "config" : "8888",
            "name" : "ninepatch-stretch"
         },
         "md5" : "3e8a42f35a1e76f00caa191e6310d789",
         "options" : {
            "source_type" : "GM"
         }
      },
...

This breaks -r, but that's okay.  Going to follow up this CL with one that removes that entirely.

BUG=skia:
R=stephana@google.com, jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/551873003
2014-09-09 07:59:46 -07:00
mtklein
197ceda929 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
2014-09-09 07:36:57 -07:00
mtklein
e2d4eb7072 Hash .pngs instead of SkBitmaps.
This has the nice property of being able to double-check hashes after the fact.

mtklein@mtklein ~/skia (hash-png)> md5sum bad/8888/3x3bitmaprect.png
deede70ab2f34067d461fb4a93332d4c  bad/8888/3x3bitmaprect.png

mtklein@mtklein ~/skia (hash-png)> grep 3x3bitmaprect_8888 bad/dm.json
   "3x3bitmaprect_8888" : "deede70ab2f34067d461fb4a93332d4c",

I have checked that no two premultiplied colors map to the same unpremultiplied
color (math nerds: unpremultiplication is injective), so a change in
premultiplied SkBitmap will always imply a change in the encoded
unpremultiplied .png.  This means, it's safe to hash .pngs; we won't miss
subtle changes.

BUG=skia:
R=jcgregorio@google.com, stephana@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/549203003
2014-09-08 12:42:23 -07:00
mtklein
858baf5b7d Add --nameByHash for the bots, and refactor hashing a bit.
No diff in dm.json output.

Here's what we get when --nameByHash is on:

mtklein@mtklein ~/skia (dm)> ls bad4/
0077fefedcee39feae9d12751853758b.png  431921de1607b4e1ae6864cc684d9b8e.png  8a3e17eba9302498700a703bb286d1ef.png  c6448cb266f5e0b8d02b512ad484a9ad.png
01b0dcd515e846ea3b7f3b4c68120943.png  4372eb0fce0b0bcf5a582c502f90ecef.png  8a6acdd96cf6915fa01a9cea6d6291b0.png  c6db4e2c9860b900130af429373eafaa.png
02974ab0efa7aa325b3bf22515b33899.png  43bddc2e255a3501ce2728544b1d409d.png  8aa8763d11afd397c2768e54d5599181.png  c716a9a53513a16e0572c67863e3be08.png
02b7b9e5e95e69f89b6cec9c4539d972.png  43cf7adda66b3719e4abd19e92dda55e.png  8ade6bb4c9e2244e0dbd9436cf6e2132.png  c854bb6dd105644a71d0219025409039.png
02d29dbfd29260f9318fcd6177c6ba7b.png  4423958139a2b64185583dacb7379b13.png  8b039171593685112a9454879f40a965.png  c863ac2394e519690c57e1392b14b19f.png
...

BUG=skia:
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/550283002
2014-09-08 11:33:48 -07:00
mtklein
23c94f05ca 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
2014-09-08 09:12:28 -07:00
mtklein
1d0f1642e8 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
2014-09-08 08:05:18 -07:00
robertphillips
c5ba71d2e5 Change SkPicture::draw to playback
R=reed@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/540963002
2014-09-04 08:42:50 -07:00
mtklein
406654be7a 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
2014-09-03 15:34:37 -07:00
mtklein
2460bbdfbb 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
2014-09-03 14:17:48 -07:00
mtklein
9c7207b5dc 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
2014-09-03 14:06:48 -07:00
robertphillips
a8d7f0b13c Try out scalar picture sizes
This paves the way for removing the 'fTile' parameter from SkPictureShader (although that should be a different CL). If we like this we could also move to providing an entire cull SkRect.

R=reed@google.com, mtklein@google.com, fmalita@google.com, fmalita@chromium.org

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/513983002
2014-08-29 08:03:56 -07:00
mtklein
2a65a238b0 Remove SkQuadTree.
We're not testing it to the same degree we do RTree and TileGrid.  Any changes
we'll make to BBH APIs become 33% easier without it.  If find we want it again,
we can always resurrect it.

BUG=skia:1021,skia:2834
R=robertphillips@google.com, mtklein@google.com
TBR=reed

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/500373005
2014-08-26 14:07:04 -07:00
halcanary
a4c6094177 SkData to SkStreamAsset to avoid unneeded copying
R=mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/502193002
2014-08-26 10:38:07 -07:00
mtklein
c92e550d36 Install a hook to swap between SkPicture backends with a single define.
BUG=skia:
R=robertphillips@google.com, reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/492023002
2014-08-21 13:07:27 -07:00
mtklein
afb4379dbc Print max RSS in GM and nanobench too.
Everyone used MB, so update the API to just return that.

BUG=skia:
R=halcanary@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/483323002
2014-08-19 15:55:55 -07:00