aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* Promote SkInterpolator unit test to our tests driver.Gravatar tfarina2014-06-26
| | | | | | | | | | BUG=None TEST=make tests && out/Debug/tests -m Interpolator R=mtklein@google.com, bsalomon@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/351713005
* Remove SkBicubicImageFilter, and all related tests.Gravatar senorblanco2014-06-25
| | | | | | | | | | | | | 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
* Rename TestSize.cpp to SizeTest.cppGravatar tfarina2014-06-25
| | | | | | | | | | | | | | | | It is the only file where Test is the prefix rather than the sufix. This patch fixes that so it matches with the rest of the files under tests/ directory. And separate SkISize test into its own DEF_TEST(). BUG=None TEST=make tests && out/Debug/tests R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/337783007
* add path dump testGravatar caryclark2014-06-24
| | | | | | | | | | | | | Add a unit test for SkPath::dump(). The unit test exposed a minor bug (inconsistent CRs) and an unused parameter (title). R=bsalomon@google.com TBR=bsalomon BUG=skia:1836 Author: caryclark@google.com Review URL: https://codereview.chromium.org/351833003
* Tick off some TODOs:Gravatar Mike Klein2014-06-24
| | | | | | | | | | | | | | | | | | - support fRecord in copy constructor - support SkDrawPictureCallback Moved SkDrawPictureCallback to its own header so SkRecordDraw can include it without pulling in all of SkPicture. Adding an SkAutoSaveRestore to SkRecordDraw was the easiest way to match the balance guarantees of the callback, and probably not a bad idea in general. Updated its tests. BUG=skia: R=robertphillips@google.com Review URL: https://codereview.chromium.org/349973008
* add pathops tight bounds; conform path ops' gyp to unit testsGravatar caryclark2014-06-24
| | | | | | | | | | | | | | | | | | Implement path tight bounds using path ops machinery. This is not as efficient as it could be; for instance, internally, it creates a path ops structure more suited to intersection. If this shows up as a performance bottleneck, it could be improved. Fix path ops gyp files, which have fallen out of sync with other tests. R=mtklein@google.com, bsalomon@google.com TBR=mtklein BUG=skia:1712 Author: caryclark@google.com Review URL: https://codereview.chromium.org/348343002
* Preprend Test to test function name generated by DEF_TEST() macro.Gravatar tfarina2014-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | That way when declaring a test with DEF_TEST() macro, you don't have to uniquify the test name because it might colide with the class it is being testing. For example, if you are testing SkBase64 and do: DEF_TEST(SkBase64, reporter) { } That will generate an error because the macro will declare a function named SkBase64 which colides with the type SkBase64. By adding Test to the function name we avoid this problem. Fixed the entries found with the following command line: $ git grep "Test, r" | grep DEF BUG=None TEST=make tests && out/Debug/tests R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/345753007
* No one uses SkPicture::swap.Gravatar Mike Klein2014-06-23
| | | | | | | BUG=skia: R=robertphillips@google.com Review URL: https://codereview.chromium.org/349313004
* 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
* Add basic stacktrace handler using libunwind.Gravatar mtklein2014-06-18
| | | | | | | | | | | This means we will all have to apt-get install libunwind8-dev on Linux. Mac comes with everything we need already. BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/343583005
* Fix last pathops skp bugGravatar caryclark2014-06-18
| | | | | | | | | | | | | | | | | | | | | | This fixes the last bug discovered by iterating through the 800K skp corpus representing the top 1M websites. For every clip on the stack, the paths are replaced with the pathop intersection. The resulting draw is compared with the original draw for pixel errors. At least two prominent bugs remain. In one, the winding value is confused by a cubic with an inflection. In the other, a quad/cubic pair, nearly coincident, fails to find an intersection. These minor changes include ignoring very tiny self-intersections of cubics, and processing degenerate edges that don't connect to anything else. R=reed@android.com TBR=reed Author: caryclark@google.com Review URL: https://codereview.chromium.org/340103002
* Fifth attempt to land faster rect blur. Remove unnecessary conditionals ↵Gravatar humper2014-06-17
| | | | | | | | | | | | | | | from the shader. approved over in https://codereview.chromium.org/331863006/; reuploading because it had the wrong base url BUG=skia:2095 R=bsalomon@google.com TBR=bsalomon Author: humper@google.com Review URL: https://codereview.chromium.org/341543005
* Add EXPERIMENTAL_beginRecording() for SkRecord-based recording.Gravatar mtklein2014-06-17
| | | | | | | | | | | | | The interesting stuff is in SkPictureRecorder.{h,cpp}. The rest is mostly moving SkRecord from its own directories into core to avoid circular dependencies in GYP. After plumbing SkRecord all the way through in Picture, I'll delete its old entry point include/record/SkRecording.h. For now it and record.gypi need to stay where they are to keep Chrome building. BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/331573004
* hide SkBitmap::Config entirely (behind a flag)Gravatar reed2014-06-17
| | | | | | | | | | | | | patch from issue 339463002 TBR= I think the NoGPU failure is unrelated, so ignoring NOTRY=True Author: reed@google.com Review URL: https://codereview.chromium.org/340533002
* Enabling the canvas bit to turn the clip stack into a flat replace exposed ↵Gravatar caryclark2014-06-17
| | | | | | | | | | | | | | | | | | around 100 failures when testing the 800K skp set generated from the top 1M web sites. This fixes all but one of those failures. Major changes include: - Replace angle indices with angle pointers. This was motivated by the need to add angles later but not renumber existing angles. - Aggressive segment chase. When the winding is known on a segment, more aggressively passing that winding to adjacent segments allows fragmented data sets to succeed. - Line segments with ends nearly the same are treated as coincident first. - Transfer partial coincidence by observing that if segment A is partially coincident to B and C then B and C may be partially coincident. TBR=reed Author: caryclark@google.com Review URL: https://codereview.chromium.org/272153002
* stop using SkBitmap::ConfigGravatar reed2014-06-14
| | | | | | | | R=scroggo@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/338493005
* hide Config in SkImageDecoder -- use SkColorType insteadGravatar reed2014-06-12
| | | | | | | | | | patch from issue 334613003 TBR=scroggo Author: reed@chromium.org Review URL: https://codereview.chromium.org/334793002
* Revert of third try at landing improved blur rect; this time with more ↵Gravatar scroggo2014-06-12
| | | | | | | | | | | | | | | | | | | | | | | | | | correctness (https://codereview.chromium.org/331443003/) Reason for revert: Failing layout test: https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Linux/32762/layout-test-results/virtual/gpu/fast/canvas/canvas-draw-canvas-on-canvas-shadow-pretty-diff.html Original issue's description: > third try at landing improved blur rect; this time with more correctness > > BUG=skia:2095 > R=bsalomon@google.com > TBR=bsalomon > > Committed: https://skia.googlesource.com/skia/+/72abfc2b4e7caead660f6b6a05e60d05eaf1a66f R=bsalomon@google.com, reed@google.com, humper@google.com TBR=bsalomon@google.com, humper@google.com, reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2095 Author: scroggo@google.com Review URL: https://codereview.chromium.org/333763002
* Cleanup: Delete sk_tools::make_filepath() in favor of SkOSPath::SkPathJoin().Gravatar tfarina2014-06-12
| | | | | | | | | | BUG=None TEST=make tools tests && out/Debug/tests R=epoger@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/327403002
* third try at landing improved blur rect; this time with more correctnessGravatar humper2014-06-11
| | | | | | | | | | BUG=skia:2095 R=bsalomon@google.com TBR=bsalomon Author: humper@google.com Review URL: https://codereview.chromium.org/331443003
* Texture compression unit tests along with a couple of bug fixesGravatar krajcevski2014-06-11
| | | | | | | | R=robertphillips@google.com Author: krajcevski@google.com Review URL: https://codereview.chromium.org/330453005
* Remove picture pre-allocation from SkPictureRecorderGravatar robertphillips2014-06-11
| | | | | | | | | | | | This CL improves the separation of the SkPicture and SkPictureRecord classes. It delays creation of the SkPicture (in SkPictureRecorder) until recording is actually completed. To accomplish this the SkRecord-derived classes now get SkPathHeap and SkPictureContentInfo members that are absorbed by the SkPicture when it is constructed. As an ancillary change, this CL also moves the SkPictureContentInfo object from SkPicture to SkPicturePlayback. This is intended to centralize all the data in the SkPicturePlayback object. R=mtklein@google.com, reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/324293004
* Cleanup: Delete sk_tools::get_basename() in favor of SkOSPath::SkBasename().Gravatar tfarina2014-06-11
| | | | | | | | | | BUG=None TEST=make tests && out/Debug/tests R=epoger@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/321693002
* Revert of second try at landing improved blur rect ↵Gravatar reed2014-06-11
| | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/325703002/) Reason for revert: broke some fast/canvas layout tests Original issue's description: > second try at landing improved blur rect > > BUG=skia:2095 > TBR=bsalomon > > Committed: https://skia.googlesource.com/skia/+/e9ea0d6b7d59ac3b7e257281e545b24bcc0d2a76 R=bsalomon@google.com, reed@chromium.org, humper@google.com TBR=bsalomon@google.com, humper@google.com, reed@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia:2095 Author: reed@google.com Review URL: https://codereview.chromium.org/322423002
* Fix error revealed by Android unit testGravatar robertphillips2014-06-10
| | | | | | | | | | The issue is/was that the original Picture/PictureRecorder that is being partially replayed is not guaranteed to issue any more commands before attempting to modify the existing data. Such modification is prohibited if there is a extant copy-on-write snapshot. Rather then further complicate the SkWriter32::snapshot capability for a dis-preferred use case, this CL simply copies the operation data. R=scroggo@google.com, reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/316063005
* hide SkBitmap::setConfigGravatar reed2014-06-09
| | | | | | | | | | patch from issue 325733002 TBR=scroggo Author: reed@chromium.org Review URL: https://codereview.chromium.org/322963002
* second try at landing improved blur rectGravatar humper2014-06-09
| | | | | | | | | | BUG=skia:2095 R=bsalomon@google.com TBR=bsalomon Author: humper@google.com Review URL: https://codereview.chromium.org/325703002
* 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
* Generate path names on the client sideGravatar cdalton2014-06-09
| | | | | | | | | | | | | | Pre-allocates a range of path names and manages allocations within that range on the client side. This allows us to generate new path objects in a feed-forward manner that doesn't require round trips to the GL server. BUG=skia: R=bsalomon@google.com, markkilgard@gmail.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/304403003
* Remove SkPicture::kUsePathBoundsForClip_RecordingFlagGravatar robertphillips2014-06-09
| | | | | | | | | | The real question is whether we ever want to record a picture without using the path bounds for a conservative (but faster) clip answer? R=reed@google.com, mtklein@google.com, djsollen@google.com, scroggo@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/316143003
* No longer limit SkPictureRecorder::partialReplay to AndroidGravatar robertphillips2014-06-08
| | | | | | | | | | Toggling this for local testing is a bit of a chore. R=mtklein@google.com, reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/316173004
* 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
* Rollback of fe689c46 and all subsequent changesGravatar jvanverth2014-06-06
| | | | | | | | | | | | BUG=skia: R=humper@google.com TBR=humper@google.com NOTRY=True NOTREECHECKS=True Author: jvanverth@google.com Review URL: https://codereview.chromium.org/324463005
* disable GPU/CPU blur match test (possibly temporary)Gravatar humper2014-06-06
| | | | | | | | | | | BUG=skia: TBR=jvanverth NOTRY=True NOTREECHECKS=True Author: humper@google.com Review URL: https://codereview.chromium.org/322593002
* Initial KTX encoderGravatar krajcevski2014-06-06
| | | | | | | | | | | The encoder comes with tests to check that the encoding/decoding operations between ETC encoded bitmaps and ARGB bitmaps are sane. R=bsalomon@google.com, robertphillips@google.com Author: krajcevski@google.com Review URL: https://codereview.chromium.org/312353003
* Add bench for rectanizersGravatar robertphillips2014-06-05
| | | | | | | | R=bsalomon@google.com, jvanverth@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/319523003
* Alter SkCanvas::drawPicture (devirtualize, take const SkPicture, take pointer)Gravatar robertphillips2014-06-04
| | | | | | | | R=reed@google.com, bsalomon@google.com, mtklein@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/313613004
* Return NULL when building empty LayerRasterizer.Gravatar scroggo2014-06-03
| | | | | | | | | | | | | | | | | | In SkLayerRasterizer::snapshotRasterizer() and ::detachRasterizer(), if no layers have been added, do not attempt to create an SkLayerRasterizer. Instead, return NULL. This fixes an error when running tests on Android. Update dox to state that NULL may be returned. Add tests. R=reed@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/313653006
* Initial KTX file decoderGravatar krajcevski2014-06-03
| | | | | | | | R=bsalomon@google.com, robertphillips@google.com, halcanary@google.com, reed@google.com Author: krajcevski@google.com Review URL: https://codereview.chromium.org/302333002
* remove SkBounder -- unused and unlovedGravatar reed2014-06-03
| | | | | | | | | BUG=skia: R=scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/312553006
* Remove legacy picture recordingGravatar robertphillips2014-06-03
| | | | | | | | | | | | This is unblocked now that Android no longer uses the old interface. This is just the first step in cleaning this up. Future CLs will constify SkPicture access in SkCanvas and split up the SkPicture/SkPicturePlayback/SkPictureRecord trio. R=bsalomon@google.com, reed@google.com, mtklein@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/313613002
* Clean up SkOnce:Gravatar mtklein2014-06-02
| | | | | | | | | | | | | | | | 1 Remove atExit feature: clients can do it just as well as SkOnce can. 2 Remove support for functors: no one but the unit test did that. 3 Remove support for unused non-static SkOnceFlag (no SK_ONCE_INIT). 4 Add SkOnce variants for no-arg functions so we're not forced to pass dummy values all the time. 5 Merge SkSpinlock and SkOnceFlag, making all members private. 6 More notes about memory barriers, adding an acquire load after acquiring the spinlock. BUG=skia: R=bungeman@google.com, mtklein@google.com, reed@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/302083003
* Move GrIPoint16 to SkIPoint16 (and remove GrPoint.h)Gravatar robertphillips2014-06-02
| | | | | | | | R=bsalomon@google.com, reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/309683002
* Add a way for the gpu veto to report back the reason why it said noGravatar commit-bot@chromium.org2014-05-30
| | | | | | | | | | | BUG=2334 R=bsalomon@google.com Author: humper@google.com Review URL: https://codereview.chromium.org/301423002 git-svn-id: http://skia.googlecode.com/svn/trunk@15012 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow SkPictureImageFilter to be serialized when not run cross-process.Gravatar senorblanco@chromium.org2014-05-30
| | | | | | | | | | | | | | | | | | | | | | Picture serialization is not yet hardened, but it turns out we do need serialization of SkPictureImageFilter for deferred SVG-on-SVG filters, since the SkPaints (and thus the SkImageFilters) are serialized by SkPictureRecord. However, deferred filters are always drawn in the same process, so we can safely serialize them in this case. We do this by turning the compile-time check for SK_ALLOW_PICTUREIMAGEFILTER_SERIALIZATION to a runtime check for isCrossProcess(). The image filter fuzzer sample was also modified to enable fuzzing of basic picture image filters (the code had rotted a bit, being behind an #ifdef that no one sets). BUG=375162 R=sugoi@google.com Review URL: https://codereview.chromium.org/311443003 git-svn-id: http://skia.googlecode.com/svn/trunk@15008 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement SkPictureImageFilter bounds computation.Gravatar senorblanco@chromium.org2014-05-30
| | | | | | | | | | | | | SkPictureImageFilter::onFilterBounds() was unimplemented, causing incorrect results for SVG filters and impl-side painting (see Chrome bug https://code.google.com/p/chromium/issues/detail?id=375162). BUG=skia: R=reed@google.com Review URL: https://codereview.chromium.org/306733003 git-svn-id: http://skia.googlecode.com/svn/trunk@15003 2bbb7eff-a529-9590-31e7-b0007b416f81
* check for null typeface from paintGravatar reed@google.com2014-05-30
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@14998 2bbb7eff-a529-9590-31e7-b0007b416f81
* Test font created from paintGravatar commit-bot@chromium.org2014-05-30
| | | | | | | | | | | | This is meant to allow clients to migrate over to a SkFont api on canvas (e.g. drawText(text, font, paint)) while still permitting the current setters in paint (e.g. setTextSize, setFlags). R=bungeman@google.com, eae@chromium.org, fmalita@google.com, fmalita@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/245953003 git-svn-id: http://skia.googlecode.com/svn/trunk@14997 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert of setConfig -> setInfo ↵Gravatar commit-bot@chromium.org2014-05-30
| | | | | | | | | | | | | | (https://codereview.chromium.org/308683005/)" This reverts commit eecaea4148805834f223681f70b6488ceba12d09. R=robertphillips@google.com, scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/301283003 git-svn-id: http://skia.googlecode.com/svn/trunk@14989 2bbb7eff-a529-9590-31e7-b0007b416f81