Commit Graph

77 Commits

Author SHA1 Message Date
commit-bot@chromium.org
39e8d93337 DM tweaks
- Don't print status updates for skipped tasks or count them as pending tasks.
 - Refactor DMReporter a bit for better symmetry, be more explicit about
   how we read atomics (that is, approximately) in printStatus() (née finish()).
 - Remove mutex locking from printStatus().

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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/309483003

git-svn-id: http://skia.googlecode.com/svn/trunk@14977 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-29 20:14:48 +00:00
commit-bot@chromium.org
a095041f51 Remove SkRecorder's kWriteOnly mode.
I'm soon going to have SkRecorder start calling getTotalMatrix(), which
would be broken in write-only mode.  That change is big and nebulous,
but it's clear kWriteOnly needs to go, so we might as well kill it now.

My notes in bench_playback about kWriteOnly mode being important were
probably overly cautious.  I now think this is a fair enough comparison
even re-recording into a read-write canvas.

BUG=skia:2378
R=fmalita@chromium.org, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/290653004

git-svn-id: http://skia.googlecode.com/svn/trunk@14963 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-29 16:52:40 +00:00
commit-bot@chromium.org
a267d41f27 Fix windows build.
Windows won't let me insert #ifdefs inside macro expansion.

R=borenet@google.com
TBR=borenet
NOTRY=true

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/289853003

git-svn-id: http://skia.googlecode.com/svn/trunk@14769 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-16 18:27:11 +00:00
commit-bot@chromium.org
120c99993e Generate Android.mk for DM.
ifdef out code that won't build where we don't have jsoncpp.

Include ctype instead of string.h for tolower.

Depends on https://codereview.chromium.org/282053002/

BUG=skia:2447
R=mtklein@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/290603002

git-svn-id: http://skia.googlecode.com/svn/trunk@14768 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-16 18:11:51 +00:00
commit-bot@chromium.org
69031a4427 DM: find max component difference
So far unused except to back BitmapsEqual, but I want to play with it in CLs I'm working on.

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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/290043005

git-svn-id: http://skia.googlecode.com/svn/trunk@14759 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-16 13:03:46 +00:00
commit-bot@chromium.org
266420722e refactor DM::SetupBitmap
Seemed sort of repetitive.

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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/286993005

git-svn-id: http://skia.googlecode.com/svn/trunk@14752 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-15 17:33:31 +00:00
commit-bot@chromium.org
d6dcacd4fe DM: tweaks
- translate filenames to task names instead of using a verbatim mode in WriteTask
  - add an option to write out only PNG data to the .png if you don't need -r to work

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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/288823002

git-svn-id: http://skia.googlecode.com/svn/trunk@14742 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-14 20:26:00 +00:00
commit-bot@chromium.org
90b5a2a653 DM: Add --skps.
This does render_pictures, plus checks SkRecord optimizations.

Disable an SkRecord optimization that draws several bot SKPs wrong.  (To be investigated.)

BUG=skia:2378
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/270543004

git-svn-id: http://skia.googlecode.com/svn/trunk@14739 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-14 17:55:32 +00:00
commit-bot@chromium.org
93043bc252 DM: test SkRecord with and without optimization.
BUG=skia:2378
R=fmalita@chromium.org, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/271443007

git-svn-id: http://skia.googlecode.com/svn/trunk@14598 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-06 19:48:02 +00:00
commit-bot@chromium.org
5aacfe9ffc Remove setLocalMatrix calls from picture shader GM.
This makes all --skr tests pass for me.  Enabling it by default in DM.

BUG=skia:2378

Committed: http://code.google.com/p/skia/source/detail?r=14549

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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/260863007

git-svn-id: http://skia.googlecode.com/svn/trunk@14551 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-02 21:23:52 +00:00
commit-bot@chromium.org
c09abe66c1 Revert of Remove setLocalMatrix calls from picture shader GM. (https://codereview.chromium.org/260863007/)
Reason for revert:
changed GM unexpectedly.  will sort out and try again

Original issue's description:
> Remove setLocalMatrix calls from picture shader GM.
>
> This makes all --skr tests pass for me.  Enabling it by default in DM.
>
> BUG=skia:2378
>
> Committed: http://code.google.com/p/skia/source/detail?r=14549

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

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/265013003

git-svn-id: http://skia.googlecode.com/svn/trunk@14550 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-02 20:51:13 +00:00
commit-bot@chromium.org
74b8cb15e4 Remove setLocalMatrix calls from picture shader GM.
This makes all --skr tests pass for me.  Enabling it by default in DM.

BUG=skia:2378
R=reed@google.com, mtklein@google.com, fmalita@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/260863007

git-svn-id: http://skia.googlecode.com/svn/trunk@14549 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-02 20:30:11 +00:00
bsalomon@google.com
9dccafa8fc Fix type in DM/mesa
TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/269723004

git-svn-id: http://skia.googlecode.com/svn/trunk@14531 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-02 14:43:12 +00:00
commit-bot@chromium.org
90d81c9674 DM: Apply initial transform in --skr mode.
BUG=skia:2378
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/263853005

git-svn-id: http://skia.googlecode.com/svn/trunk@14521 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-01 21:06:39 +00:00
commit-bot@chromium.org
3f032156c8 DM: Push GPU-parent child tasks to the front of the queue.
Like yesterday's change to run CPU-parent child tasks serially in thread, this
reduces peak memory usage by improving the temporaly locality of the bitmaps we
create.

E.g. Let's say we start with tasks A B C and D
    Queue: [ A B C D ]
Running A creates A' and A", which depend on a bitmap created by A.
    Queue: [ B C D A' A" * ]
That bitmap now needs sit around in RAM while B C and D run pointlessly and can
only be destroyed at *.  If instead we do this and push dependent child tasks
to the front of the queue, the queue and bitmap lifetime looks like this:
    Queue: [ A' A" * B C D ]

This is much, much worse in practice because the queue is often several thousand
tasks long.  100s of megs of bitmaps can pile up for 10s of seconds pointlessly.

To make this work we add addNext() to SkThreadPool and its cousin DMTaskRunner.
I also took the opportunity to swap head and tail in the threadpool
implementation so it matches the comments and intuition better: we always pop
the head, add() puts it at the tail, addNext() at the head.


Before
  Debug:   49s, 1403352k peak
  Release: 16s, 2064008k peak

After
  Debug:   49s, 1234788k peak
  Release: 15s, 1903424k peak

BUG=skia:2478
R=bsalomon@google.com, borenet@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/263803003

git-svn-id: http://skia.googlecode.com/svn/trunk@14506 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-01 17:41:32 +00:00
commit-bot@chromium.org
b0c7156d5b DM: run child tasks that are already on the CPU threadpool serially
These tasks tend to do similar things with similar sized bitmaps, so running
them serially means we tend to hold 2x bitmaps at a time (golden and
comparison) instead of (1+k)x bitmaps (golden and k concurrent comparisons).

We still migrate GPU task's children over to the main CPU thread pool,
because they'll run faster there and free up capacity on the GPU thread.

Before
  Debug: 54s, 2.9G peak
  Release: 13s, 2.4G peak

After
  Debug: 48s, 1.5G peak
  Release: 15s, 2.0G peak

BUG=skia:2478
R=borenet@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/261593008

git-svn-id: http://skia.googlecode.com/svn/trunk@14486 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-30 20:47:30 +00:00
commit-bot@chromium.org
125c6cdefe DM: when 32-bit, disable pathops internal threading by default
Before this change, when limited to 4G, pathops threaded tests were the weak
link RAM-consumption-wise (in thread-local font caches) up until about 12
cores, where other problems begin to pile up too.

Tested by running:
    ulimit -Sv 4194304
    out/Debug/dm --threads N [--pathOpsSingleThread]

After this, we're _probably_ good to go on 32-bit machines with 8 cores.

BUG=skia:2478
R=borenet@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/265593003

git-svn-id: http://skia.googlecode.com/svn/trunk@14463 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-30 14:56:29 +00:00
commit-bot@chromium.org
a90c680386 Turn on quilt mode in DM.
- Rename TileGrid -> Quilt to avoid the name overload.
  - Tag all failing GMs with kSkipTiled_Flag.

You may be wondering, do any GMs pass?  Yes, some do!  And that trends towards all of them as we increase --quiltTile.

Two GMs only fail in --quilt mode in 565.  Otherwise all GMs which fail are skipped, and those which don't fail aren't. (The 8888 variants of those two GMs are skipped even though they pass.)

BUG=skia:2477
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/256373002

git-svn-id: http://skia.googlecode.com/svn/trunk@14457 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-30 13:20:45 +00:00
commit-bot@chromium.org
96eb6243ca DM's rtree picture replay mode can ignore kSkippedTiled_Flag safely.
tested: out/Debug/dm && out/Release/dm

BUG=skia:2477
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/253733006

git-svn-id: http://skia.googlecode.com/svn/trunk@14438 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-29 16:44:00 +00:00
commit-bot@chromium.org
732bd66ac2 Rearrange SkRecord public API to fit better with cc/resources/picture
BUG=skia:2378
R=reed@google.com, danakj@chromium.org, enne@chromium.org, mtklein@google.com, robertphillips@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/248033002

git-svn-id: http://skia.googlecode.com/svn/trunk@14351 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-24 15:22:55 +00:00
commit-bot@chromium.org
2c4e75cc3c Remove offset to SkMallocPixelRef::NewWithData - use SkData::NewSubset instead.
R=scroggo@google.com, mtklein@google.com, reed@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/243483002

git-svn-id: http://skia.googlecode.com/svn/trunk@14289 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-21 21:08:14 +00:00
robertphillips@google.com
770963f23f Staging for cleanup of SkPicture-related headers
https://codereview.chromium.org/243173002



git-svn-id: http://skia.googlecode.com/svn/trunk@14258 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-18 18:04:41 +00:00
commit-bot@chromium.org
5fb2ce38b3 Staged removal of SkPicture-derived classes
This CL removes the SkPicture-derived classes (with a flag to keeps clients working). In the process it also lightens the recording factory function so it is no longer ref counted).

The only interesting bits are in SkPicture* and Sk*Picture.*

R=reed@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/238273012

git-svn-id: http://skia.googlecode.com/svn/trunk@14251 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-17 23:35:06 +00:00
commit-bot@chromium.org
d393b17cf3 Retract SkPicture::kOptimizeForClippedPlayback_RecordingFlag from public API
This CL sets the stage for retracting the SkPicture::kOptimizeForClippedPlayback_RecordingFlag flag
from the public API (more work needs to be done in Blink & Chrome). In the new world the only way
to set this flag (and thus instantiate an SkPicture-derived
class) is by passing a factory to the SkPictureRecorder class. This is to get all clients always using
factories so that we can then change the factory call used (i.e., so the factory just creates a BBH) and
do away with the SkPicture-derived classes.

BUG=skia:2315
R=reed@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/239703006

git-svn-id: http://skia.googlecode.com/svn/trunk@14221 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-16 16:02:10 +00:00
commit-bot@chromium.org
b17a24fedb SkRecord: turn on cull annotation pass in public API.
Also, switch Skia internal tools over to use the public headers where
possible.  Where it's not, the tools -Isrc/record explicitly now, and
if it's not obvious, note why they don't use SkRecording.h.

BUG=skia:2378
R=reed@google.com, mtklein@google.com, fmalita@chromium.org

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/231853006

git-svn-id: http://skia.googlecode.com/svn/trunk@14191 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-14 20:33:05 +00:00
skia.committer@gmail.com
5199701acb Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@14172 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-14 03:04:57 +00:00
robertphillips@google.com
84b18c7e3e split SkPictureRecorder out of SkPicture
https://codereview.chromium.org/214953003/



git-svn-id: http://skia.googlecode.com/svn/trunk@14171 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-13 19:09:42 +00:00
commit-bot@chromium.org
28fcae2ec7 Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/234243002/)
Reason for revert:
Want to reland the original CL.

Original issue's description:
> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)
>
> Reason for revert:
> breaking the Chrome deps roll.
> http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio
>
> Original issue's description:
> > Rename kPMColor_SkColorType to kN32_SkColorType.
> >
> > The new name better represents what this flag means.
> >
> > BUG=skia:2384
> >
> > Committed: http://code.google.com/p/skia/source/detail?r=14117
>
> TBR=reed@google.com,scroggo@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14144

R=reed@google.com, bensong@google.com
TBR=bensong@google.com, reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/235523003

git-svn-id: http://skia.googlecode.com/svn/trunk@14156 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-11 17:15:40 +00:00
commit-bot@chromium.org
96edc24598 Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)
Reason for revert:
Chrome's side of define changes not easy to figure out quickly. Reverting this for DEPS roll for now.

Original issue's description:
> Rename kPMColor_SkColorType to kN32_SkColorType.
>
> The new name better represents what this flag means.
>
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14117

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

Author: bensong@google.com

Review URL: https://codereview.chromium.org/234833003

git-svn-id: http://skia.googlecode.com/svn/trunk@14149 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-11 13:47:30 +00:00
commit-bot@chromium.org
d923288e50 Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/234243002/)
Reason for revert:
fixes on the chrome side are landing (brettw), keep fingers crossed.

Original issue's description:
> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)
>
> Reason for revert:
> breaking the Chrome deps roll.
> http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio
>
> Original issue's description:
> > Rename kPMColor_SkColorType to kN32_SkColorType.
> >
> > The new name better represents what this flag means.
> >
> > BUG=skia:2384
> >
> > Committed: http://code.google.com/p/skia/source/detail?r=14117
>
> TBR=reed@google.com,scroggo@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14144

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

Author: bensong@google.com

Review URL: https://codereview.chromium.org/233813004

git-svn-id: http://skia.googlecode.com/svn/trunk@14145 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-10 22:49:20 +00:00
commit-bot@chromium.org
757ebd20ef Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)
Reason for revert:
breaking the Chrome deps roll.
http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio

Original issue's description:
> Rename kPMColor_SkColorType to kN32_SkColorType.
>
> The new name better represents what this flag means.
>
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14117

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

Author: bensong@google.com

Review URL: https://codereview.chromium.org/234243002

git-svn-id: http://skia.googlecode.com/svn/trunk@14144 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-10 22:36:34 +00:00
commit-bot@chromium.org
d9ce2be6b2 SkRecordDraw: skip draw ops when the clip is empty
- Adds tests for SkRecordDraw's two main features: cull- and clip- based skipping.
   - Adds full SkCanvas semantic mode to SkRecorder, so it can be used as a target for SkRecordDraw.

BUG=skia:2378
R=fmalita@chromium.org, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/231653002

git-svn-id: http://skia.googlecode.com/svn/trunk@14124 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-09 23:30:28 +00:00
commit-bot@chromium.org
149e9a107c Rename kPMColor_SkColorType to kN32_SkColorType.
The new name better represents what this flag means.

BUG=skia:2384
R=reed@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/227433009

git-svn-id: http://skia.googlecode.com/svn/trunk@14117 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-09 20:45:29 +00:00
commit-bot@chromium.org
506db0b7d2 SkRecord: make culling work if SkRecordAnnotateCullingPairs is called.
- Allow stateful functors; allow visit()/mutate() at a given index; add count().
  - Annotate cull push/pop pairs on the PushCull records.  (tested)
  - Use those annotations to skip ahead in SkRecordDraw.   (not yet tested beyond dm --skr)
  - Make SkRecordDraw a function, move its implementation to a .cpp.

BUG=skia:2378
R=fmalita@chromium.org, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/229523002

git-svn-id: http://skia.googlecode.com/svn/trunk@14101 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-08 23:31:35 +00:00
commit-bot@chromium.org
e3ff558a4b SkRecord strawman
Record performance as measured by bench_record (out/Release/bench_record --skr) improves by at least 1.9x, at most 6.7x, arithmetic mean 2.6x, geometric mean 3.0x.  So, good.

Correctness as measured by DM (out/Debug/dm --skr) is ~ok.  One GM (shadertext2) fails because we're assuming all paint effects are immutable, but SkShaders are still mutable.

To do after this CL:
  - measure playback speed
  - catch up feature-wise to SkPicture
  - match today's playback speed


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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/206313003

git-svn-id: http://skia.googlecode.com/svn/trunk@14010 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-01 16:24:06 +00:00
commit-bot@chromium.org
fa8cb1cf22 Make DM play nice with the plan to split CPU and GPU work.
--nocpu skips all CPU-bound work.
--nogpu skips all GPU-bound work.

/m/s/skia (dm) $ r dm --nogpu
ninja: Entering directory `out/Release'
[17/17] LINK dm
(294 GMs, 620 benches) x 4 configs, 245 tests
0 tasks left
71.46user 12.40system 0:04.52elapsed 1854%CPU (0avgtext+0avgdata 16828656maxresident)k
0inputs+0outputs (0major+3252811minor)pagefaults 0swaps

/m/s/skia (dm) $ r dm --nocpu
ninja: Entering directory `out/Release'
ninja: no work to do.
(294 GMs, 620 benches) x 4 configs, 245 tests
926 tasks leftUnsupported vertex-color/texture xfer mode.
Unsupported vertex-color/texture xfer mode.
0 tasks left
11.10user 2.38system 0:17.15elapsed 78%CPU (0avgtext+0avgdata 1310896maxresident)k
16inputs+4664outputs (0major+161322minor)pagefaults 0swaps


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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/219403004

git-svn-id: http://skia.googlecode.com/svn/trunk@14001 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-31 19:59:44 +00:00
commit-bot@chromium.org
787227d356 Let DM work without a GPU.
Testing:

/m/s/skia (dm) $ d dm; and env GYP_DEFINES=skia_gpu=0 d dm
ninja: Entering directory `out/Debug'
ninja: no work to do.
(294 GMs, 620 benches) x 4 configs, 245 tests
4507 tasks leftUnsupported vertex-color/texture xfer mode.
Unsupported vertex-color/texture xfer mode.
0 tasks left
416.53user 9.86system 0:47.43elapsed 898%CPU (0avgtext+0avgdata
13353376maxresident)k
0inputs+0outputs (0major+3579906minor)pagefaults 0swaps
ninja: Entering directory `out/Debug'
[909/909] LINK dm
(287 GMs, 612 benches) x 4 configs, 227 tests
0 tasks left
365.24user 7.71system 0:14.55elapsed 2562%CPU (0avgtext+0avgdata
14718912maxresident)k
0inputs+0outputs (0major+3328269minor)pagefaults 0swaps

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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/213093004

git-svn-id: http://skia.googlecode.com/svn/trunk@13960 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-26 21:26:15 +00:00
commit-bot@chromium.org
b6401863fb Add NVPR configs to DM
Add NVPR configs to DM. The bench and gm parts support NVPR already.

R=bsalomon@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/196633005

git-svn-id: http://skia.googlecode.com/svn/trunk@13763 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-12 14:46:31 +00:00
commit-bot@chromium.org
eef834f2be DM: read image files without an extra copy
BUG=skia:
R=halcanary@google.com, reed@google.com, bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/185263012

git-svn-id: http://skia.googlecode.com/svn/trunk@13669 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-05 15:37:11 +00:00
commit-bot@chromium.org
a39874b636 DM: tweak output.
Show task name in verbose mode only, and add task runtime.

BUG=skia:
R=reed@google.com, bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/185233004

git-svn-id: http://skia.googlecode.com/svn/trunk@13639 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-03 15:44:56 +00:00
commit-bot@chromium.org
1426c1e9b6 DM: fix -w/-r problems stemming from PM/UPM conversions.
DM will now read and write a custom image format, which begins first with a
normal PNG, but also includes the bitmap's raw pixels.  Most tools (file
browser, Preview, Chrome, Skia image decoder) will read the file as PNG.  DM
skips the encoded PNG and reads the raw pixels instead.

This scheme allows perfect pixel comparisons that never go through PM -> UPM or
UPM -> PM conversions, as long as you compare on a machine with the same native
pixel format as the machine which generated the images.  Since we've only ever
used this to do same-machine comparisons, that's more than good enough for now.
We could convert as needed to a standardized PM pixel format if we find we want
these files to be portable.

DM -w output now does increase to ~1.3G.  If that turns out to be annoyingly
big, I'm sure I can come up with a simple pixelwise RLE instead of writing
uncompressed pixels.

BUG=skia:
R=reed@google.com, bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/185343002

git-svn-id: http://skia.googlecode.com/svn/trunk@13638 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-03 15:43:56 +00:00
commit-bot@chromium.org
ef57b7e653 DM: make GPU tasks multithreaded again. Big refactor.
The main meat of things is in SkThreadPool.  We can now give SkThreadPool a
type for each thread to create and destroy on its local stack.  It's TLS
without going through SkTLS.

I've split the DM tasks into CpuTasks that run on threads with no TLS, and
GpuTasks that run on threads with a thread local GrContextFactory.

The old CpuTask and GpuTask have been renamed to CpuGMTask and GpuGMTask.

Upshot: default run of out/Debug/dm goes from ~45 seconds to ~20 seconds.

BUG=skia:
R=bsalomon@google.com, mtklein@google.com, reed@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/179233005

git-svn-id: http://skia.googlecode.com/svn/trunk@13632 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-28 20:31:31 +00:00
commit-bot@chromium.org
d1a7e2ec6f DM: don't crash on Mac.
BUG=skia:
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/177053005

git-svn-id: http://skia.googlecode.com/svn/trunk@13631 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-28 20:28:59 +00:00
commit-bot@chromium.org
38aeb0fd7a DM: also run benches once.
Also:
  - make GrMemoryPoolBenches threadsafe
  - some tweaks to various DM code
  - rename GM::shortName() to getName() to match benches and tests

On my desktop, (289 GMs, 617 benches) x 4 configs, 227 tests takes 46s in Debug, 14s in Release.  (Still minutes faster than running tests && bench && gm.)  GPU singlethreading is definitely the limiting factor again; going to reexamine whether that's helpful to thread it again.

BUG=skia:
R=reed@google.com, bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/178473006

git-svn-id: http://skia.googlecode.com/svn/trunk@13603 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-26 23:01:57 +00:00
commit-bot@chromium.org
0dc5bd149a Let DM run unit tests.
- refactor GYPs and a few flags
  - make GPU tests grab a thread-local GrContextFactory when needed as we do in DM for GMs
  - add a few more UI features to make DM more like tests

I believe this makes the program 'tests' obsolete.

It should be somewhat faster to run the two sets together than running the old binaries serially:
  - serial: tests 20s (3m18s CPU), dm 21s (3m01s CPU)
  - together: 27s (6m21s CPU)

Next up is to incorporate benches.  I'm only planning there on a single-pass sanity check, so that won't obsolete the program 'bench' just yet.

Tested: out/Debug/tests && out/Debug/dm && echo ok
BUG=skia:

Committed: http://code.google.com/p/skia/source/detail?r=13586

R=reed@google.com, bsalomon@google.com, mtklein@google.com, tfarina@chromium.org

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/178273002

git-svn-id: http://skia.googlecode.com/svn/trunk@13592 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-26 16:31:22 +00:00
commit-bot@chromium.org
79e13260cf Revert of Let DM run unit tests. (https://codereview.chromium.org/178273002/)
Reason for revert:
broke tests

Original issue's description:
> Let DM run unit tests.
>   - refactor GYPs and a few flags
>   - make GPU tests grab a thread-local GrContextFactory when needed as we do in DM for GMs
>   - add a few more UI features to make DM more like tests
>
> I believe this makes the program 'tests' obsolete.
>
> It should be somewhat faster to run the two sets together than running the old binaries serially:
>   - serial: tests 20s (3m18s CPU), dm 21s (3m01s CPU)
>   - together: 27s (6m21s CPU)
>
> Next up is to incorporate benches.  I'm only planning there on a single-pass sanity check, so that won't obsolete the program 'bench' just yet.
>
> Tested: out/Debug/tests && out/Debug/dm && echo ok
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=13586

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

Author: reed@google.com

Review URL: https://codereview.chromium.org/179403010

git-svn-id: http://skia.googlecode.com/svn/trunk@13587 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-25 20:02:09 +00:00
commit-bot@chromium.org
6bd250a2a3 Let DM run unit tests.
- refactor GYPs and a few flags
  - make GPU tests grab a thread-local GrContextFactory when needed as we do in DM for GMs
  - add a few more UI features to make DM more like tests

I believe this makes the program 'tests' obsolete.

It should be somewhat faster to run the two sets together than running the old binaries serially:
  - serial: tests 20s (3m18s CPU), dm 21s (3m01s CPU)
  - together: 27s (6m21s CPU)

Next up is to incorporate benches.  I'm only planning there on a single-pass sanity check, so that won't obsolete the program 'bench' just yet.

Tested: out/Debug/tests && out/Debug/dm && echo ok
BUG=skia:
R=reed@google.com, bsalomon@google.com, mtklein@google.com, tfarina@chromium.org

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/178273002

git-svn-id: http://skia.googlecode.com/svn/trunk@13586 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-25 19:32:15 +00:00
commit-bot@chromium.org
8a2ad3cae7 add new copyTo version to SkBitmap, which takes SkColorType
BUG=skia:
R=scroggo@google.com, halcanary@google.com, bsalomon@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/171723007

git-svn-id: http://skia.googlecode.com/svn/trunk@13553 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-23 03:59:35 +00:00
commit-bot@chromium.org
8565917fd7 DM: don't run rtree when kSkipTiled is set.
Follow up to http://crrev.com/165723009, which changed this in GM.

Tested: out/Debug/dm

BUG=skia:

Committed: http://code.google.com/p/skia/source/detail?r=13537

NOTREECHECKS=True
NOTRY=True
R=scroggo@google.com, senorblanco@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/175283002

git-svn-id: http://skia.googlecode.com/svn/trunk@13540 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-21 19:19:47 +00:00
commit-bot@chromium.org
5301070de8 DM: don't run rtree when kSkipTiled is set.
Follow up to http://crrev.com/165723009, which changed this in GM.

Tested: out/Debug/dm

BUG=skia:
R=scroggo@google.com, senorblanco@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/175283002

git-svn-id: http://skia.googlecode.com/svn/trunk@13537 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-21 18:33:25 +00:00