aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Test.cpp
Commit message (Collapse)AuthorAge
* eliminate SK_BUILD_FOR_WIN32Gravatar Mike Klein2018-01-26
| | | | | | | | | | SK_BUILD_FOR_WIN and SK_BUILD_FOR_WIN32 have long meant the same thing. Chrome fix is https://chromium-review.googlesource.com/c/chromium/src/+/884007 Change-Id: I0e907b1bcd2a358eabf776f414fd3aeb3c689561 Reviewed-on: https://skia-review.googlesource.com/99340 Reviewed-by: Mike Reed <reed@google.com>
* dm: require tmpDir, reasonable defaultsGravatar Hal Canary2017-12-12
| | | | | | | Change-Id: I9d84ce1ebbe417160a29ca2221b1df04901238e3 Reviewed-on: https://skia-review.googlesource.com/83541 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* remove SkErrorGravatar Mike Klein2016-10-13
| | | | | | | | | | | | | It has not caught on. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3321 Change-Id: Ib2ee4ef99bc89c8f4b7504e42a9d7d9dfc483015 Reviewed-on: https://skia-review.googlesource.com/3321 Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Change SkTime::GetMSecs to double; ensure values stored in SkMSec do not ↵Gravatar benjaminwagner2016-03-25
| | | | | | | | | | | | | | | | | | | | | | | overflow. The following are currently unused in Android, Google3, Chromium, and Mozilla: - SkEvent - SkTime::GetMSecs - SK_TIME_FACTOR (also unused in Skia) - SkAutoTime I left uses of SkMSec more-or-less intact for SkEvent, SkAnimator, and SkInterpolator. SkInterpolator is used in Chromium, so I did not want to change the API. The views/ and animator/ code is crufty, so it didn't seem worthwhile to refactor it. Instead, I added SkEvent::GetMSecsSinceStartup, which is likely to be adequate for use in SampleApp. I also left SkMSec where it is used to measure a duration rather than a timestamp. With the exception of SkMovie, which is used in Android, all of the uses appear to measure the execution time of a piece of code, which I would hope does not exceed 2^31 milliseconds. Added skiatest::Timer to support a common idiom in tests where we want to measure the wallclock time in integer milliseconds. (Not used in tests/PathOpsSkpClipTest.cpp because it redefines things in Test.h.) Removed tabs in tests/StrokerTest.cpp. BUG=skia:4632 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1811613004 Review URL: https://codereview.chromium.org/1811613004
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Simplify skiatest framework.Gravatar halcanary2015-01-20
| | | | | | | | | | | | | skiatest::Test class is now a simple struct. Some functionalty, such as counting errors or timing is now handled elsewhere. skiatest:Reporter is now a simpler abstract class. The two implementations handle test errors. DM and pathops_unittest updated. Review URL: https://codereview.chromium.org/830513004
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* When running DM, write test failures to json.Gravatar scroggo2014-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add skiatest::Failure to keep track of data about a test failure. Reporter::reportFailed and ::onReportFailed now take Failure as a parameter. This allows the implementation to treat the failure as it wishes. Provide a helper to format the failure the same as prior to the change. Update the macros for calling reportFailed (REPORTER_ASSERT etc) to create a Failure object. Convert a direct call to reportFailed to the macro ERRORF. Write Failures to Json. Sample output when running dm on the dummy test crrev.com/705723004: { "test_results" : { "failures" : [ { "condition" : "0 > 3", "file_name" : "../../tests/DummyTest.cpp", "line_no" : 10, "message" : "" }, { "condition" : "false", "file_name" : "../../tests/DummyTest.cpp", "line_no" : 4, "message" : "" }, { "condition" : "1 == 3", "file_name" : "../../tests/DummyTest.cpp", "line_no" : 5, "message" : "I can too count!" }, { "condition" : "", "file_name" : "../../tests/DummyTest.cpp", "line_no" : 6, "message" : "seven is 7" }, { "condition" : "1 == 3", "file_name" : "../../tests/DummyTest.cpp", "line_no" : 14, "message" : "I can too count!" } ] } } Report all of the failures from one test. Previously, if one test had multiple failures, only one was reportered. e.g: Failures: test Dummy: ../../tests/DummyTest.cpp:6 seven is 7 test Dummy2: ../../tests/DummyTest.cpp:10 0 > 3 test Dummy3: ../../tests/DummyTest.cpp:14 I can too count!: 1 == 3 3 failures. Now, we get all the messages: Failures: test Dummy: ../../tests/DummyTest.cpp:4 false ../../tests/DummyTest.cpp:5 I can too count!: 1 == 3 ../../tests/DummyTest.cpp:6 seven is 7 test Dummy2: ../../tests/DummyTest.cpp:10 0 > 3 test Dummy3: ../../tests/DummyTest.cpp:14 I can too count!: 1 == 3 3 failures. (Note that we still state "3 failures" because 3 DM::Tasks failed.) BUG=skia:3082 BUG=skia:2454 Review URL: https://codereview.chromium.org/694703005
* Make the Sk GL context class an abstract base classGravatar kkinnunen2014-10-09
| | | | | | | | | | | | | | | | | | | | | | | Make the Sk GL context class, SkGLNativeContext, an abstract base class. Before, it depended on ifdefs to implement the platform dependent polymorphism. Move the logic to subclasses of the various platform implementations. This a step to enable Skia embedders to compile dm and bench_pictures. The concrete goal is to support running these test apps with Chromium command buffer. With this change, Chromium can implement its own version of SkGLNativeContext that uses command buffer, and host the implementation in its own repository. Implements the above by renaming the SkGLContextHelper to SkGLContext and removing the unneeded SkGLNativeContext. Also removes SkGLNativeContext::AutoRestoreContext functionality, it appeared to be unused: no use in Skia code, and no tests. BUG=skia:2992 Committed: https://skia.googlesource.com/skia/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8 Review URL: https://codereview.chromium.org/630843002
* Revert of Make the Sk GL context class an abstract base class (patchset #4 ↵Gravatar bsalomon2014-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:60001 of https://codereview.chromium.org/630843002/) Reason for revert: nanobech failing on Android Original issue's description: > Make the Sk GL context class an abstract base class > > Make the Sk GL context class, SkGLNativeContext, an abstract base class. Before, > it depended on ifdefs to implement the platform dependent polymorphism. Move > the logic to subclasses of the various platform implementations. > > This a step to enable Skia embedders to compile dm and bench_pictures. The > concrete goal is to support running these test apps with Chromium command buffer. > > With this change, Chromium can implement its own version of SkGLNativeContext > that uses command buffer, and host the implementation in its own repository. > > Implements the above by renaming the SkGLContextHelper to SkGLContext and > removing the unneeded SkGLNativeContext. Also removes > SkGLNativeContext::AutoRestoreContext functionality, it appeared to be unused: > no use in Skia code, and no tests. > > BUG=skia:2992 > > Committed: https://skia.googlesource.com/skia/+/a90ed4e83897b45d6331ee4c54e1edd4054de9a8 TBR=kkinnunen@nvidia.com NOTREECHECKS=true NOTRY=true BUG=skia:2992 Review URL: https://codereview.chromium.org/639793002
* Make the Sk GL context class an abstract base classGravatar kkinnunen2014-10-08
| | | | | | | | | | | | | | | | | | | | | Make the Sk GL context class, SkGLNativeContext, an abstract base class. Before, it depended on ifdefs to implement the platform dependent polymorphism. Move the logic to subclasses of the various platform implementations. This a step to enable Skia embedders to compile dm and bench_pictures. The concrete goal is to support running these test apps with Chromium command buffer. With this change, Chromium can implement its own version of SkGLNativeContext that uses command buffer, and host the implementation in its own repository. Implements the above by renaming the SkGLContextHelper to SkGLContext and removing the unneeded SkGLNativeContext. Also removes SkGLNativeContext::AutoRestoreContext functionality, it appeared to be unused: no use in Skia code, and no tests. BUG=skia:2992 Review URL: https://codereview.chromium.org/630843002
* SkThreadPool ~~> SkTaskGroupGravatar mtklein2014-09-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert of SkThreadPool ~~> SkTaskGroup (patchset #4 id:60001 of ↵Gravatar mtklein2014-09-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* SkThreadPool ~~> SkTaskGroupGravatar mtklein2014-09-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Refactor how we handle resources path in Tests.Gravatar tfarina2014-06-18
| | | | | | | | | | | | | This idea emerged while doing https://codereview.chromium.org/321723002/ (commit 880914c35c8f7fc2e9c57134134c883baf66e538). BUG=None TEST=make tests && out/Debug/tests R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/346453002
* Reland "Clean up Test's resourcePath code."Gravatar tfarina2014-06-09
| | | | | | | | | | | | | This relands commit 91359bed48bc006a4319da86eb26db3b2e6d4afb (Clean up Test's resourcePath code." BUG=None TEST=make dm && out/Debug/dm R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/321723002
* Revert of Clean up Test's resourcePath code. ↵Gravatar mtklein2014-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/319473003/) Reason for revert: Some benchmarks are written in a way that makes this change unsafe (e.g. const char* resPath = GetResourcePath().c_str(); in SkipZeroesBench) and Valgrind and ASAN caught that. We can try again after a more careful cleanup of GetResourcePath(). Original issue's description: > Clean up resourcePath code. > > 1) Make the implementation of SetResourcePath/GetResourcePath of GM and SkBenchmark match with the one in Test. > 2) Make gResourcePath a static pointer to const char and move it inside the classes. > > BUG=None > TEST=make tests && out/Debug/tests > make gm && out/Debug/gm > make bench && out/Debug/bench > R=mtklein@google.com > > Committed: https://skia.googlesource.com/skia/+/52e4f413ffe2d281f9e90ff2147db08083ffcba7 R=tfarina@chromium.org TBR=tfarina@chromium.org NOTREECHECKS=true NOTRY=true BUG=None Author: mtklein@google.com Review URL: https://codereview.chromium.org/320733002
* Clean up resourcePath code.Gravatar tfarina2014-06-07
| | | | | | | | | | | | | | | | 1) Make the implementation of SetResourcePath/GetResourcePath of GM and SkBenchmark match with the one in Test. 2) Make gResourcePath a static pointer to const char and move it inside the classes. BUG=None TEST=make tests && out/Debug/tests make gm && out/Debug/gm make bench && out/Debug/bench R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/319473003
* Mike R: please sanity check SkPostConfig.hGravatar commit-bot@chromium.org2014-04-14
| | | | | | | | | | | | | | | | | | | | | | | | Mike K: please sanity check Test.cpp and skia_test.cpp Feel free to look at the rest, but I don't expect any in depth review of path ops innards. Path Ops first iteration used QuickSort to order segments radiating from an intersection to compute the winding rule. This revision uses a circular sort instead. Breaking out the circular sort into its own long-lived structure (SkOpAngle) allows doing less work and provides a home for caching additional sorting data. The circle sort is more stable than the former sort, has a robust ordering and fewer exceptions. It finds unsortable ordering less often. It is less reliant on the initial curve tangent, using convex hulls instead whenever it can. Additional debug validation makes sure that the computed structures are self-consistent. A new visualization tool helps verify that the angle ordering is correct. The 70+M tests pass with this change on Windows, Mac, Linux 32 and Linux 64 in debug and release. R=mtklein@google.com, reed@google.com Author: caryclark@google.com Review URL: https://codereview.chromium.org/131103009 git-svn-id: http://skia.googlecode.com/svn/trunk@14183 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2014-02-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@13604 2bbb7eff-a529-9590-31e7-b0007b416f81
* Let DM run unit tests.Gravatar commit-bot@chromium.org2014-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | - refactor GYPs and a few flags - make GPU tests grab a thread-local GrContextFactory when needed as we do in DM for GMs - add a few more UI features to make DM more like tests I believe this makes the program 'tests' obsolete. It should be somewhat faster to run the two sets together than running the old binaries serially: - serial: tests 20s (3m18s CPU), dm 21s (3m01s CPU) - together: 27s (6m21s CPU) Next up is to incorporate benches. I'm only planning there on a single-pass sanity check, so that won't obsolete the program 'bench' just yet. Tested: out/Debug/tests && out/Debug/dm && echo ok BUG=skia: Committed: http://code.google.com/p/skia/source/detail?r=13586 R=reed@google.com, bsalomon@google.com, mtklein@google.com, tfarina@chromium.org Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/178273002 git-svn-id: http://skia.googlecode.com/svn/trunk@13592 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Let DM run unit tests. (https://codereview.chromium.org/178273002/)Gravatar commit-bot@chromium.org2014-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reason for revert: broke tests Original issue's description: > Let DM run unit tests. > - refactor GYPs and a few flags > - make GPU tests grab a thread-local GrContextFactory when needed as we do in DM for GMs > - add a few more UI features to make DM more like tests > > I believe this makes the program 'tests' obsolete. > > It should be somewhat faster to run the two sets together than running the old binaries serially: > - serial: tests 20s (3m18s CPU), dm 21s (3m01s CPU) > - together: 27s (6m21s CPU) > > Next up is to incorporate benches. I'm only planning there on a single-pass sanity check, so that won't obsolete the program 'bench' just yet. > > Tested: out/Debug/tests && out/Debug/dm && echo ok > BUG=skia: > > Committed: http://code.google.com/p/skia/source/detail?r=13586 R=bsalomon@google.com, mtklein@google.com, tfarina@chromium.org, mtklein@chromium.org TBR=bsalomon@google.com, mtklein@chromium.org, mtklein@google.com, tfarina@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@google.com Review URL: https://codereview.chromium.org/179403010 git-svn-id: http://skia.googlecode.com/svn/trunk@13587 2bbb7eff-a529-9590-31e7-b0007b416f81
* Let DM run unit tests.Gravatar commit-bot@chromium.org2014-02-25
| | | | | | | | | | | | | | | | | | | | | | | | - refactor GYPs and a few flags - make GPU tests grab a thread-local GrContextFactory when needed as we do in DM for GMs - add a few more UI features to make DM more like tests I believe this makes the program 'tests' obsolete. It should be somewhat faster to run the two sets together than running the old binaries serially: - serial: tests 20s (3m18s CPU), dm 21s (3m01s CPU) - together: 27s (6m21s CPU) Next up is to incorporate benches. I'm only planning there on a single-pass sanity check, so that won't obsolete the program 'bench' just yet. Tested: out/Debug/tests && out/Debug/dm && echo ok BUG=skia: R=reed@google.com, bsalomon@google.com, mtklein@google.com, tfarina@chromium.org Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/178273002 git-svn-id: http://skia.googlecode.com/svn/trunk@13586 2bbb7eff-a529-9590-31e7-b0007b416f81
* Cleanup: Sanitize the order of includes under tests/Gravatar tfarina@chromium.org2014-01-24
| | | | | | | | | | | | | | | | Initially this was to make sure Test.h appeared after the Sk*.h includes. Patch generated by the following command line: $ ~/chromium/src/tools/sort-headers.py tests/*.cpp BUG=None TEST=tests R=robertphillips@google.com Review URL: https://codereview.chromium.org/145313004 git-svn-id: http://skia.googlecode.com/svn/trunk@13177 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove unnamed namespace usage from tests/Gravatar tfarina@chromium.org2014-01-21
| | | | | | | | | | | | | Skia preference is to use 'static' keyword rather than use unnamed namespace. BUG=None TEST=tests R=robertphillips@google.com, bsalomon@google.com Review URL: https://codereview.chromium.org/132403008 git-svn-id: http://skia.googlecode.com/svn/trunk@13138 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix compilation with SK_ENABLE_INST_COUNT=1Gravatar commit-bot@chromium.org2013-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* harden and speed up path op unit testsGravatar caryclark@google.com2013-07-16
| | | | | | | | | | | | | | | | | | | PathOps tests internal routines direcctly. Check to make sure that test points, lines, quads, curves, triangles, and bounds read from arrays are valid (i.e., don't contain NaN) before calling the test function. Repurpose the test flags. - make 'v' verbose test region output against path output - make 'z' single threaded (before it made it multithreaded) The latter change speeds up tests run by the buildbot by 2x to 3x. BUG= Review URL: https://codereview.chromium.org/19374003 git-svn-id: http://skia.googlecode.com/svn/trunk@10107 2bbb7eff-a529-9590-31e7-b0007b416f81
* Refactor: clean up some unused or mostly-unused API I saw here.Gravatar commit-bot@chromium.org2013-06-18
| | | | | | | | | | | BUG= R=bungeman@google.com, reed@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/17414003 git-svn-id: http://skia.googlecode.com/svn/trunk@9668 2bbb7eff-a529-9590-31e7-b0007b416f81
* Avoid side effects related to skia error callbacks in the testing infrastructureGravatar humper@google.com2013-04-25
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/14447018 git-svn-id: http://skia.googlecode.com/svn/trunk@8867 2bbb7eff-a529-9590-31e7-b0007b416f81
* Also proxy bumpTestCount.Gravatar commit-bot@chromium.org2013-04-23
| | | | | | | | | | | | | | | | | Example output with -v -x: ... Finished 127 tests, 0 failures, 0 skipped. Ran 73094673 Internal tests. BUG= R=caryclark@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/13983011 git-svn-id: http://skia.googlecode.com/svn/trunk@8821 2bbb7eff-a529-9590-31e7-b0007b416f81
* Unbreak -z. The LocalReporter shim layer was forcing the pathops options ↵Gravatar commit-bot@chromium.org2013-04-22
| | | | | | | | | | | | | back to defaults. BUG= R=caryclark@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/13849013 git-svn-id: http://skia.googlecode.com/svn/trunk@8804 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make it clearer what's going on at the end of tests.Gravatar commit-bot@chromium.org2013-04-22
| | | | | | | | | | | BUG= R=reed@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/14267022 git-svn-id: http://skia.googlecode.com/svn/trunk@8803 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add --threads to tests binary, to run non-GPU tests on multiple cores.Gravatar commit-bot@chromium.org2013-04-19
| | | | | | | | | | | | | | | | | | | | On my quad-core laptop I can get about a 3x speedup: Debug, --threads 0 40.99s Debug, --threads 8 14.39s Release, --threads 0 8.24s Release, --threads 8 2.80s I also removed some unused Test.{h,cpp} APIs and refactored a little to make things thread-safer. BUG= R=borenet@google.com, djsollen@google.com, scroggo@google.com, reed@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/13855007 git-svn-id: http://skia.googlecode.com/svn/trunk@8763 2bbb7eff-a529-9590-31e7-b0007b416f81
* add extended option to TestGravatar caryclark@google.com2013-04-10
| | | | | | | | | | | The command line option --extended runs extended tests --verbose reports number of tests run (if recorded) Added simple help as well. Review URL: https://codereview.chromium.org/14063005 git-svn-id: http://skia.googlecode.com/svn/trunk@8595 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make GPU unit tests use GrContexts of different GL types.Gravatar bsalomon@google.com2013-02-04
| | | | | | Review URL: https://codereview.appspot.com/7281046 git-svn-id: http://skia.googlecode.com/svn/trunk@7540 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix the gr/gl destruction order in Test.cppGravatar bsalomon@google.com2012-11-29
| | | | | | | R=djsollen@google.com Review URL: https://codereview.appspot.com/6851126 git-svn-id: http://skia.googlecode.com/svn/trunk@6602 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix test app to ensure that we destroy our GPU resources.Gravatar djsollen@google.com2012-11-29
| | | | | | | | | | | The problem arises on devices like the Nexus 10 where we allow the destruction of resources using the destructor of a static variable. However, we have no guarentee that the GPU driver has not already cleaned up it's resources prior to our static destructor. Review URL: https://codereview.appspot.com/6851124 git-svn-id: http://skia.googlecode.com/svn/trunk@6599 2bbb7eff-a529-9590-31e7-b0007b416f81
* Platform/Engine -> BackendGravatar bsalomon@google.com2012-10-25
| | | | | | | | | createPlatform -> wrapBackend R=robertphillips@google.com Review URL: https://codereview.appspot.com/6785044 git-svn-id: http://skia.googlecode.com/svn/trunk@6123 2bbb7eff-a529-9590-31e7-b0007b416f81
* Extended Inst counting to find "unknown" leaked object (SkTMaskGamma)Gravatar robertphillips@google.com2012-08-16
| | | | | | | | http://codereview.appspot.com/6453127/ git-svn-id: http://skia.googlecode.com/svn/trunk@5123 2bbb7eff-a529-9590-31e7-b0007b416f81
* Create GPU-less build of Skia.Gravatar bsalomon@google.com2012-08-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4912 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move GL-specific include files to their own subdirectory, to betterGravatar tomhudson@google.com2012-02-14
| | | | | | | | | | | coexist alongside D3D backend. Requires gyp change. http://codereview.appspot.com/5665045/ git-svn-id: http://skia.googlecode.com/svn/trunk@3185 2bbb7eff-a529-9590-31e7-b0007b416f81
* Recommit r2510 now that mac build bot issue has been fixed.Gravatar bsalomon@google.com2011-10-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2521 2bbb7eff-a529-9590-31e7-b0007b416f81
* Temporary revert of r2510. The test that it introduced fails on the Mac ↵Gravatar bsalomon@google.com2011-10-20
| | | | | | build bots. I suspect there is something wrong with the Mac bot machine's GL that is preventing context creation from succeeding. The OpenGL Driver monitor on the machine only shows a software rasterizer. aglChoosePixelFormat seems to fail regardless of input. It may just need a reboot. I'll investigate it more on Monday. git-svn-id: http://skia.googlecode.com/svn/trunk@2511 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add test that validates GrGLInterfacesGravatar bsalomon@google.com2011-10-20
| | | | | | | | Review URL: http://codereview.appspot.com/5304048/ git-svn-id: http://skia.googlecode.com/svn/trunk@2510 2bbb7eff-a529-9590-31e7-b0007b416f81
* Virtualize SkGLContext with subclasses SkNativeGLContext and ↵Gravatar bsalomon@google.com2011-10-19
| | | | | | | | | | SkMesaGLContext, allow both in gm Review URL: http://codereview.appspot.com/5307045/ git-svn-id: http://skia.googlecode.com/svn/trunk@2499 2bbb7eff-a529-9590-31e7-b0007b416f81
* move utils/SkEGLContext to gpu/SkGLContext, some gpu.gyp cleanup, set eol ↵Gravatar bsalomon@google.com2011-10-13
| | | | | | | | | | style LF on all gpu files Review URL: http://codereview.appspot.com/5242056/ git-svn-id: http://skia.googlecode.com/svn/trunk@2474 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make program unit test run clean and add it to tests programGravatar bsalomon@google.com2011-08-16
| | | | | | | Review URL: http://codereview.appspot.com/4898049/ git-svn-id: http://skia.googlecode.com/svn/trunk@2121 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* remove SkRefCnt safeRef() and safeUnref(), and replace the call-sites withGravatar reed@google.com2011-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkSafeRef() and SkSafeUnref(). This is basically a bug waiting to happen. An optimizing compiler can remove checks for null on "this" if it chooses. However, SkRefCnt::safeRef() relies on precisely this check... void SkRefCnt::safeRef() { if (this) { this->ref(); } } Since a compiler might skip the if-clause, it breaks the intention of this method, hence its removal. static inline void SkSafeRef(SkRefCnt* obj) { if (obj) { obj->ref(); } } This form is not ignored by an optimizing compile, so we use it instead. git-svn-id: http://skia.googlecode.com/svn/trunk@762 2bbb7eff-a529-9590-31e7-b0007b416f81