aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* Move npot resizing out of GrContext and simplify GrContext texture functions.Gravatar bsalomon2015-02-02
| | | | | | | | Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54 Committed: https://skia.googlesource.com/skia/+/6c96672491b04cb782bce8fee778124df66524a0 Review URL: https://codereview.chromium.org/882223003
* Add missing SK_OVERRIDEGravatar rmistry2015-02-02
| | | | | | | | | | Tested by running on clang head + ubuntu 14.04: GYP_DEFINES=”skia_gpu=0 skia_warnings_as_errors=1" tools/xsan_build thread dm BUILDTYPE=Release out/Release/dm -v BUG=skia:3386 Review URL: https://codereview.chromium.org/894833002
* Revert of Move npot resizing out of GrContext and simplify GrContext texture ↵Gravatar bsalomon2015-01-31
| | | | | | | | | | | | | | | | | | | | | functions. (patchset #10 id:200001 of https://codereview.chromium.org/882223003/) Reason for revert: perf fix didn't fix the cr webgl conformance tests Original issue's description: > Move npot resizing out of GrContext and simplify GrContext texture functions. > > Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54 > > Committed: https://skia.googlesource.com/skia/+/6c96672491b04cb782bce8fee778124df66524a0 TBR=robertphillips@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/887303002
* Move npot resizing out of GrContext and simplify GrContext texture functions.Gravatar bsalomon2015-01-31
| | | | | | Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54 Review URL: https://codereview.chromium.org/882223003
* Revert of Move npot resizing out of GrContext and simplify GrContext texture ↵Gravatar fmalita2015-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | functions. (patchset #9 id:160001 of https://codereview.chromium.org/882223003/) Reason for revert: webGL conformance failures: WebglConformance.conformance_textures_tex_image_and_sub_image_2d_with_video WebglConformance.conformance_textures_texture_npot_video https://codereview.chromium.org/892773003/ http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/29272 Original issue's description: > Move npot resizing out of GrContext and simplify GrContext texture functions. > > Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54 TBR=robertphillips@google.com,bsalomon@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/868233005
* Update dump code in FontConfigParser test.Gravatar bungeman2015-01-30
| | | | | | | This code is still quite useful for debugging, but has bit rotted. Update to match current structure of code. Review URL: https://codereview.chromium.org/890073002
* Move npot resizing out of GrContext and simplify GrContext texture functions.Gravatar bsalomon2015-01-30
| | | | Review URL: https://codereview.chromium.org/882223003
* Make SkWriter32::snapshotAsData() a dumb copy.Gravatar mtklein2015-01-29
| | | | | | | | | SkWriter32::snapshotAsData() is no longer performance critical. It's only used when we're serializing to disk. BUG=skia:2289 Review URL: https://codereview.chromium.org/875403005
* Remove SkProxyCanvas.Gravatar scroggo2015-01-29
| | | | | | | | | | | | | | SkProxyCanvas is redundant with SkNWayCanvas, and means another class we have to keep in sync with the SkCanvas interface. Remove tests which use an SkProxyCanvas. Requires a change to chromium. BUG=skia:3279 BUG=skia:500 Review URL: https://codereview.chromium.org/886813002
* fix parsing SVG strings to paths with comma delimitersGravatar caryclark2015-01-29
| | | | | | | BUG=skia:583 R=reed@google.com Review URL: https://codereview.chromium.org/885103002
* add more checks for computing clamp counts, remove dead codeGravatar reed2015-01-28
| | | | | | BUG=448299 Review URL: https://codereview.chromium.org/886473003
* SkTypeface to use SkStreamAsset.Gravatar bungeman2015-01-27
| | | | | | | SkTypeface already requires typeface streams to support SkStreamAsset in practice, and in practice all users are already supplying them. Review URL: https://codereview.chromium.org/869763002
* Alter gpu vetoGravatar robertphillips2015-01-26
| | | | | | | | | | | | | | | | This CL unifies the treatment of the dashed and concave paths. Before: TP 28 FP 15 TN 8 FN 3 IND 3 After: TP 28 FP 18 TN 7 FN 2 IND 2 One of the TrueNegatives that became a FalsePositive was the motivation use case (the Chromium busy spinner). Committed: https://skia.googlesource.com/skia/+/87a6a8e18c7d5bbc94f478b44c53dc0e0549f927 Review URL: https://codereview.chromium.org/875913002
* Fold alpha to the inner savelayer in savelayer-savelayer-restore patternsGravatar kkinnunen2015-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | Fold alpha to the inner savelayer in savelayer-savelayer-restore patterns such as this: SaveLayer (non-opaque) Save ClipRect SaveLayer Restore Restore Restore Current blink generates these for example for SVG content such as this: <path style="opacity:0.5 filter:url(#blur_filter)"/> The outer save layer is due to the opacity and the inner one is due to blur filter being implemented with picture image filter. Reduces layers in desk_carsvg.skp testcase from 115 to 78. BUG=skia:3119 Review URL: https://codereview.chromium.org/835973005
* Don't leak image in Surface test.Gravatar mtklein2015-01-24
| | | | | | | | | | | | | | | | | | | | | | ==7023== 5,056 (896 direct, 4,160 indirect) bytes in 8 blocks are definitely lost in loss record 947 of 2,656 ==7023== at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==7023== by 0x82CB99: SkNewImageFromBitmapTexture(SkBitmap const&, int, SkSurface::Budgeted) (SkImage_Gpu.cpp:64) ==7023== by 0x81A1CF: SkSurface_Gpu::onNewImageSnapshot(SkSurface::Budgeted) (SkSurface_Gpu.cpp:50) ==7023== by 0x694F9D: SkSurface::newImageSnapshot(SkSurface::Budgeted) (SkSurface_Base.h:92) ==7023== by 0x55EA7C: test_Surface(skiatest::Reporter*, GrContextFactory*) (SurfaceTest.cpp:485) ==7023== by 0x407CB2: run_test(skiatest::Test*) (DM.cpp:399) ==7023== by 0x408382: run_enclave_and_gpu_tests(SkTArray<Task, false>*) (DM.cpp:411) ==7023== by 0x68B71E: SkTaskGroup::wait() (SkTaskGroup.cpp:67) ==7023== by 0x40934E: dm_main() (DM.cpp:455) ==7023== by 0x409483: main (DM.cpp:477) http://build.chromium.org/p/client.skia/builders/Test-Ubuntu12-ShuttleA-GTX550Ti-x86_64-Release-Valgrind/builds/276/steps/dm/logs/stdio TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/872183002
* a typo in SkResourceCacheTestGravatar yunchao.he2015-01-23
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/868613002
* Fix the speeling of "purgeable" in Gr codeGravatar bsalomon2015-01-23
| | | | | | TBR=robertphillips@google.com Review URL: https://codereview.chromium.org/874693002
* Cleanup SkPDFObject::emit*Gravatar halcanary2015-01-23
| | | | Review URL: https://codereview.chromium.org/869783003
* Take budgeted param when snapping new image.Gravatar bsalomon2015-01-23
| | | | Review URL: https://codereview.chromium.org/872543002
* check for too-large rowBytesGravatar reed2015-01-23
| | | | | | BUG=446164 Review URL: https://codereview.chromium.org/871993003
* Allow unbudgeted resources to be recycled by the cache as scratch.Gravatar bsalomon2015-01-23
| | | | Review URL: https://codereview.chromium.org/870743002
* Remove GrBinHashKeyGravatar bsalomon2015-01-23
| | | | Review URL: https://codereview.chromium.org/861323002
* minor readability / refactorsGravatar mtklein2015-01-23
| | | | | | | | | | | | I have been hacking at this test trying to understand why the N5 is still sometimes crashy (it seems, less but not zero now). No luck so far. But, while I've been reading and hacking at it, I think I've made a few small improvements, mostly to readability. BUG=skia: Review URL: https://codereview.chromium.org/870803002
* Add specialized content key class for resources.Gravatar bsalomon2015-01-23
| | | | Review URL: https://codereview.chromium.org/858123002
* Move FP texture test buffers to heap.Gravatar mtklein2015-01-22
| | | | | | | | | | | | | | | | | | | | | | | This is a speculative fix for the crashing N5 bots. It looks like the bots are always failing in or around FloatingPointTextureTest. It looks like sometimes they're hitting a SIGBUS, which I suspect is stack overflow. FloatingPointTextureTest allocates ~320K on the stack, which may be too much. This CL moves those buffers to the heap. For consistency I did the same with the half-float tests, though they're only using ~1/8th the stack. It looks like sometimes the bots are failing to malloc. I don't understand that, and this CL doesn't address that directly. But it's possible this is still a stack overflow, just trashing RAM and causing arbitrary mayhem instead of a SIGBUS. I have no idea why this is a problem only on the N5. I have been unable to reproduce this locally, neither with a K N5 nor an L N5, but the bots are pretty reliable. NOTREECHECKS=true BUG=skia: Review URL: https://codereview.chromium.org/871623002
* Rename GrOptDrawState to GrPipeline and GrDrawState to GrPipelineBuilderGravatar egdaniel2015-01-22
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/858343002
* remove more dead codeGravatar reed2015-01-22
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/865873003
* remove (unused) GatherPixelRefsGravatar reed2015-01-22
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/869463002
* Make SkStream *not* ref counted.Gravatar scroggo2015-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkStream is a stateful object, so it does not make sense for it to have multiple owners. Make SkStream inherit directly from SkNoncopyable. Update methods which previously called SkStream::ref() (e.g. SkImageDecoder::buildTileIndex() and SkFrontBufferedStream::Create(), which required the existing owners to call SkStream::unref()) to take ownership of their SkStream parameters and delete when done (including on failure). Switch all SkAutoTUnref<SkStream>s to SkAutoTDelete<SkStream>s. In some cases this means heap allocating streams that were previously stack allocated. Respect ownership rules of SkTypeface::CreateFromStream() and SkImageDecoder::buildTileIndex(). Update the comments for exceptional methods which do not affect the ownership of their SkStream parameters (e.g. SkPicture::CreateFromStream() and SkTypeface::Deserialize()) to be explicit about ownership. Remove test_stream_life, which tested that buildTileIndex() behaved correctly when SkStream was a ref counted object. The test does not make sense now that it is not. In SkPDFStream, remove the SkMemoryStream member. Instead of using it, create a new SkMemoryStream to pass to fDataStream (which is now an SkAutoTDelete). Make other pdf rasterizers behave like SkPDFDocumentToBitmap. SkPDFDocumentToBitmap delete the SkStream, so do the same in the following pdf rasterizers: SkPopplerRasterizePDF SkNativeRasterizePDF SkNoRasterizePDF Requires a change to Android, which currently treats SkStreams as ref counted objects. Review URL: https://codereview.chromium.org/849103004
* remove drawtypeGravatar joshualitt2015-01-21
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/862933005
* remove drawType from optStateGravatar joshualitt2015-01-21
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/864853002
* Reland https://codereview.chromium.org/860333002 with fix for test failures.Gravatar bsalomon2015-01-21
| | | | | | | | | | Revert "Revert of Make GrScratchKey memory buffer correct size on copy (patchset #1 id:1 of https://codereview.chromium.org/860333002/)" This reverts commit 988018c817f341c0ce09297b7ba5ba60ba76eba9. BUG=skia: Review URL: https://codereview.chromium.org/863983003
* Revert of Make GrScratchKey memory buffer correct size on copy (patchset #1 ↵Gravatar mtklein2015-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:1 of https://codereview.chromium.org/860333002/) Reason for revert: Our Valgrind bot just spewed out a weird error. I don't know if it's related, but it looks at least like one of the stacks was in the right area, so I'm going to revert this precautionarily. Sorry if this is a false positive. http://build.chromium.org/p/client.skia/builders/Test-Ubuntu12-ShuttleA-GTX550Ti-x86_64-Release-Valgrind/builds/266/steps/dm/logs/stdio Original issue's description: > Make GrScratchKey memory buffer correct size on copy > > Scratch key memory buffer of a copy of a key was too big. The (new) copy > was N times uint32_t bytes instead of N bytes. > > Adds few tests to resource cache. These tests would not catch the too > big buffer. This is just a precaution for too small buffers. The main > idea of the test change is that the scratch key should contain some > information, so that lookup with a scratch key can also return no > match. Otherwise testing of scratch lookup result is not indicative of > correct code (eg. no-information scratch key will always match). > > Committed: https://skia.googlesource.com/skia/+/711ef4831363fb8cbdf061dc2c36c65b13c0ccf2 TBR=bsalomon@google.com,kkinnunen@nvidia.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/864833003
* Make GrScratchKey memory buffer correct size on copyGravatar kkinnunen2015-01-21
| | | | | | | | | | | | | | Scratch key memory buffer of a copy of a key was too big. The (new) copy was N times uint32_t bytes instead of N bytes. Adds few tests to resource cache. These tests would not catch the too big buffer. This is just a precaution for too small buffers. The main idea of the test change is that the scratch key should contain some information, so that lookup with a scratch key can also return no match. Otherwise testing of scratch lookup result is not indicative of correct code (eg. no-information scratch key will always match). Review URL: https://codereview.chromium.org/860333002
* remove dead SkPersp macrosGravatar reed2015-01-20
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/864713002
* 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
* BUG=skia:Gravatar joshualitt2015-01-20
| | | | Review URL: https://codereview.chromium.org/815643005
* Remove willReadDst from GrFragmentProcessor.Gravatar egdaniel2015-01-20
| | | | | | | | | | Since only XP's can read dst now, there is no reason to have this query on GrFP. This also triggered a chain reaction of cleaning up/removing unnecessary code elsewhere. BUG=skia: Review URL: https://codereview.chromium.org/851143003
* YUV planes cacheGravatar sugoi2015-01-19
| | | | | | | | | | - Added new classes to contain YUV planes of memory, along with the associated data. - Used these classes in load_yuv_texture() to enable YUV planes caching - Added a unit test for the new cache BUG=450021 Review URL: https://codereview.chromium.org/851273003
* Require budget decision when creating a RenderTarget SkSurface.Gravatar bsalomon2015-01-16
| | | | | | | | | Restructure SkGpuDevice creation: *SkSurfaceProps are optional. *Use SkSurfaceProps to communicate DF text rather than a flag. *Tell SkGpuDevice::Create whether RT comes from cache or not. Review URL: https://codereview.chromium.org/848903004
* new files for pathops geometric intersectionGravatar caryclark2015-01-16
| | | | | | | | | | There's no gyp references to these new files, so this should only have the effect of reducing the size of the commit that turns this code on. TBR= Review URL: https://codereview.chromium.org/853223002
* Fold alpha to the draw in savelayer-draw-restore patterns with non-opaque drawGravatar kkinnunen2015-01-16
| | | | | | | | | | | | | | | | Fold alpha of a save layer call to the subsequent draw call paint, even when the draw call paint color is already non-opaque. Comparing the difference of the unoptimized and the optimized call pattern with all (layer alpha, draw alpha) combinations, this produces off-by-one pixels ~50% of the time. Reduces layers of current desk_carsvg.skp (recorded with cross-process picture image filters allowed) from 122 to 115. BUG=skia:3119 Review URL: https://codereview.chromium.org/840483005
* Why are we afraid of saveLayer() bounds?Gravatar mtklein2015-01-15
| | | | | | | | | They're only hints. We can ignore them in this optimization. My only hesitation is that this pattern doesn't seem to happen in our .skps. BUG=skia: Review URL: https://codereview.chromium.org/849243002
* Use device-space stroke width for SkDraw::drawRect() quick-rejectGravatar fmalita2015-01-15
| | | | | | | | | | The stroke width needs to be CTM-adjusted when applied to device space rects. BUG=skia:3313 R=reed@google.com Review URL: https://codereview.chromium.org/801353008
* Make uncached textures uncached from the get go.Gravatar bsalomon2015-01-14
| | | | | | | | This avoids the problem of a newly created uncached texture causing a purge of cached resources. BUG=chromium:445885 Review URL: https://codereview.chromium.org/846303002
* DM can see into src/gpu. No need for relative include.Gravatar mtklein2015-01-14
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/853613004
* Remove self-assignment in a test.Gravatar mtklein2015-01-14
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/853723002
* More changes to bring together path / geo procsGravatar joshualitt2015-01-14
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/820783005
* namespace {} trick for SK_DECLARE_STATIC_ONCEGravatar mtklein2015-01-13
| | | | | | | | | | | | | | | Like all our other SK_DECLARE_STATIC_*, it's usually not a thread-safe thing to put inside a function. Adding namespace {} prevents that syntactically. Needs https://codereview.chromium.org/841263004/ to land first. BUG=chromium:447890 No public API changes. TBR=reed@google.com Review URL: https://codereview.chromium.org/806473006
* Simplify SkInstCntGravatar mtklein2015-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code requires fewer macros to use it (just one), has less code in macro definitions, and has simpler synchronization code (just atomic ints, no SkOnce, no SkMutex, etc.) A minor downside, we lose indentation and reverse-ordering in the final report: Leaked SkRefCntBase: 7 Leaked SkFontMgr: 1 Leaked SkWeakRefCnt: 1 Leaked SkTypeface: 1 Leaked SkFlattenable: 3 Leaked SkXfermode: 3 Leaked SkPathRef: 1 Leaked SkPixelRef: 1 Leaked SkMallocPixelRef: 1 becomes Leaked SkXfermode: 3 Leaked SkMallocPixelRef: 1 Leaked SkPixelRef: 1 Leaked SkPathRef: 1 Leaked SkFlattenable: 3 Leaked SkTypeface: 1 Leaked SkWeakRefCnt: 1 Leaked SkFontMgr: 1 Leaked SkRefCntBase: 7 This is motivated by wanting to land https://codereview.chromium.org/806473006/, which makes sure all static use of SkOnce are in global scope. The current implementation of SkInstCnt uses them in function scope, which isn't safe. BUG=skia: No public API changes. TBR=reed@google.com Review URL: https://codereview.chromium.org/841263004