Commit Graph

1350 Commits

Author SHA1 Message Date
scroggo
e361781bf7 Fix codec memory leaks in nanobench
SubsetTranslateBench.cpp:
Unref the color table, so it gets deleted.

SkBitmapRegionDecoderInterface.cpp:
Delete the stream if it is not used.

BUG=skia:3418

Review URL: https://codereview.chromium.org/1396113003
2015-10-09 12:15:57 -07:00
msarett
e6dd004c1b Fill incomplete images in SkCodec parent class
Rather than implementing some sort of "fill" in every
SkCodec subclass for incomplete images, let's make the
parent class handle this situation.

This includes an API change to SkCodec.h

SkCodec::getScanlines() now returns the number of lines it
read successfully, rather than an SkCodec::Result enum.
getScanlines() most often fails on an incomplete input, in
which case it is useful to know how many lines were
successfully decoded - this provides more information than
kIncomplete vs kSuccess.  We do lose information when the
API is used improperly, as we are no longer able to return
kInvalidParameter or kScanlineNotStarted.

Known Issues:
Does not work for incomplete fFrameIsSubset gifs.
Does not work for incomplete icos.

BUG=skia:

Review URL: https://codereview.chromium.org/1332053002
2015-10-09 11:07:34 -07:00
scroggo
0a3cac8a90 Reland of Pass --images '' to nanobench to disable image benchmarking. (patchset #1 id:1 of https://codereview.chromium.org/1400633002/ )
Reason for revert:
Still breaking. e.g.

http://build.chromium.org/p/client.skia/builders/Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug/builds/1466/steps/nanobench/logs/stdio

http://build.chromium.org/p/client.skia.android/builders/Perf-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Release/builds/2280/steps/nanobench/logs/stdio

Original issue's description:
> Revert of Pass --images '' to nanobench to disable image benchmarking. (patchset #1 id:1 of https://codereview.chromium.org/1381703003/ )
>
> Reason for revert:
> I have attempted to fix the problems that caused running nanobench with images to fail, so testing to see if they are in fact fixed.
>
> Original issue's description:
> > Pass --images '' to nanobench to disable image benchmarking.
> >
> > Enabling image benchmarking has caused most nanobench runs to fail,
> > both Debug and Release.
> >
> > BUG=skia:3418
> > NOTREECHECKS=true
> > TBR=scroggo@google.com
> >
> > Committed: https://skia.googlesource.com/skia/+/1f7039c6c5f0f118b629994b0bac255345e5abd6
>
> BUG=skia:3418
>
> Committed: https://skia.googlesource.com/skia/+/c2e59caa0a466040f4b4f08cb5604c86b2615efa

TBR=mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3418

Review URL: https://codereview.chromium.org/1396843003
2015-10-08 14:44:51 -07:00
scroggo
c2e59caa0a Revert of Pass --images '' to nanobench to disable image benchmarking. (patchset #1 id:1 of https://codereview.chromium.org/1381703003/ )
Reason for revert:
I have attempted to fix the problems that caused running nanobench with images to fail, so testing to see if they are in fact fixed.

Original issue's description:
> Pass --images '' to nanobench to disable image benchmarking.
>
> Enabling image benchmarking has caused most nanobench runs to fail,
> both Debug and Release.
>
> BUG=skia:3418
> NOTREECHECKS=true
> TBR=scroggo@google.com
>
> Committed: https://skia.googlesource.com/skia/+/1f7039c6c5f0f118b629994b0bac255345e5abd6

BUG=skia:3418

Review URL: https://codereview.chromium.org/1400633002
2015-10-08 14:09:41 -07:00
egdaniel
ccb88bcab0 Blacklisting imagefilterscropexpand on s4 since it often causes the bot to hang and crash.
BUG=skia:4079

Review URL: https://codereview.chromium.org/1373763005
2015-10-06 11:20:09 -07:00
joshualitt
e1f8296999 Fix for visualbench loops forever
TBR=robertphillips@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1387823004
2015-10-06 08:25:15 -07:00
joshualitt
5a74afebb7 nvpr removal from VisualBench base context
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1391633002
2015-10-06 08:05:10 -07:00
joshualitt
cb54e8ed45 Cleanup timing state machine
BUG=skia:

Review URL: https://codereview.chromium.org/1386933002
2015-10-05 13:58:26 -07:00
joshualitt
dc5db59514 move visual bench interactive module to timing state machine
BUG=skia:

Review URL: https://codereview.chromium.org/1382883003
2015-10-05 13:24:55 -07:00
mtklein
1f7039c6c5 Pass --images '' to nanobench to disable image benchmarking.
Enabling image benchmarking has caused most nanobench runs to fail,
both Debug and Release.

BUG=skia:3418
NOTREECHECKS=true
TBR=scroggo@google.com

Review URL: https://codereview.chromium.org/1381703003
2015-10-05 10:24:59 -07:00
joshualitt
98d2e2f095 Factor out VisualBench timing code into a helper class
BUG=skia:

Review URL: https://codereview.chromium.org/1375363003
2015-10-05 07:23:30 -07:00
halcanary
65f7c9fa7e SkPDF: remove suppression
Review URL: https://codereview.chromium.org/1379183005
2015-10-02 12:15:55 -07:00
joshualitt
399dd05962 Revert of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1375733003/ )
Reason for revert:
Reverting, optimistically fixed

Original issue's description:
> Reland of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1382933002/ )
>
> Reason for revert:
> Not fixed. :-(
>
> Original issue's description:
> > Revert of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1365683003/ )
> >
> > Reason for revert:
> > should hopefully be fixed, please reland if not.
> >
> > Original issue's description:
> > > Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373
> > >
> > > BUG=skia:4373
> > >
> > > Committed: https://skia.googlesource.com/skia/+/3420d2796bad5ce553efb9909790ea72e578dc47
> >
> > TBR=borenet@google.com,benjaminwagner@google.com
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:4373
> >
> > Committed: https://skia.googlesource.com/skia/+/52f8deba607fd67558b57551cd43406c8b743072
>
> TBR=borenet@google.com,joshualitt@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:4373
>
> Committed: https://skia.googlesource.com/skia/+/9442ab8a40dd0effde253e3b2d166bcf47222e92

TBR=borenet@google.com,benjaminwagner@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4373

Review URL: https://codereview.chromium.org/1385633002
2015-10-02 06:56:25 -07:00
benjaminwagner
9442ab8a40 Reland of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1382933002/ )
Reason for revert:
Not fixed. :-(

Original issue's description:
> Revert of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1365683003/ )
>
> Reason for revert:
> should hopefully be fixed, please reland if not.
>
> Original issue's description:
> > Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373
> >
> > BUG=skia:4373
> >
> > Committed: https://skia.googlesource.com/skia/+/3420d2796bad5ce553efb9909790ea72e578dc47
>
> TBR=borenet@google.com,benjaminwagner@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:4373
>
> Committed: https://skia.googlesource.com/skia/+/52f8deba607fd67558b57551cd43406c8b743072

TBR=borenet@google.com,joshualitt@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4373

Review URL: https://codereview.chromium.org/1375733003
2015-10-01 16:25:51 -07:00
bungeman
77a53de20d Base SkAutoTUnref on skstd::unique_ptr.
To further consolidate the various unique owning classes, this bases
SkAutoTUnref on skstd::unique_ptr. Users are updated because of two
breaking changes, swap now takes a reference and reset no longer
returns its argument.

Review URL: https://codereview.chromium.org/1370803002
2015-10-01 12:28:49 -07:00
joshualitt
52f8deba60 Revert of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1365683003/ )
Reason for revert:
should hopefully be fixed, please reland if not.

Original issue's description:
> Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373
>
> BUG=skia:4373
>
> Committed: https://skia.googlesource.com/skia/+/3420d2796bad5ce553efb9909790ea72e578dc47

TBR=borenet@google.com,benjaminwagner@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4373

Review URL: https://codereview.chromium.org/1382933002
2015-10-01 12:09:17 -07:00
mtklein
c6f5cac9bb Basic CPU support for VisualBench.
BUG=skia:

Review URL: https://codereview.chromium.org/1378393002
2015-10-01 11:56:56 -07:00
mtklein
a1ebeb25e9 Remove const from const int loops.
This drives me nuts, and prevents `while (loops --> 0)`.

BUG=skia:

Review URL: https://codereview.chromium.org/1379923005
2015-10-01 09:43:39 -07:00
joshualitt
8a6697af95 Fix for nexus 5 crashing in GL benches
GLBenches do not expect gl state  to change between onPerCanvasPreDraw and *PostDraw, but we do a clear and sometimes we clear as draw.  This causes us to bind vertex objects / programs / etc.

This change creates two new virtual methods which are called right before and immediately after timing.

BUG=skia:

Review URL: https://codereview.chromium.org/1379853003
2015-09-30 12:11:07 -07:00
scroggo
46c5747256 Merge SkCodec with SkScanlineDecoder
Benefits:
- This mimics other decoding APIs (including the ones SkCodec relies
on, e.g. a png_struct, which can be used to decode an entire image or
one line at a time).

- It allows a client to ask us to do what we can do efficiently - i.e.
start from encoded data and either decode the whole thing or scanlines.

- It removes the duplicate methods which appeared in both SkCodec and
SkScanlineDecoder (some of which, e.g. in SkJpegScanlineDecoder, just
call fCodec->sameMethod()).

- It simplifies moving more checks into the base class (e.g. the
examples in skbug.com/4284).

BUG=skia:4175
BUG=skia:4284

=====================================================================

SkScanlineDecoder.h/.cpp:
Removed.

SkCodec.h/.cpp:
Add methods, enums, and variables which were previously in
SkScanlineDecoder.
Default fCurrScanline to -1, as a sentinel that start has not been
called.

General changes:
Convert SkScanlineDecoders to SkCodecs.

General changes in SkCodec subclasses:
Merge SkScanlineDecoder implementation into SkCodec. Most (all?) owned
an SkCodec, so they now call this-> instead of fCodec->.

SkBmpCodec.h/.cpp:
Replace the unused rowOrder method with an override for
onGetScanlineOrder.
Make getDstRow const, since it is called by onGetY, which is const.

SkCodec_libpng.h/.cpp:
Make SkPngCodec an abstract class, with two subclasses which handle
scanline decoding separately (they share code for decoding the entire
image). Reimplement onReallyHasAlpha so that it can return the most
recent result (e.g. after a scanline decode which only decoded part
of the image) or a better answer (e.g. if the whole image is known to
be opaque).
Compute fNumberPasses early, so we know which subclass to instantiate.
Make SkPngInterlaceScanlineDecoder use the base class' fCurrScanline
rather than a separate variable.

CodexTest.cpp:
Add tests for the state changes in SkCodec (need to call start before
decoding scanlines; calling getPixels means that start will need to
be called again before decoding more scanlines).
Add a test which decodes in stripes, currently only used for an
interlaced PNG.

TODO: Add tests for onReallyHasAlpha.

Review URL: https://codereview.chromium.org/1365313002
2015-09-30 08:57:14 -07:00
halcanary
c11c62f4a2 DM: PDFSink sets rasterizer keyword
Review URL: https://codereview.chromium.org/1376573002
2015-09-28 11:51:54 -07:00
reed
c9e190ddac Revert of change pixel-serializer to support reencoding existing data (patchset #5 id:80001 of https://codereview.chromium.org/1373683003/ )
Reason for revert:
Need to somehow get access to encoders in chrome -- link error on the roll since SkImageEncoder is not built as part of chrome.

Original issue's description:
> change pixel-serializer to support reencoding existing data
>
> Trying to evolve this interface so it can
> - support rich set of backend-encoders (including ones like ETC1 that can cheaply convert to KXT
> - allow for encoding images as well as bitmaps (e.g. for picture serialization)
> - perhaps replace SkImageEncoder as an API (assuming we create a factory that returns a serializer given a format)
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/13f48dc85aa68a60da66aaf39c93d527d11d1278

TBR=scroggo@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1371983003
2015-09-28 09:58:41 -07:00
reed
13f48dc85a change pixel-serializer to support reencoding existing data
Trying to evolve this interface so it can
- support rich set of backend-encoders (including ones like ETC1 that can cheaply convert to KXT
- allow for encoding images as well as bitmaps (e.g. for picture serialization)
- perhaps replace SkImageEncoder as an API (assuming we create a factory that returns a serializer given a format)

BUG=skia:

Review URL: https://codereview.chromium.org/1373683003
2015-09-28 08:58:53 -07:00
reed
d114645d93 SkInstallDiscardablePixelRef is deprecated, enforce that
No functionality change, just a renaming.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1372593002
2015-09-25 06:56:57 -07:00
joshualitt
8db65a6d0c stop scaling loops and improve warmup bench
BUG=skia:

Review URL: https://codereview.chromium.org/1363663004
2015-09-24 12:42:02 -07:00
joshualitt
7d4b458b9f Add warmup bench to visual bench
BUG=skia:

Review URL: https://codereview.chromium.org/1358373003
2015-09-24 08:08:23 -07:00
benjaminwagner
6fccec34d2 Blacklist ReadPixels on GalaxyS4 due to skia:4368.
BUG=skia:4368

Review URL: https://codereview.chromium.org/1366723002
2015-09-24 06:39:06 -07:00
benjaminwagner
3420d2796b Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373
BUG=skia:4373

Review URL: https://codereview.chromium.org/1365683003
2015-09-23 12:20:47 -07:00
benjaminwagner
a1a8a601ae Blacklist GLInstancedArraysBench for GalaxyS4 due to skia:4371
BUG=skia:4371

Review URL: https://codereview.chromium.org/1363963002
2015-09-23 11:41:04 -07:00
msarett
7f69144aaa Add nanobench tests for BitmapRegionDecoder
SkBitmapRegionDecoderInterface provides an interface
for multiple implementations of Android's
BitmapRegionDecoder.

We already have correctness tests in DM that will enable us
to compare the quality of our various BRD implementations.

We also need these performance tests to compare the speed
of our various implementations.

BUG=skia:4357

Review URL: https://codereview.chromium.org/1344993003
2015-09-22 11:56:16 -07:00
benjaminwagner
31459a4ace This file was supposed to be in https://codereview.chromium.org/1347143006/
BUG=skia:4367

Review URL: https://codereview.chromium.org/1351073003
2015-09-22 11:38:51 -07:00
benjaminwagner
59ea019fa0 Blacklist bleed_image on GalaxyS4.
BUG=skia:4367

Review URL: https://codereview.chromium.org/1347143006
2015-09-22 09:49:47 -07:00
borenet
08d7747ffe Buildbot specs for Linux ANGLE bot
BUG=skia:4362

Review URL: https://codereview.chromium.org/1361453002
2015-09-21 08:20:24 -07:00
robertphillips
5ce341fcd7 Add slice tool
Don't know if we want to add this but I found it useful when tracking down blur circle bugs.

Review URL: https://codereview.chromium.org/1350323002
2015-09-18 09:04:43 -07:00
joshualitt
fb33ae15ce Not correctly initializing VisualBench commandline arguments
TBR=mtklein@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1340163004
2015-09-18 06:47:39 -07:00
borenet
9063e427d2 Buildbot spec and gyp defs for SK_USE_DISCARDABLE_SCALEDIMAGECACHE bot
BUG=skia:4354

Review URL: https://codereview.chromium.org/1350283003
2015-09-18 06:37:14 -07:00
mtklein
d0fff5b6d8 Test-...-Release-SK_FOO --> -DSK_FOO
When a bot ends with extra_config SK_LIKE_THIS,
we'll define SK_LIKE_THIS when compiling.

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SK_USE_DISCARDABLE_SCALEDIMAGECACHE-Trybot,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

BUG=skia:4354

Review URL: https://codereview.chromium.org/1346833004
2015-09-18 06:15:55 -07:00
ericrk
0a5fa484fd Add onMemoryDump to GrContext
Adds an entry point to GrContext to allow enumeration and tracing of GPU resources
via the newly added SkTraceMemoryDump.

Plan is for Chrome to call this on each of its GrContexts.

Dumps both the total size of GPU resources, as well as the total purgeable size.

BUG=526261

Review URL: https://codereview.chromium.org/1313743002
2015-09-15 14:16:10 -07:00
mtklein
ca6f43b6fd vb: also thread --key through to .json
BUG=skia:

Review URL: https://codereview.chromium.org/1342203002
2015-09-15 13:29:20 -07:00
jvanverth
f5d1b2de03 Add viewer mode to VisualBench.
Displays each benchmark/skp with a graph showing a series of frame times.
Use the space bar to skip to the next benchmark.

Adds an option to hit ESC to quit VisualBench. Useful in fullscreen mode.

Review URL: https://codereview.chromium.org/1336043003
2015-09-15 07:40:56 -07:00
reed
4d5b67637b formalize generate->bitmap
just move block of code to expose it

BUG=skia:4328
TBR=

Review URL: https://codereview.chromium.org/1334033004
2015-09-13 11:03:32 -07:00
mtklein
fe81e2d274 Make SkGraphics::Term a no-op, stop calling it.
I'd remove it entirely but Android is calling it explicitly.

BUG=skia:4259

Committed: https://skia.googlesource.com/skia/+/925979f733fe8e70d84627147dee04d030423349

Review URL: https://codereview.chromium.org/1329853005
2015-09-09 07:35:42 -07:00
mtklein
d9b8d7ac1f Revert of Make SkGraphics::Term a no-op, stop calling it. (patchset #2 id:20001 of https://codereview.chromium.org/1329853005/ )
Reason for revert:
SK_ATTR_DEPRECATED is meaningful to Android.  Don't use it.

Original issue's description:
> Make SkGraphics::Term a no-op, stop calling it.
>
> I'd remove it entirely but Android is calling it explicitly.
>
> BUG=skia:4259
>
> Committed: https://skia.googlesource.com/skia/+/925979f733fe8e70d84627147dee04d030423349

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

Review URL: https://codereview.chromium.org/1314483006
2015-09-09 07:22:09 -07:00
msarett
a5783aeff0 Provides various implementations of Android's SkBitmapRegionDecoder.
Implements testing in DM for these implementations.

nanobench testing will follow after this.

TBR=scroggo
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/76f755e6d54a32f9887ad254ce59a3a62f28bde4

Review URL: https://codereview.chromium.org/1288963002
2015-09-08 15:35:32 -07:00
mtklein
925979f733 Make SkGraphics::Term a no-op, stop calling it.
I'd remove it entirely but Android is calling it explicitly.

BUG=skia:4259

Review URL: https://codereview.chromium.org/1329853005
2015-09-08 15:18:21 -07:00
joshualitt
189aef7834 Create module system for VisualBench
The newly created VisualLightweightBenchModule is just the old VisualBench.cpp, but gutted to only include timing code.

Future CLs will harden this abstraction, but for this CL the module owns a backpointer to VisualBench.cpp for a couple of calls.

BUG=skia:

Review URL: https://codereview.chromium.org/1304083007
2015-09-08 07:08:11 -07:00
joshualitt
55143211e9 Minor tweak to visual bench timing
BUG=skia:

Review URL: https://codereview.chromium.org/1310153005
2015-09-04 07:48:42 -07:00
robertphillips
943a462fef Minor code cleanup (left over from prior CL)
This was requested in https://codereview.chromium.org/1309543012/ (Add new GM to directly exercise perspective bitmap drawing)

Review URL: https://codereview.chromium.org/1320673011
2015-09-03 13:32:33 -07:00
borenet
d34d94766d Appurify bot: don't use flags that visualbench doesn't support
Depends on https://codereview.chromium.org/1320423005/
BUG=skia:4277

Review URL: https://codereview.chromium.org/1310903006
2015-09-03 12:31:26 -07:00
bsalomon
afcd7cd324 Rename flag from "distance field" to "device independent."
Review URL: https://codereview.chromium.org/1322433006
2015-08-31 12:39:41 -07:00