Commit Graph

85 Commits

Author SHA1 Message Date
senorblanco
7bf1068473 Remove SkBicubicImageFilter, and all related tests.
Now that we have SkResizeImageFilter, and the bicubic
resizing is part of skia proper, there's no need for a
specialized image filter.

BUG=skia:
R=bsalomon@google.com

Author: senorblanco@chromium.org

Review URL: https://codereview.chromium.org/357793002
2014-06-25 14:39:06 -07:00
mtklein
f372321de3 Add nanobench, a fresh look at our microbenchmark harness.
out/Release/nanobench runs 4-5x faster on my Z620 and ~2x faster on my N5 than out/Release/bench with the same configs.

(Debug isn't really comparable.  I haven't added the Debug -> single loop check.)

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

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/347443002
2014-06-25 14:08:00 -07:00
mtklein
32492e8204 delete disabled bench
BUG=skia:
R=tomhudson@google.com, mtklein@google.com, junov@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/354693003
2014-06-24 14:16:50 -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
robertphillips
c2fce56522 Add bench for rectanizers
R=bsalomon@google.com, jvanverth@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/319523003
2014-06-05 07:18:03 -07:00
krajcevski
9a3cdbb3d0 Two new benches for ETC1 bitmaps.
First bench: Simply render from a compressed ETC1 bitmap. This is roughly
equal between compressed and uncompressed data.

Second bench: Notify the bitmap that the pixels have changed (that's right,
like a liar) to force a re-upload to the GPU. On this bench, decompressed
textures seem to inexplicably do an order of magnitude better than
compressed textures when it should be the other way around, but that
investigation is reserved for a future CL.

R=robertphillips@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/317023002
2014-06-05 07:03:39 -07:00
commit-bot@chromium.org
c4e416ce49 Add Memcpy32 bench.
This compares 32-bit copies using memcpy, autovectorization, and when SSE2 is
available, aligned and unaligned SSE2.

Running this on my desktop (Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz), I see
all four perform essentially the same, except Clang's autovectorization looks
 a little better than GCC's.  memcpy is calling libc 2.19's __memcpy_sse2_unaligned.


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

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14799 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-20 14:54:04 +00:00
senorblanco@chromium.org
0d64356efd Add a new bench that tests a simple image filter DAG.
This bench exercises a blur filter connected to 5 inputs of the same
merge filter.

R=junov@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14135 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-10 16:16:13 +00:00
commit-bot@chromium.org
4cd9e2169e Add SkCanvas::writePixels that takes info+pixels directly
add corresponding methods to device (w/ diff name to avoid colliding with exising virtuals)

BUG=skia:
R=bsalomon@google.com, robertphillips@google.com, junov@google.com, junov@chromium.org

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13697 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-07 03:25:16 +00:00
commit-bot@chromium.org
4fcc3ca411 Add GrSet class built on top of RedBlackTree
BUG=skia:
R=bsalomon@google.com

Author: egdaniel@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13616 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-27 20:23:22 +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
rmistry@google.com
d6bab02386 Reverting r12427
git-svn-id: http://skia.googlecode.com/svn/trunk@12428 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 13:50:38 +00:00
skia.committer@gmail.com
5b39f5ba9c Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@12427 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 13:36:22 +00:00
commit-bot@chromium.org
2e86551cf9 Fold bench source file list into bench.gyp.
It is one less file and doesn't make things much worse.

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

Author: tfarina@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12412 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-27 00:44:03 +00:00
commit-bot@chromium.org
644629c1c7 Implement a benchmark for GrResourceCache
Adds "grresourcecache_add" and "grresourcecache_find" bench tests to test
GrResourceCache::add and GrResourceCache::find. The tests work only
with GPU backends, since GrResourceCache needs an GrGpu.

Modifies bench tests to override SkBenchmark::isSuitableFor(Backend)
function that specifies what kind of backend the test is inteded
for. This replaces the previous "fIsRendering" flag that would
indicate test that did no rendering.

Adds SkCanvas::getGrContext() call to get the GrContext that the
canvas ends up drawing to. The member function solves a common
use-case that is also used in the benchmark added here.

R=mtklein@google.com, bsalomon@google.com

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12334 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-21 06:21:58 +00:00
reed@google.com
126f7f5244 Revert "Revert "speed up A8 by creating a new entry-point in SkDraw that blits the path's coverage directly into an A8 target, regardless of the previous pixel values.""
This reverts commit 3c77887b3eb2d32ab668ab4e5f2f9e79103956e8.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12167 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-07 16:06:53 +00:00
scroggo@google.com
7b05659072 Add gms and benchmarks for drawing blurry round rects.
Further changes (https://codereview.chromium.org/48623006) will change
the speed at which the bench draws and the drawing of the gm (the gm
change is small).

One of these round rects causes slow drawing in a webpage that we have
observed.

BUG=https://b.corp.google.com/issue?id=11174385

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12133 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-05 15:57:21 +00:00
reed@google.com
84e922bfb3 Revert "speed up A8 by creating a new entry-point in SkDraw that blits the path's coverage directly into an A8 target, regardless of the previous pixel values."
This reverts commit d615e839b71f75df895de6850b774a9e1c28ad2a.

Revert "must initialize SkDraw.fClip"

This reverts commit 108e46d29b5f57927fc8b8c403bb52019d8cb16d.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12122 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-04 20:57:36 +00:00
reed@google.com
ac9d306a92 speed up A8 by creating a new entry-point in SkDraw that blits the path's coverage directly into an A8 target, regardless of the previous pixel values.
R=bsalomon@google.com, mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12118 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-04 20:10:33 +00:00
scroggo@google.com
111fd11e11 Bench baseline for mostly 0 image.
Add a baseline for decoding a mostly 0 image. This is in advance of
https://codereview.chromium.org/24269006/ which provides an option to
skip writing those 0s (as part of BUG=skia:1661). On my Nexus 4, the
benchmark does not slow down after that change.

As suggested in https://codereview.chromium.org/24269006/ add a
resourcePath flag to bench. Will require a change in buildbot in order
to actually use the flag.

Add an image used by the test.

Until https://codereview.chromium.org/24448002 is submitted,
the test will not actually be run by the bots (since it
won't know where to find the file).

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11461 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-25 21:42:12 +00:00
mtklein@google.com
c289743864 Major bench refactoring.
- Use FLAGS_.
   - Remove outer repeat loop.
   - Tune inner loop automatically.

BUG=skia:1590
R=epoger@google.com, scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11187 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-10 19:23:38 +00:00
commit-bot@chromium.org
8f4269725b This bench attempts to recreate Chromium's Canvas_putImageData performance test to track down https://code.google.com/p/chromium/issues/detail?id=270649.
Cranking the repitition count up to 500 on a MacPro yields:

WITHOUT 10624:
running bench [640 480]            writepix_rgba_UPM  8888: cmsecs = 748.25   GPU: cmsecs = 225.95 gmsecs = 244.80
running bench [640 480]             writepix_rgba_PM  8888: cmsecs =  54.12   GPU: cmsecs = 225.77 gmsecs = 244.59

WITH 10624:
running bench [640 480]            writepix_rgba_UPM  8888: cmsecs = 747.70   GPU: cmsecs = 230.30 gmsecs = 249.51
running bench [640 480]             writepix_rgba_PM  8888: cmsecs =  55.05   GPU: cmsecs = 230.13 gmsecs = 249.38

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://chromiumcodereview.appspot.com/22895012

git-svn-id: http://skia.googlecode.com/svn/trunk@10761 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-16 00:40:34 +00:00
bsalomon@google.com
aade2e1e19 Add fullscreen rect bench
R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10510 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-02 14:39:25 +00:00
senorblanco@chromium.org
350b4d50ea Remove SkBlendImageFilter, and all tests. Its functionality has been subsumed by SkXfermodeImageFilter.
R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10482 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-01 14:59:05 +00:00
reed@google.com
602a1d7025 add scaledimagecache
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10286 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-23 19:13:54 +00:00
egdaniel@google.com
a308883003 Add bench for hairline paths.
R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10128 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-17 19:30:41 +00:00
humper@google.com
523521c6bc reenable the scale benchmark, and only bench actual canvas draw commands
instead of direct invocations of the (now private) bitmap scale method

BUG=
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10027 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-11 20:28:30 +00:00
humper@google.com
b088947f27 New bitmap filter checkin; this time with less build breakage
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9944 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-09 21:37:14 +00:00
humper@google.com
1a8940e558 Revert "More general image filter interface; tested implementation of standalone"
This reverts commit 4df3e8b079e019af5f60c13e7e6ec6589663962a.

git-svn-id: http://skia.googlecode.com/svn/trunk@9937 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-09 18:02:06 +00:00
humper@google.com
25fc6b9bfb More general image filter interface; tested implementation of standalone
image scaler (not yet plumbed).  High quality downsampler.  Fast SSE
resampler.

BUG=
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9936 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-09 17:48:15 +00:00
reed@google.com
bcb42aecf1 add charsToGlyphs to SkTypeface
Will disable new unittest until all backends are implemented.

On Mac, new API is 4x faster than old paint one, so next CL I will reimplement the paint calls in terms of the new typeface call.

R=eae@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9860 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-02 13:56:39 +00:00
commit-bot@chromium.org
064779aa18 Adding my Bitmap2Path sample for 1on1 meeting.
BUG=
R=reed@google.com, borenet@google.com

Author: dierk@google.com

Review URL: https://chromiumcodereview.appspot.com/16829003

git-svn-id: http://skia.googlecode.com/svn/trunk@9843 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-01 17:50:29 +00:00
scroggo@google.com
2bbc2c945b Add an option to create unpremultiplied bitmaps.
Currently they cannot be used directly by Skia, but
the pixels can be used elsewhere.

SkImageDecoder:
Add functions to require unpremultiplied output
and query the presence of the requirement

SkImageDecoder_libpng:
SkImageDecoder_libwebp:
SkImageDecoder_WIC:
Respect the requirement for unpremultiplied output.
TODO: Fix SkImageDecoder_CG.

SkScaledBitmapSampler:
Add procs to skip premultiplication and a boolean
parameter to use those procs.

ImageDecodingTest:
Test unpremultiplied bitmap decoding.

SampleUnpremul:
Add a sample which allows visually comparing between the
unpremultiplied version (copied into a premultiplied bitmap,
since drawing unpremultiplied is not currently supported)
and a premultiplied version of image files.

gm.h:
Add a getter for the resource path, so Samples can use it.

As of patch set 13, https://codereview.chromium.org/16816016/
and https://codereview.chromium.org/16983004/, which were
approved separately.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9612 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-14 15:33:20 +00:00
commit-bot@chromium.org
5f879755f4 Add benchmark for PremultiplyAlpha and UnpremultiplyAlpha in Skia
BUG=248549
R=tomhudson@chromium.org, bsalomon@chromium.org, reed@google.com, noel@chromium.org, tomhudson@google.com

Author: jun.a.jiang@intel.com

Review URL: https://chromiumcodereview.appspot.com/16654004

git-svn-id: http://skia.googlecode.com/svn/trunk@9569 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-13 10:18:02 +00:00
reed@google.com
8af0371fe2 add bench for fontcache performance (measurement)
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9508 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-11 19:18:44 +00:00
reed@google.com
c117cbae61 add bench for sk_memset16/32
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9405 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-03 16:54:10 +00:00
robertphillips@google.com
1d2f631594 add bench for blurred rectori case
https://codereview.chromium.org/14690014/



git-svn-id: http://skia.googlecode.com/svn/trunk@9108 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-13 14:10:31 +00:00
robertphillips@google.com
6670ab9e63 Added game-like bench marks
https://codereview.chromium.org/14772019/



git-svn-id: http://skia.googlecode.com/svn/trunk@9078 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-09 19:03:48 +00:00
sugoi@google.com
5d71adf4b1 Adding new bench tests for lighting and blur
Review URL: https://codereview.chromium.org/14474004

git-svn-id: http://skia.googlecode.com/svn/trunk@8846 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-24 19:36:44 +00:00
sugoi@google.com
580a17241c Added a few bench for some image filters
Review URL: https://codereview.chromium.org/14234019

git-svn-id: http://skia.googlecode.com/svn/trunk@8824 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-23 14:20:45 +00:00
sugoi@google.com
4775cba7b3 Perlin noise adjustments
1 ) Added GPU simplex noise as a comparison to GPU Perlin noise. It can be enabled simply by using a #define (SK_USE_SIMPLEX_NOISE)
2 ) Enabled GPU Perlin noise tests
3 ) Added a small benchmark for noise
4 ) Disabled GPU Perlin noise on Android based on benchmarks

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

git-svn-id: http://skia.googlecode.com/svn/trunk@8719 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-17 13:46:56 +00:00
junov@chromium.org
d61ba6e5cf Benchmark to measure SkSurface copy on write performance
Review URL: https://codereview.chromium.org/14297008

git-svn-id: http://skia.googlecode.com/svn/trunk@8718 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-17 13:43:04 +00:00
commit-bot@chromium.org
d7aaf6034e Add Xfermode bench. Also clear before rendering in bench (rather than after).
Author: bsalomon@google.com

Reviewed By: robertphillips@google.com

Review URL: https://chromiumcodereview.appspot.com/13334011

git-svn-id: http://skia.googlecode.com/svn/trunk@8454 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-01 12:51:34 +00:00
bsalomon@google.com
4a71997e0d Add chart bench.
Review URL: https://codereview.appspot.com/7368051

git-svn-id: http://skia.googlecode.com/svn/trunk@7821 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-22 15:10:36 +00:00
senorblanco@chromium.org
c3799ada5b Add a bench for SkBicubicImageFilter.
Review URL: https://codereview.appspot.com/7312056

git-svn-id: http://skia.googlecode.com/svn/trunk@7668 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-08 16:40:14 +00:00
reed@google.com
c1f9011ceb add benchmark for stroked drawRect/drawOval/drawRRect, to prepare for optimizing
those based on special-casing stroking for single-contour-convex shapes.



git-svn-id: http://skia.googlecode.com/svn/trunk@7537 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-04 14:57:28 +00:00
reed@google.com
633c32b13b optimize region::intersect when one wholly contains the other
clone of https://codereview.appspot.com/7237055/



git-svn-id: http://skia.googlecode.com/svn/trunk@7491 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-31 15:24:24 +00:00
mike@reedtribe.org
a3f1c8e2fe add bench for sorting
git-svn-id: http://skia.googlecode.com/svn/trunk@7330 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-23 02:23:40 +00:00
robertphillips@google.com
8e679fe023 Added new bench to test out 1xN BitmapProcShaders
https://codereview.appspot.com/7160043/



git-svn-id: http://skia.googlecode.com/svn/trunk@7264 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-17 19:51:41 +00:00
humper@google.com
7c7292c607 Added a new function to directly generate a blurred rectangle analytically.
Added two new microbenchmarks to demonstrate speedup over existing BlurSeparable approach.

Added new GM tests for blurred rectangles. 
Review URL: https://codereview.appspot.com/7037050

git-svn-id: http://skia.googlecode.com/svn/trunk@7034 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-04 20:29:03 +00:00