Commit Graph

156 Commits

Author SHA1 Message Date
bsalomon
3e79124a69 Stop creating GrODS for stencilPath commands.
Review URL: https://codereview.chromium.org/816513003
2014-12-17 13:43:13 -08:00
reed
a816d95b1e version 0 of imgconv tool
BUG=skia:

Review URL: https://codereview.chromium.org/809143002
2014-12-17 13:08:17 -08:00
mtklein
9a0d6d6c88 skimage, die die die
DM's running with --images on all the bots now.  They look happy.

BUG=skia:3235

Review URL: https://codereview.chromium.org/804133003
2014-12-15 12:47:52 -08:00
Greg Humphreys
21c771b3fc Revert "move SkPDFD*.h from include to src"
This reverts commit 693024300f.

was breaking canary build

BUG=skia:

Review URL: https://codereview.chromium.org/731173002
2014-11-17 09:42:09 -05:00
halcanary
693024300f move SkPDFD*.h from include to src
BUG=278148

Review URL: https://codereview.chromium.org/727343002
2014-11-17 06:26:21 -08:00
djsollen
c87dd2ce96 Enable unused param checking for public includes.
This CL cleans up the existing violations and enables the
build time check to ensure that we don't regress.

The motiviation behind this change is to allow clients who include
our headers to be able to build with this warning enabled.

Review URL: https://codereview.chromium.org/726923002
2014-11-14 11:11:46 -08:00
djsollen
082a4620fd Move WGL header from include to src
NOTRY=true

Review URL: https://codereview.chromium.org/728823002
2014-11-14 07:21:29 -08:00
djsollen
5ae776504f Cleanup the XML directory in public includes.
Review URL: https://codereview.chromium.org/722343002
2014-11-14 05:52:50 -08:00
djsollen
0b17d6cb34 Cleanup public includes directory.
This CL updates various files in the includes directory to ensure that (1) they do
not depend on headers in /src and (2) that they minimize their dependence on external
headers.

To ensure that we don't regress this behavior a new build target has been added to
build a single cpp file that contains all* public includes and is compiled with
only those directories in the include path.

* The exception is those includes that depend on OS specific headers

BUG=skia:2941
NOTRY=true

Review URL: https://codereview.chromium.org/721903002
2014-11-13 12:52:35 -08:00
djsollen
e4545210c9 Cleanup GrContextFactory and make it's subclasses private
Review URL: https://codereview.chromium.org/723183002
2014-11-13 11:12:41 -08:00
mtklein
ecf987559b Turn SkTaskGroups back on.
Revert "Disable SkTaskGroup in SkMultiPictureDraw temporarily."
Revert "Revert harder, removing SkTaskGroup.cpp from core temporarily."

NOTREECHECKS=true

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/2100c5ed7a5e5470a04e7af7309d8bd3fc4249f7

Review URL: https://codereview.chromium.org/687263007
2014-11-03 17:41:08 -08:00
mtklein
e9f7fbfaee Revert of Turn SkTaskGroups back on. (patchset #1 id:1 of https://codereview.chromium.org/687263007/)
Reason for revert:
precautionary revert.  may have caused WinXP crashes on Chrome tree: https://code.google.com/p/chromium/issues/detail?id=429207

Original issue's description:
> Turn SkTaskGroups back on.
>
> Revert "Disable SkTaskGroup in SkMultiPictureDraw temporarily."
> Revert "Revert harder, removing SkTaskGroup.cpp from core temporarily."
>
> NOTREECHECKS=true
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2100c5ed7a5e5470a04e7af7309d8bd3fc4249f7

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

Review URL: https://codereview.chromium.org/693993002
2014-10-31 11:30:22 -07:00
mtklein
2100c5ed7a Turn SkTaskGroups back on.
Revert "Disable SkTaskGroup in SkMultiPictureDraw temporarily."
Revert "Revert harder, removing SkTaskGroup.cpp from core temporarily."

NOTREECHECKS=true

BUG=skia:

Review URL: https://codereview.chromium.org/687263007
2014-10-31 06:38:25 -07:00
mtklein
13a8de0b51 Revert harder, removing SkTaskGroup.cpp from core temporarily.
Not all linkers are seeing the SkThread code is not needed.

BUG=skia:
NOTREECHECKS=true

Review URL: https://codereview.chromium.org/673903007
2014-10-30 08:19:19 -07:00
reed
89889b6939 MultiPictureDraw is taskgroup aware.
SampleApp is multipicturedraw aware.

BUG=skia:

Review URL: https://codereview.chromium.org/684923002
2014-10-29 12:36:45 -07:00
mtklein
33bce0a68b Clean up old custom tools now subsumed by nanobench.
BUG=skia:
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/551263003
2014-09-10 12:11:23 -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
mtklein
1915b62637 Add --properties for things like gitHash that describe the current nanobench run.
--key describes the type of run (describes the line on the chart), --properties
describes the run itself (describes the dot on the chart).

We'll pass --properties gitHash <git hash> build_number <build number>  --key
... to nanobench from the bots.

And... delete a whole lot of dead code.

Example: nanobench --properties gitHash foo build_number 1234 --key bar baz

{
   "build_number" : "1234",
   "gitHash" : "foo",
   "key" : {
      "bar" : "baz"
   },
   "results" : {
....

Friends with https://codereview.chromium.org/491943002
BUG=skia:
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/488213002
2014-08-20 11:45:00 -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
stephana
21b342d19c This eliminates the need to copy the generated images from a temporary directory to the directory that is served by the rebaseline_server.
BUG=skia:2815, skia:2818
R=epoger@google.com

Author: stephana@google.com

Review URL: https://codereview.chromium.org/457203003
2014-08-13 10:36:06 -07:00
halcanary
8b2cb3391d clean up render_pdfs:
Remove unused headers
     replace dynamic memory wstream with null wstream.
     Use SkAutoTDelete when appropriate.
     Replace PdfRenderer class with short function: pdf_to_stream.
     Collapse render_pdf, process_input, tool_main_core functions
     Split out process_input_files function.
     Don't crash when no arguments given.
     print out max rss on each skp.
     prettier output

R=mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/463603002
2014-08-11 13:08:27 -07:00
halcanary
0d154eeaeb Process Statistics header, add max RSS to render_pdfs
Committed: https://skia.googlesource.com/skia/+/6274baae7fe82ce6481da367687aa6168356e1e1

R=mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/448993003
2014-08-11 11:33:51 -07:00
bungeman
619e07656d Revert of Process Statistics header, add max RSS to render_pdfs (https://codereview.chromium.org/448993003/)
Reason for revert:
Reverting due to breaking iOS bots.

Original issue's description:
> Process Statistics header, add max RSS to render_pdfs
>
> Committed: https://skia.googlesource.com/skia/+/6274baae7fe82ce6481da367687aa6168356e1e1

R=mtklein@google.com, halcanary@google.com
TBR=halcanary@google.com, mtklein@google.com
NOTREECHECKS=true
NOTRY=true

Author: bungeman@google.com

Review URL: https://codereview.chromium.org/448243003
2014-08-07 13:27:18 -07:00
halcanary
6274baae7f Process Statistics header, add max RSS to render_pdfs
R=mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/448993003
2014-08-07 13:13:54 -07:00
halcanary
0bef17a678 render_pdfs implements --match
BUG=skia:2743
NOTRY=true
R=djsollen@google.com, mtklein@google.com, borenet@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/441423002
2014-08-07 07:24:48 -07:00
halcanary
f91b47ff9e Revert of Memory improvements to render_pdfs; better DM pool size defaults (https://codereview.chromium.org/433063002/)
Reason for revert:
breaking android tests

Original issue's description:
> Memory improvements to render_pdfs; better DM pool size defaults
>
> Make SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE equal to
> skia_resource_cache_mb_limit, if that value is >0 (true for some
> low-memory Android devices).
>
> render_pdfs test program uses lazy decoding (and the discardable
> memory pool).
>
> BUG=skia:2743
>
> Committed: https://skia.googlesource.com/skia/+/66058b614d9c8cb63c24b1c779dd1a9a80752217

R=djsollen@google.com, mtklein@google.com
TBR=djsollen@google.com, mtklein@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2743

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/418173012
2014-08-01 11:54:48 -07:00
halcanary
66058b614d Memory improvements to render_pdfs; better DM pool size defaults
Make SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE equal to
skia_resource_cache_mb_limit, if that value is >0 (true for some
low-memory Android devices).

render_pdfs test program uses lazy decoding (and the discardable
memory pool).

BUG=skia:2743
R=djsollen@google.com, mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/433063002
2014-08-01 09:25:11 -07:00
mtklein
ada972df35 sk_tool_utils_flags.cpp depends on GetResourcePath
BUG=skia:
R=caryclark@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/432033002
2014-07-31 08:31:56 -07:00
Cary Clark
992c7b03ef Add standard fonts to all GMs.
Allow GM results to be compared across machines and platforms by
standardizing the fonts used by all tests.

This adds runtime flags to DM to use either the system font context (the
default), the fonts in the resources directory ( --resourceFonts ) or a set
of canonical paths generated from the fonts ( --portableFonts ).

This CL should leave the current DM results unchanged by default.

If the portable font data or resource font is missing when DM is run, it
falls back to using the system font context.

The create_test_font tool generates the paths and metrics read by DM
with the --portableFonts flag set, and generates the font substitution
tables read by DM with the --resourceFonts flag set.

If DM is run in SkDebug mode with the --reportUsedChars flag set, it
generates the corresponding data compiled into the create_test_font tool.

All GM tests set their typeface information by calling either

  sk_tool_utils::set_portable_typeface or
  sk_tool_utils::portable_typeface .

(The former takes the paint, the latter returns a SkTypeface.) These calls
can be removed in the future when the Font Manager can be superceded.

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

Review URL: https://codereview.chromium.org/407183003
2014-07-31 08:58:44 -04:00
scroggo
3eb258d3f6 Generate makefile for bench_pictures.
When generating Android framework makefiles, create one for
bench_pictures.

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

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/391423002
2014-07-17 06:58:29 -07:00
Mike Klein
874a62acef Revert "Remove ability for Release code to call getRefCnt() or getWeakRefCnt()."
This reverts commit 4ae94ffce5.

BUG=skia:

Review URL: https://codereview.chromium.org/382523002
2014-07-09 09:04:07 -04:00
mtklein
4ae94ffce5 Remove ability for Release code to call getRefCnt() or getWeakRefCnt().
These getRefCnt() methods are not thread safe, so Skia code should not
be calling them.  unique() is fine.

SkDEBUG code (SkASSERTs) can still call getRefCnt() / getWeakRefCnt().

This adds tools/RefCntIs.{h,cpp}, which lets tests make their assertions in
both debug and release modes.

BUG=skia:2726
R=senorblanco@chromium.org, mtklein@google.com, reed@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/378643003
2014-07-08 06:48:17 -07:00
caryclark
5fb6bd4b7e use platform-independent font for gm
Create a custom typeface and scaler to render simple paths the
same on all platforms.

GM tests are modified to explicitly select the custom typeface.

R=reed@google.com, mtklein@google.com, bungeman@google.com
TBR=reed

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/348323003
2014-06-23 11:25:00 -07:00
tfarina
1c4d5784f9 No need to include ../tools/flags in include_dirs when depending on flags target.
"flags" target does it by direct_dependent_settings which exports the
include_dirs to targets that depend on it.

Along the way fixed the indentation of experimental.gyp and v8.gyp.

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

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/343283002
2014-06-22 16:13:00 -07:00
tfarina
2010891425 Add GYP target for sk_tool_utils.* component.
This declares a static library target in gyp/sk_tool_utils.gyp, so other
targets can depend directly on it instead of including the source file
in their source lists.

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

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/348623006
2014-06-21 10:54:17 -07:00
mtklein
9ac68ee259 Move BenchTimer to tools as Timer
This breaks a bunch of circular dependencies between tools and gm and bench.

BUG=skia:

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

CQ_EXTRA_TRYBOTS=tryserver.skia:Build-Mac10.7-Clang-Arm7-Debug-iOS-Trybot,Test-Ubuntu12-ShuttleA-GTX660-x86-Debug-Trybot
R=tfarina@chromium.org, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/344213003
2014-06-20 11:29:21 -07:00
mtklein
9e64b78ff6 Revert of Move BenchTimer to tools as Timer (https://codereview.chromium.org/344213003/)
Reason for revert:
GpuTimer broken

Original issue's description:
> Move BenchTimer to tools as Timer
>
> This breaks a bunch of circular dependencies between tools and gm and bench.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4ed75287aed6371c6e4a41ffcc78c8a49c9810ed

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

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/346753003
2014-06-20 10:43:07 -07:00
mtklein
4ed75287ae Move BenchTimer to tools as Timer
This breaks a bunch of circular dependencies between tools and gm and bench.

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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/344213003
2014-06-20 10:31:49 -07:00
tfarina
f168b86d7f Remove Sk prefix from some bench classes.
This idea came while commenting on
https://codereview.chromium.org/343583005/

Since SkBenchmark, SkBenchLogger and SkGMBench are not part of the Skia library,
they should not have the Sk prefix.

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

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/347823004
2014-06-19 12:32:29 -07:00
tfarina
bcbc1788b4 Refactor how we handle resources path in Tests.
This idea emerged while doing https://codereview.chromium.org/321723002/
(commit 880914c35c).

BUG=None
TEST=make tests && out/Debug/tests
R=mtklein@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/346453002
2014-06-18 14:32:49 -07:00
mtklein
30e6e2af14 Add basic stacktrace handler using libunwind.
This means we will all have to apt-get install libunwind8-dev on Linux.  Mac comes with everything we need already.

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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/343583005
2014-06-18 11:44:18 -07:00
mtklein
887f3979f0 Add EXPERIMENTAL_beginRecording() for SkRecord-based recording.
The interesting stuff is in SkPictureRecorder.{h,cpp}.  The rest is mostly moving SkRecord from its own directories into core to avoid circular dependencies in GYP.

After plumbing SkRecord all the way through in Picture, I'll delete its old entry point include/record/SkRecording.h.  For now it and record.gypi need to stay where they are to keep Chrome building.

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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/331573004
2014-06-17 12:08:16 -07:00
tfarina
055cf91416 Delete unused path_utils.* component.
filter tool includes it but isn't using, and nobody else seems to
be using it either. So just remove it now.

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

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/324273002
2014-06-14 04:50:04 -07:00
commit-bot@chromium.org
37c772ae2d Reland https://codereview.chromium.org/286903025
BUG=skia:
R=bensong@google.com, epoger@google.com

Author: kelvinly@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14966 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-29 17:10:24 +00:00
commit-bot@chromium.org
293a4b367a Revert of PictureBenchmark JSON logging (https://codereview.chromium.org/286903025/)
Reason for revert:
Broke some Windows builds; see http://skbug.com/2609 ('certain Windows Build-* bots failing since r14905').

Before re-landing with a fix, please send to some of the trybots that failed the first time.

Original issue's description:
> Add JSON logging support to bench_pictures by adding a PictureResultsWriter class (in tools/PictureResultsWriter.h) to process logging information, using a very similar style as bench/ResultsWriter.h
>
> JSON format described in code, above PictureJSONResultsWriter class
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=14906

R=bensong@google.com, jcgregorio@google.com, kelvinly@google.com
TBR=bensong@google.com, jcgregorio@google.com, kelvinly@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2609

Author: epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14910 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-27 21:51:38 +00:00
commit-bot@chromium.org
3089004cc8 Add JSON logging support to bench_pictures by adding a PictureResultsWriter class (in tools/PictureResultsWriter.h) to process logging information, using a very similar style as bench/ResultsWriter.h
JSON format described in code, above PictureJSONResultsWriter class

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

Author: kelvinly@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14906 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-27 20:57:44 +00:00
commit-bot@chromium.org
85fd193223 Factor out DumpRecord method from dump_record tool for later use
R=mtklein@google.com

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14751 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-15 16:10:37 +00:00
commit-bot@chromium.org
27f6b0d013 Add timing to dump_record.
Prints microsecond timing for each command in the left-hand column:

optimized flat/http___mobile_news_sandbox_google_com_news_pt0_scroll_layer_7.skp
   4.0   1 Save
2075.0   2      DrawRect
 104.0   3      BoundedDrawPosTextH
 135.4   4      DrawRect
   9.4   5      DrawRect
   5.6   6      DrawRect
   8.2   7      DrawRect
   6.8   8      DrawRect
...

(I'm sure Rietveld will just mangle the crap out of that.  It's helpfully right-aligned.)

To do this, I made Draw from SkRecordDraw Skia-public as SkRecords::Draw,
and time it command-by-command.

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

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14672 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-09 14:59:29 +00:00