aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/GrTRecorderTest.cpp
Commit message (Collapse)AuthorAge
* Use GrContextFactories that produce a single GrContext in unit tests.Gravatar Brian Salomon2017-11-15
| | | | | | | | | | | | | | | | | | | | | This is to alleviate problems due to the command buffer getting bent out of shape when the current OpenGL context is switched out from under it (because we ran a test with a native GL context). This, however is not a full solution. More changes will be required to ensure that after running each command buffer or native test we bind the null context. This does allow us to take a step in that direction without breaking anything too badly. Moreover, there is no real benefit to reusing a GrContextFactory. Modifies DEF_GPUTEST to take GrContextOptions rather than a factory to use. Tests were already using their own factories anyway. In tests that use GrContextFactory the factory instance is moved to the inner loop. Modifies gpucts and skia_test to not use persistent GrContextFactories. Change-Id: Ie7a36793545c775f2f30653ead6fec93a3d22717 Reviewed-on: https://skia-review.googlesource.com/71861 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* Add ReverseIter to GrTRecorderGravatar cdalton2015-04-16
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1035083004
* Add pop_back to GrTRecorder.hGravatar bsalomon2014-11-21
| | | | Review URL: https://codereview.chromium.org/750613002
* 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
* Adds a GrTRecorder class that GrInOrderDrawBuffer uses to allocateGravatar cdalton2014-10-15
| | | | | | | | | | all its commands interleaved in contiguous memory. GrTRecorder also supports extra data associated with objects, so we can store arrays inline without having to call malloc(). Committed: https://skia.googlesource.com/skia/+/360b6801cfd90485891d709e44cf395d527ba69e Review URL: https://codereview.chromium.org/628453002
* Revert of Create a single command buffer for GrInOrderDrawBuffer (patchset ↵Gravatar mtklein2014-10-14
| | | | | | | | | | | | | | | | | | | | | | #17 id:1240001 of https://codereview.chromium.org/628453002/) Reason for revert: Leaking memory: http://build.chromium.org/p/client.skia/builders/Test-Ubuntu12-ShuttleA-GTX550Ti-x86_64-Release-Valgrind/builds/9/steps/gm/logs/stdio Original issue's description: > Adds a GrTRecorder class that GrInOrderDrawBuffer uses to allocate > all its commands interleaved in contiguous memory. GrTRecorder also > supports extra data associated with objects, so we can store arrays > inline without having to call malloc(). > > Committed: https://skia.googlesource.com/skia/+/360b6801cfd90485891d709e44cf395d527ba69e TBR=bsalomon@google.com,reed@google.com,cdalton@nvidia.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/654863003
* Adds a GrTRecorder class that GrInOrderDrawBuffer uses to allocateGravatar cdalton2014-10-14
| | | | | | | | all its commands interleaved in contiguous memory. GrTRecorder also supports extra data associated with objects, so we can store arrays inline without having to call malloc(). Review URL: https://codereview.chromium.org/628453002
* Revert of Create a single command buffer for GrInOrderDrawBuffer (patchset ↵Gravatar mtklein2014-10-13
| | | | | | | | | | | | | | | | | | | | | #14 id:1050001 of https://codereview.chromium.org/628453002/) Reason for revert: New test failing on Android: http://build.chromium.org/p/client.skia.android/builders/Test-Android-Nexus7-Tegra3-Arm7-Release/builds/89/steps/dm/logs/stdio Original issue's description: > Adds a GrTBaseList class that GrInOrderDrawBuffer uses to allocate > all its commands interleaved in contiguous memory. GrTBaseList also > supports extra data associated with objects, so we can store arrays > inline without having to call malloc(). > > Committed: https://skia.googlesource.com/skia/+/47c844aaba81e5a29c773b660e1d6062c766d253 TBR=bsalomon@google.com,reed@google.com,cdalton@nvidia.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/652843002
* Adds a GrTBaseList class that GrInOrderDrawBuffer uses to allocateGravatar cdalton2014-10-13
all its commands interleaved in contiguous memory. GrTBaseList also supports extra data associated with objects, so we can store arrays inline without having to call malloc(). Review URL: https://codereview.chromium.org/628453002