Commit Graph

24 Commits

Author SHA1 Message Date
commit-bot@chromium.org
ab1c13864d Fix compilation with SK_ENABLE_INST_COUNT=1
Add INHERITED declarations to class declarations that prevent
compilation with the flag.

Remove SK_DEFINE_INST_COUNT from all class implementations.  Instead,
use function-local static variables in the reference count helper
classes to create the global instances to store the needed info. The
accessor functions are defined inline in the helper classes, so
definitions are not needed. The initialization point of the variables
should be as well defined as previously.

Remove SK_DECLARE_INST_COUNT_TEMPLATE and use SK_DECLARE_INST_COUNT
instead. This avoids possible future compilation errors further.

For SK_ENABLE_INST_COUNT=0 compilation, add an empty static member
function to all classes that use SK_DECLARE_INST_COUNT and
SK_DECLARE_INST_COUNT_ROOT macros. The function ensures that classes
contain public INHERITED typedef. This member function seems to be
compiled away. This shouĺd ensure that part of the compilation errors
are caught earlier.

Also adds DSK_DECLARE_INST_COUNT to few SkPDFDict subclasses.

R=robertphillips@google.com, richardlin@chromium.org, bsalomon@google.com

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12501 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-05 12:08:12 +00:00
commit-bot@chromium.org
3361471a35 Simplify benchmark internal API.
I'm not quite sure why I wrote such a convoluted API with setLoops()/getLoops().
This replaces it with a loops argument passed to onDraw().

This CL is largely mechanical translation from the old API to the new one.
MathBench used this->getLoops() outside onDraw(), which seems incorrect.  I
fixed it.

BUG=
R=djsollen@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12466 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-03 18:17:16 +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
4469938e92 Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning""
This reverts commit 1e787c38fa71f2a21fd728f1b1d620b9b09b0d3d.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12057 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-31 17:28:30 +00:00
reed@google.com
6fcbfcead5 Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning"
This reverts commit 1d22c4aaf9d8f053f25194a1ed74b137bfb19497.

git-svn-id: http://skia.googlecode.com/svn/trunk@12056 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-31 16:31:11 +00:00
reed@google.com
081560e3ab add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning
BUG=
R=robertphillips@google.com, senorblanco@chromium.org, vandebo@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12055 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-31 16:24:08 +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
410e6e80f0 Refactoring: get rid of the SkBenchmark void* parameter.
While I was doing massive sed-ing, I also converted every bench to use DEF_BENCH instead of registering the ugly manual way.

BUG=
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11263 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-13 19:52:27 +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
reed@google.com
ef77ec2104 extend SkBenchmark to allow a bench to return a durationScale, which allows it to perform fewer actual interations, but report a scale factor to account for that. Thus a very slow bench can be compared head-to-head with a faster one, w/o actually forcing the tool to run for the full duration of the slower test.
Extend BitmapBench to time bicubic filtering, and use this durationScale for it.

Extend SkBenchmark to have setBitmapFlags(or, clear), allowing it to request a set of paint flags to be cleared, and set to be set.

BUG=
R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9315 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-29 15:39:54 +00:00
tomhudson@google.com
9dc2713fc4 Let SkBenchmark classes specify that they do no rendering.
Doing this gives us a 15-20% speedup in bench cycle time.
Here again I'm just picking the easy targets.

http://codereview.appspot.com/6500115/



git-svn-id: http://skia.googlecode.com/svn/trunk@5525 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-13 15:50:24 +00:00
bsalomon@google.com
30e6d2c205 Adds a bunch of benchmarks around creating, transforming, testing path equality,
and concatting paths. Also allows benchs to do setup / tear down steps outside
of the cons/destructor via new SkBenchmark virtuals.

Review URL: http://codereview.appspot.com/6454137/



git-svn-id: http://skia.googlecode.com/svn/trunk@5054 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-13 14:03:31 +00:00
robertphillips@google.com
15e9d3e66e Expanded distribution of instance counting
http://codereview.appspot.com/6300114/



git-svn-id: http://skia.googlecode.com/svn/trunk@4291 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-21 20:25:03 +00:00
epoger@google.com
ec3ed6a5eb Automatic update of all copyright notices to reflect new license terms.
I have manually examined all of these diffs and restored a few files that
seem to require manual adjustment.

The following files still need to be modified manually, in a separate CL:

android_sample/SampleApp/AndroidManifest.xml
android_sample/SampleApp/res/layout/layout.xml
android_sample/SampleApp/res/menu/sample.xml
android_sample/SampleApp/res/values/strings.xml
android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java
android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java
experimental/CiCarbonSampleMain.c
experimental/CocoaDebugger/main.m
experimental/FileReaderApp/main.m
experimental/SimpleCocoaApp/main.m
experimental/iOSSampleApp/Shared/SkAlertPrompt.h
experimental/iOSSampleApp/Shared/SkAlertPrompt.m
experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig
experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig
experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig
gpu/src/android/GrGLDefaultInterface_android.cpp
gyp/common.gypi
gyp_skia
include/ports/SkHarfBuzzFont.h
include/views/SkOSWindow_wxwidgets.h
make.bat
make.py
src/opts/memset.arm.S
src/opts/memset16_neon.S
src/opts/memset32_neon.S
src/opts/opts_check_arm.cpp
src/ports/SkDebug_brew.cpp
src/ports/SkMemory_brew.cpp
src/ports/SkOSFile_brew.cpp
src/ports/SkXMLParser_empty.cpp
src/utils/ios/SkImageDecoder_iOS.mm
src/utils/ios/SkOSFile_iOS.mm
src/utils/ios/SkStream_NSData.mm
tests/FillPathTest.cpp
Review URL: http://codereview.appspot.com/4816058

git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-28 14:26:00 +00:00
agl@chromium.org
652807bbc8 Revert "Revert "Use hairline when line width <= 1.0, instead of < 1.0.""
This reverts commit r560. Chromium has landed at r560, so I'm applying the
revert-revert. (See the comments in r560 for details.)

git-svn-id: http://skia.googlecode.com/svn/trunk@561 2bbb7eff-a529-9590-31e7-b0007b416f81
2010-04-27 15:47:34 +00:00
agl@chromium.org
6fd950ca5c Revert "Use hairline when line width <= 1.0, instead of < 1.0."
This reverts commit r538 for the moment. In order to roll Chrome to include
some bug fixes, I want to land it in between this revert, and the revert
revert. That way the baseline changes from the other revisions can be
considered without conflating the huge number of changes due to r538.

git-svn-id: http://skia.googlecode.com/svn/trunk@560 2bbb7eff-a529-9590-31e7-b0007b416f81
2010-04-26 21:47:25 +00:00
anatoly@google.com
a956e4fe2e Use hairline when line width <= 1.0, instead of < 1.0.
This speeds line drawing up considerably when drawing with
default linewidth on canvas.

Review: http://codereview.appspot.com/883047/show



git-svn-id: http://skia.googlecode.com/svn/trunk@538 2bbb7eff-a529-9590-31e7-b0007b416f81
2010-04-12 13:51:28 +00:00
reed@android.com
0c9da393d9 add FPSBench
git-svn-id: http://skia.googlecode.com/svn/trunk@505 2bbb7eff-a529-9590-31e7-b0007b416f81
2010-02-22 19:50:13 +00:00
reed@android.com
4e635f9eb2 add -forceDither option to bench (it is tristate)
update neon optimizations from motorola



git-svn-id: http://skia.googlecode.com/svn/trunk@391 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-10-19 17:39:46 +00:00
reed@android.com
e9d0060f4d add decode bench
add dictionary for bench tools to see optional cmdline args



git-svn-id: http://skia.googlecode.com/svn/trunk@351 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-09-02 21:12:42 +00:00
reed@android.com
29348cb061 add -forceFilter to bench tool
move some utils out of effects/



git-svn-id: http://skia.googlecode.com/svn/trunk@307 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-08-04 18:17:15 +00:00
reed@android.com
f523e25da0 add BitmapBench
git-svn-id: http://skia.googlecode.com/svn/trunk@83 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-01-26 23:15:37 +00:00
reed@android.com
4bc1983e01 add options to bench: -repeat N -forceOpaque -forceBlend -forceAA -forceBW
output stats for all configs (should be a option)



git-svn-id: http://skia.googlecode.com/svn/trunk@73 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-01-19 20:08:35 +00:00
reed@android.com
bd700c391d add benchmark framework
git-svn-id: http://skia.googlecode.com/svn/trunk@52 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-01-05 03:34:50 +00:00