Commit Graph

1938 Commits

Author SHA1 Message Date
Brian Salomon
b5ef1f9b13 Make GrTextureOp capable of edge antialiasing.
Bug: skia:
Change-Id: I0088bdbb6a76811611fa4628656bf9513c5bf04a
Reviewed-on: https://skia-review.googlesource.com/91105
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-01-11 19:37:51 +00:00
Hal Canary
c5980d0aa3 SkDocument: remove unused fDoneProc
Change-Id: I9a0739992e90a0a6d44a75b0b570097553343f1d
Reviewed-on: https://skia-review.googlesource.com/92141
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-01-08 20:53:41 +00:00
Mike Reed
bd3a0cce99 Revert "Revert "remove unused SkCurveMeasure""
This reverts commit 4d1d8bcf6d.

Reason for revert: will try a manual roll to update static_initializers.gni

Original change's description:
> Revert "remove unused SkCurveMeasure"
> 
> This reverts commit 065c2e827e.
> 
> Reason for revert: change static initializer count?
> 
> Original change's description:
> > remove unused SkCurveMeasure
> > 
> > Bug: skia:
> > Change-Id: I36eb00883bc17e8eef4d1d226972f0125f0e2630
> > Reviewed-on: https://skia-review.googlesource.com/91702
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> 
> TBR=reed@google.com
> 
> Change-Id: I0d8ad2aa8b38a389048ba8bf5cafafea5788c3e1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/91343
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: I7e6dfc5841b089dff047cd1d78dcebb722cdf8a4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/91361
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-06 18:24:57 +00:00
Mike Reed
4d1d8bcf6d Revert "remove unused SkCurveMeasure"
This reverts commit 065c2e827e.

Reason for revert: change static initializer count?

Original change's description:
> remove unused SkCurveMeasure
> 
> Bug: skia:
> Change-Id: I36eb00883bc17e8eef4d1d226972f0125f0e2630
> Reviewed-on: https://skia-review.googlesource.com/91702
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: I0d8ad2aa8b38a389048ba8bf5cafafea5788c3e1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/91343
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-06 13:19:26 +00:00
Mike Reed
065c2e827e remove unused SkCurveMeasure
Bug: skia:
Change-Id: I36eb00883bc17e8eef4d1d226972f0125f0e2630
Reviewed-on: https://skia-review.googlesource.com/91702
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-01-05 22:32:14 +00:00
Kevin Lubick
4284613cfe Enable conditional-uninitialized flag
Bug: skia:7462
Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD
Change-Id: I1c0a09984bf28a5c620a89af56040f018bae6310
Reviewed-on: https://skia-review.googlesource.com/90941
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-01-05 18:03:25 +00:00
Hal Canary
3c36ef6be9 SkFloatToDecimal moved to src/utils
This change stages SkFloatToDecimal() for possible re-use by pdfium.

Change-Id: Iedc0c78c8a633f0b0973365d2d8b540b5443590d
Reviewed-on: https://skia-review.googlesource.com/90400
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2018-01-03 19:59:31 +00:00
Mike Reed
7557bbbe19 Revert "remove approxbytes api from SkPicture"
This reverts commit bfc11853a8.

Bug: skia:
Change-Id: Ied4baad0496a06a52bec6965f9c97e13ebe2ab0a
Reviewed-on: https://skia-review.googlesource.com/89442
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-25 02:51:32 +00:00
Mike Reed
0a9d728851 Revert "re-add dummy printf to fix bots"
This reverts commit 1395994aa0.

Reason for revert: broke flutter

Original change's description:
> re-add dummy printf to fix bots
> 
> Bug: skia:
> Change-Id: I3184736f37481c5ac20eae1a15c17aed4f3c3e52
> Reviewed-on: https://skia-review.googlesource.com/89441
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=borenet@google.com,rmistry@google.com,jcgregorio@google.com,reed@google.com

Change-Id: I36b9efffe8a0c9df1970a31ffee5cb59171d967f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/89381
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-25 00:31:01 +00:00
Florin Malita
cda4e94b0d Add a bench for comparing complex clip strategies
Clip consisting of a union of |n| circles.

Comparing mask (2x saveLayer + srcIn) vs. clipPath approaches.

MBP numbers:

! -> high variance, ? -> moderate variance
    micros   	bench
    233.05 !	clip_strategy_mask_100	gl
    207.61 !	clip_strategy_mask_10	gl
    210.41 ?	clip_strategy_mask_5	gl
    219.10 ?	clip_strategy_mask_1	gl
    115.56 ?	clip_strategy_path_100	gl
    113.29 !	clip_strategy_path_10	gl
    102.36 ?	clip_strategy_path_5	gl
      6.37 ?	clip_strategy_path_1	gl

    361.06 !	clip_strategy_mask_100	8888
    328.97 !	clip_strategy_mask_10	8888
    316.72 !	clip_strategy_mask_5	8888
    325.84 !	clip_strategy_mask_1	8888
    368.54 !	clip_strategy_path_100	8888
    306.99 !	clip_strategy_path_10	8888
    298.71 !	clip_strategy_path_5	8888
    191.00 !	clip_strategy_path_1	8888

TBR=

Change-Id: I945c12e2e35b9847af06342473e56272e2041e21
Reviewed-on: https://skia-review.googlesource.com/72521
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-12-24 17:12:42 +00:00
Mike Reed
1395994aa0 re-add dummy printf to fix bots
Bug: skia:
Change-Id: I3184736f37481c5ac20eae1a15c17aed4f3c3e52
Reviewed-on: https://skia-review.googlesource.com/89441
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-24 14:21:31 +00:00
Mike Reed
bfc11853a8 remove approxbytes api from SkPicture
Bug: skia:
Change-Id: I292bc9ab52fe8df3ce97a2ad4b06085b0332b19d
Reviewed-on: https://skia-review.googlesource.com/89440
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-24 13:40:41 +00:00
Mike Reed
47fdf6c85e add serialprocs to MultiDocument, hide redundant methods
Bug: skia:
Change-Id: I6521e93af79439bd8c1d2f5130a68492044a2ee9
Reviewed-on: https://skia-review.googlesource.com/87788
Reviewed-by: Wei Li <weili@chromium.org>
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-21 12:36:30 +00:00
Chris Dalton
040238bded Add a tools flag to suppress geometry shaders
Bug: skia:
Change-Id: I38736c5d49e3b281c2d23af3908575274ff97b5c
Reviewed-on: https://skia-review.googlesource.com/86282
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-12-19 17:26:56 +00:00
Mike Klein
f1f1162273 remove append_from_srgb()
It's now no different than append(from_srgb).

Bug: skia:7419

Change-Id: I97c59b6987f033ec2f1859db40ca3056b87b370a
Reviewed-on: https://skia-review.googlesource.com/86741
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-12-18 19:48:43 +00:00
Brian Osman
7035a8e797 Fix benches that aren't really timing what we want
Remove full clears from benches
Fix unbounded canvas modification in GM benches

Bug: skia:
Change-Id: Ie3d67282714a7b4e980aec399056c0e9df330993
Reviewed-on: https://skia-review.googlesource.com/86040
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-12-18 15:56:02 +00:00
Mike Reed
2e3f2e9b48 Revert "Revert "remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead code""
This reverts commit 800f5541bb.

Reason for revert: google3 updated

Original change's description:
> Revert "remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead code"
> 
> This reverts commit 7f846f273c.
> 
> Reason for revert: missed callsite in google3
> 
> Original change's description:
> > remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead code
> > 
> > Bug: skia:
> > Change-Id: Ia88f3e2fdf6d5c6e5128eaefda0d68c7042ae7a2
> > Reviewed-on: https://skia-review.googlesource.com/85500
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Hal Canary <halcanary@google.com>
> 
> TBR=halcanary@google.com,reed@google.com
> 
> Change-Id: I232dc24831bd8d52e9cbbc7ee58177af0617574a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/85600
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=halcanary@google.com,reed@google.com

Change-Id: I6ccd032caf87020cba8d515ffb25d07b87267363
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/86101
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-15 20:43:10 +00:00
Mike Reed
800f5541bb Revert "remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead code"
This reverts commit 7f846f273c.

Reason for revert: missed callsite in google3

Original change's description:
> remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead code
> 
> Bug: skia:
> Change-Id: Ia88f3e2fdf6d5c6e5128eaefda0d68c7042ae7a2
> Reviewed-on: https://skia-review.googlesource.com/85500
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Hal Canary <halcanary@google.com>

TBR=halcanary@google.com,reed@google.com

Change-Id: I232dc24831bd8d52e9cbbc7ee58177af0617574a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/85600
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-15 05:24:09 +00:00
Mike Reed
7f846f273c remove SK_SUPPORT_LEGACY_PDF_PIXELSERIALIZER dead code
Bug: skia:
Change-Id: Ia88f3e2fdf6d5c6e5128eaefda0d68c7042ae7a2
Reviewed-on: https://skia-review.googlesource.com/85500
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2017-12-15 04:28:07 +00:00
Mike Reed
a4daf19319 Moving extra options/parameters into PDFMetadata
Bug: skia:
Change-Id: I29aa69e5765a7f8ba05b0361912d1f5276d77de3
Reviewed-on: https://skia-review.googlesource.com/84501
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-14 21:20:27 +00:00
Brian Osman
36703d9d36 Push much of the SkColorSpace_Base interface up to SkColorSpace
Some pieces still remain, but the next step looks less mechanical,
so I wanted to land this piece independently.

Bug: skia:
Change-Id: Ie63afcfa08af2f6e4996911fa2225c43441dbfb2
Reviewed-on: https://skia-review.googlesource.com/84120
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-12-12 19:34:29 +00:00
Stan Iliev
ca8c0953e8 Implement a fast path for solid color lattice rectangle
Add a flag that hints, which lattice rectangles are solid colors.
Draw solid rectangles and 1x1 rectangles with drawRect.

Test: Measured performance of a ninepatch drawn by HWUI
Bug: b/69796044
Change-Id: Ib3b00ca608da42fa9f2d2038cc126a978421ec7c
Reviewed-on: https://skia-review.googlesource.com/79821
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2017-12-11 18:26:18 +00:00
Mike Reed
0933bc9b67 Revert "Revert "resources: remove most uses of GetResourcePath()""
This reverts commit cca2300559.

Reason for revert: think I guessed wrong about g32 -- unreverting

Original change's description:
> Revert "resources: remove most uses of GetResourcePath()"
> 
> This reverts commit 5093a539de.
> 
> Reason for revert: google3 seems broken
> 
> Original change's description:
> > resources: remove most uses of GetResourcePath()
> > 
> > Going forward, we will standardize on GetResourceAsData(), which will
> > make it easier to run tests in environments without access to the
> > filesystem.
> > 
> > Also: GetResourceAsData() complains when a resource is missing.
> > This is usually an error.
> > 
> > Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188
> > Reviewed-on: https://skia-review.googlesource.com/82642
> > Reviewed-by: Hal Canary <halcanary@google.com>
> > Commit-Queue: Hal Canary <halcanary@google.com>
> 
> TBR=halcanary@google.com,scroggo@google.com
> 
> Change-Id: Ic5a7c0167c995a672e6b06dc92abe00564432214
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/83001
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=halcanary@google.com,scroggo@google.com,reed@google.com

Change-Id: I5a46e4de61186a8a5eb9cacd3275e24e311d5a07
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/82942
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-09 01:27:50 +00:00
Mike Reed
cca2300559 Revert "resources: remove most uses of GetResourcePath()"
This reverts commit 5093a539de.

Reason for revert: google3 seems broken

Original change's description:
> resources: remove most uses of GetResourcePath()
> 
> Going forward, we will standardize on GetResourceAsData(), which will
> make it easier to run tests in environments without access to the
> filesystem.
> 
> Also: GetResourceAsData() complains when a resource is missing.
> This is usually an error.
> 
> Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188
> Reviewed-on: https://skia-review.googlesource.com/82642
> Reviewed-by: Hal Canary <halcanary@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

TBR=halcanary@google.com,scroggo@google.com

Change-Id: Ic5a7c0167c995a672e6b06dc92abe00564432214
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/83001
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-12-08 21:09:19 +00:00
Hal Canary
53e5e7d4ce resources: resource identifiers don't begin with leading slash
Change-Id: I52522ffffbf0f5176ac9156cd563b41d6fdde59f
Reviewed-on: https://skia-review.googlesource.com/82940
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-12-08 20:03:18 +00:00
Hal Canary
5093a539de resources: remove most uses of GetResourcePath()
Going forward, we will standardize on GetResourceAsData(), which will
make it easier to run tests in environments without access to the
filesystem.

Also: GetResourceAsData() complains when a resource is missing.
This is usually an error.

Change-Id: Iaf70b71b0ca5ed8cd1a5538a60ef185ae8736188
Reviewed-on: https://skia-review.googlesource.com/82642
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-12-08 19:30:48 +00:00
Hal Canary
c465d13e6f resources: orgainize directory.
Should make it easier to ask just for images.

Change-Id: If821743dc924c4bfbc6b2b2d29b14affde7b3afd
Reviewed-on: https://skia-review.googlesource.com/82684
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-12-08 17:16:00 +00:00
Brian Salomon
20b1572912 Delete GLBench and subclasses
Bug: skia:6305
Change-Id: I3b2f2a8898f25d3dd0ec47668895dd4d00668575
Reviewed-on: https://skia-review.googlesource.com/82040
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-07 18:09:29 +00:00
Mike Klein
bbfe515474 remove ThermalManager
It throttles 1000x more than intended, and I suspect that some of the
trip points it uses to decide when to throttle make no sense.  We've
already turned it off on the Nexus 5x.

Change-Id: Idf556a83fe61ccc5f63c7bede3eecbe80087e28b
Reviewed-on: https://skia-review.googlesource.com/81303
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-12-06 21:25:29 +00:00
Yuqian Li
24e963d429 Test performance of 565 bitmap scaling
This would catch b/70172912

On Linux desktops, see the difference between 8888 and 565 using:

nanobench --config 8888 -m ^bitmap_RGB_565_scale$ ^bitmap_BGRA_8888_scale$ ^bitmap_RGB_565_scale_bilerp$ ^bitmap_BGRA_8888_scale_bilerp$

On Android, use:

nanobench --config 8888 -m ^bitmap_RGB_565_scale$ ^bitmap_RGBA_8888_scale$ ^bitmap_RGB_565_scale_bilerp$ ^bitmap_RGBA_8888_scale_bilerp$

The results are similar if nanobench is run with --config 565. So
it seems that the destination color type isn't very critical.

Bug: skia:
Change-Id: I71defda4d9e089a9a973cdb0c161773bc16e4a24
Reviewed-on: https://skia-review.googlesource.com/81141
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-12-06 18:32:29 +00:00
Mike Reed
e45ff46a65 add benchType deserial to time deserializing pictures
Piece of the larger effort to merge readbuffer and validatingreadbuffer

Bug: skia:
Change-Id: I79305e27c4712c3b91d213d09d6c2ef24b86e671
Reviewed-on: https://skia-review.googlesource.com/81120
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-12-06 16:12:09 +00:00
Brian Osman
f5beefd34d Fix shader linker errors on several GL benchmarks
These were using an obsolete shader caps bit to manaully declare their
own FP output variable. That led to two outputs (after SkSL added
sk_FragColor), which led to errors about multiple outputs being declared
(without specifying location). SkSL handles all of this, so just use
sk_FragColor directly.

Bug: skia:
Change-Id: Id38657b6bf8c63c8f80d6ae3354a1507734a209f
Reviewed-on: https://skia-review.googlesource.com/73344
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-17 20:52:26 +00:00
Herb Derby
35c556f33e Revert "Revert "Direct evaluation of gaussian""
This reverts commit a53d999007.

Reason for revert: Bug in SkNx_sse fixed.

Original change's description:
> Revert "Direct evaluation of gaussian"
>
> This reverts commit 5e18cdea0a.
>
> Reason for revert: ASAN
> Original change's description:
> > Direct evaluation of gaussian
> >
> > The SVG(CSS) standard allows the 3 pass algorithm for sigma >= 2. But
> > sigma < 2, the code must evaluate to the convolution. The old code used
> > an interpolation scheme between windowed filters. This code directly
> > evaluates the gaussian kernel for sigma < 2.
> >
> > This code produces cleaner results, is 25% faster, and does not use a
> > temporary memory buffer.
> >
> > Change-Id: Ibd0caa73cadd06b637f55ba7bd4fefcfe7ac73db
> > Reviewed-on: https://skia-review.googlesource.com/62540
> > Commit-Queue: Herb Derby <herb@google.com>
> > Reviewed-by: Mike Klein <mtklein@google.com>
>
> TBR=mtklein@google.com,herb@google.com
>
> Change-Id: I936077dfa659d71bc361339d98340c55545a1eb8
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/72481
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=mtklein@google.com,herb@google.com,brianosman@google.com

Change-Id: I4c30e3481308a8148d40223519e286885ec6f880
Reviewed-on: https://skia-review.googlesource.com/72900
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2017-11-16 22:46:09 +00:00
Brian Osman
a53d999007 Revert "Direct evaluation of gaussian"
This reverts commit 5e18cdea0a.

Reason for revert: ASAN
Original change's description:
> Direct evaluation of gaussian
> 
> The SVG(CSS) standard allows the 3 pass algorithm for sigma >= 2. But
> sigma < 2, the code must evaluate to the convolution. The old code used
> an interpolation scheme between windowed filters. This code directly
> evaluates the gaussian kernel for sigma < 2.
> 
> This code produces cleaner results, is 25% faster, and does not use a
> temporary memory buffer.
> 
> Change-Id: Ibd0caa73cadd06b637f55ba7bd4fefcfe7ac73db
> Reviewed-on: https://skia-review.googlesource.com/62540
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,herb@google.com

Change-Id: I936077dfa659d71bc361339d98340c55545a1eb8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/72481
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-11-16 19:10:04 +00:00
Herbert Derby
5e18cdea0a Direct evaluation of gaussian
The SVG(CSS) standard allows the 3 pass algorithm for sigma >= 2. But
sigma < 2, the code must evaluate to the convolution. The old code used
an interpolation scheme between windowed filters. This code directly
evaluates the gaussian kernel for sigma < 2.

This code produces cleaner results, is 25% faster, and does not use a
temporary memory buffer.

Change-Id: Ibd0caa73cadd06b637f55ba7bd4fefcfe7ac73db
Reviewed-on: https://skia-review.googlesource.com/62540
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-11-16 18:06:22 +00:00
Chris Dalton
7c02cc7934 Add clipping options to path text bench and samples
Bug: skia:
Change-Id: I632a2fa5627ef1438d9ab451318a42d12c61b802
Reviewed-on: https://skia-review.googlesource.com/67683
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-11-07 01:51:31 +00:00
Mike Klein
03141d25cf remove SkThread, using std::thread instead
Change-Id: I871dd5eea4496e87c206b46d9eae81cb521b11ce
Reviewed-on: https://skia-review.googlesource.com/65103
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-10-30 16:45:29 +00:00
Mike Reed
7306bcd758 - add bench for pixmap orient
- reduce code size by using a draw instead of custom blits

Bug: skia:
Change-Id: I90f9fb2abf40496e771f1f725556c178d730b590
Reviewed-on: https://skia-review.googlesource.com/62860
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-25 16:56:08 +00:00
Jim Van Verth
33397f2793 Fix shader compilation error in GrInstancedArraysBench
Change-Id: Ifd87e752fe1712ab4adef6c5f5de8798ab6c4991
Reviewed-on: https://skia-review.googlesource.com/50680
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-10-23 17:46:29 +00:00
Chris Dalton
a2ac30da36 Enable CCPR for volatile paths
Enables for volatile paths and when path mask caching is disabled.

Bug: skia:
Change-Id: I644b17f2a4f77a4ddf85265f520599499c0800cf
Reviewed-on: https://skia-review.googlesource.com/60481
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-17 18:48:42 +00:00
Chris Dalton
7a0ebfc033 Add a tooling flag for path mask caching
Adds the flag and a disables caching on the CCPR bots.

Bug: skia:
Change-Id: Icb85e77f89634dda1d419dacac5b8a93340723f0
Reviewed-on: https://skia-review.googlesource.com/59740
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-13 22:31:12 +00:00
Brian Salomon
0b4d8aa108 Add benchmark for comparing multitexturing to non-multitexturing image draws.
Allows benchmarks to override GrContextOptions.

Removes the ability to use the same GrContext for all benchmarks in a config.

Change-Id: I5ab9f6e81055451ac912a66537843d1a49f3b479
Reviewed-on: https://skia-review.googlesource.com/34080
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-10-11 20:32:49 +00:00
Brian Osman
0177698015 Warmup for one extra frame in nanobench
On ANGLE, at least, this frame gives us much more consistent results.

Bug: skia:
Change-Id: Ifdecc8451ef51490c08057645214738180b1a366
Reviewed-on: https://skia-review.googlesource.com/57884
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-10-10 20:05:13 +00:00
Ben Wagner
63fd760a37 Remove trailing whitespace.
Also adds a presubmit to prevent adding trailing whitespace to source
code in the future.

Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6
Reviewed-on: https://skia-review.googlesource.com/57380
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-10-09 21:20:34 +00:00
Mike Reed
f0ffb8943b Revert[4] "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"
This reverts commit 5a2e50edc5.

Bug: skia:
Change-Id: I8d28b5c07d90130e5a1653923740eaf189ecb954
Reviewed-on: https://skia-review.googlesource.com/53900
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-03 20:03:35 +00:00
Leon Scroggins III
b30d11319b Do not try to time kFailedLoops
Move the check for kFailedLoops above code that times the benchmark.
This matches the comment ("Can't be timed") and prevents an infinite
loop.

Bug: skia:6774
Change-Id: Iacdc1ca1d11afcf05afac60e4eb0d8d9a12f800e
Reviewed-on: https://skia-review.googlesource.com/53803
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-10-02 20:37:00 +00:00
Mike Reed
5a2e50edc5 Revert "Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"""
This reverts commit cd284c5323.

Reason for revert:

assert fired in SkMallocPixelRef.cpp:61: fatal error: "assert(info.computeByteSize(rowBytes) == info.getSafeSize(rowBytes))"

google3 thinks it was from surface_rowbytes

Original change's description:
> Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap""
> 
> This reverts commit 809cbedd4b.
> 
> Bug: skia:
> Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d
> Reviewed-on: https://skia-review.googlesource.com/52665
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

TBR=fmalita@chromium.org,reed@google.com

Change-Id: I41e3f7a3f791cc8183291847e783ed8a53bc91d2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/53802
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-10-02 13:44:18 +00:00
Mike Reed
cd284c5323 Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap""
This reverts commit 809cbedd4b.

Bug: skia:
Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d
Reviewed-on: https://skia-review.googlesource.com/52665
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-10-02 12:55:37 +00:00
Jim Van Verth
809cbedd4b Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"
This reverts commit 88757dacd4.

Reason for revert: Still seems to be failing Chromium "telemetry_perf_unittests (with patch) on Android" on android_n5x_swarming_rel.

Original change's description:
> guard old apis for querying byte-size of a bitmap/imageinfo/pixmap
> 
> Now with legacy behavior for allocpixels
> 
> This was reverted, so the current CL is a "fix" on top of ...
> https://skia-review.googlesource.com/c/skia/+/50980
> 
> Related update to Chrome (in preparation for this change)
> https://chromium-review.googlesource.com/c/chromium/src/+/685719
> 
> Bug: skia:
> Change-Id: I4b370ee7e95083ab27421f008132219c9c7b86e9
> Reviewed-on: https://skia-review.googlesource.com/51341
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=fmalita@chromium.org,reed@google.com

Change-Id: I827a0ca1d1e3909e648fde3342cdb8601d34da8d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/52381
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-09-27 23:15:07 +00:00
Mike Reed
88757dacd4 guard old apis for querying byte-size of a bitmap/imageinfo/pixmap
Now with legacy behavior for allocpixels

This was reverted, so the current CL is a "fix" on top of ...
https://skia-review.googlesource.com/c/skia/+/50980

Related update to Chrome (in preparation for this change)
https://chromium-review.googlesource.com/c/chromium/src/+/685719

Bug: skia:
Change-Id: I4b370ee7e95083ab27421f008132219c9c7b86e9
Reviewed-on: https://skia-review.googlesource.com/51341
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-09-27 14:36:07 +00:00