aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* Build Android with SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG.Gravatar scroggo2014-07-09
| | | | | | | | | | | | | | | | | | | This flag will be used on Android when built for the framework, as well as when built for the WebView. Setting this flag for Android means our tests can fully test CanvasStateTest. Fix CanvasStateTest. It has bit-rotted since disabling SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG. Splitting off from https://codereview.chromium.org/372003002/ , as it seems self-contained. BUG=b/15693384 R=djsollen@google.com, reed@google.com, mtklein@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/375943003
* Revert "Remove ability for Release code to call getRefCnt() or getWeakRefCnt()."Gravatar Mike Klein2014-07-09
| | | | | | | | This reverts commit 4ae94ffce5ecf1b71cb5e295b68bf4ec9e697443. BUG=skia: Review URL: https://codereview.chromium.org/382523002
* Cleanup: Rename UnitTestTest.cpp to RTConfRegistryTest.cppGravatar tfarina2014-07-08
| | | | | | | | | | BUG=None TEST=make tests R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/374443002
* Goodbye GrEffectRef.Gravatar bsalomon2014-07-08
| | | | | | | | | | Also, reworked some var names and comments around SkShader::asNewEffect. R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/374923002
* Clean up SkImageFilter constructors.Gravatar senorblanco2014-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now that all creation of SkImageFilters goes through factory Create() methods, there's no real reason for the convenience constructors. Some SkImageFilter subclasses which actually have zero DAG-able inputs were passing NULL to the superclass constructor. This actually means 1 input, with a NULL value, not zero inputs. This becomes more relevant for the upcoming cache infrastructure, where this indicates that the filter will use its src input, where in fact some of these filters do not (they are image generators only). Limiting SkImageFilter to a single constructor resolves this ambiguity. Along the way, I removed all of the default parameters to the constructors, since the Create methods always call them with the full argument list. BUG=skia: R=reed@google.com Author: senorblanco@chromium.org Review URL: https://codereview.chromium.org/376953003
* Make GrDrawState and GrPaint take GrEffect* instead of GrEffectRef*.Gravatar bsalomon2014-07-08
| | | | | | | | | | | | | | Make Sk-effect virtuals produce GrEffect* rather than GrEffectRef* Make GrEffectRef a typedef for GrEffect. Committed: https://skia.googlesource.com/skia/+/2011fe9cdfa63b83489a146cea6a724cede352c8 R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/377503004
* Remove ability for Release code to call getRefCnt() or getWeakRefCnt().Gravatar mtklein2014-07-08
| | | | | | | | | | | | | | | | | These getRefCnt() methods are not thread safe, so Skia code should not be calling them. unique() is fine. SkDEBUG code (SkASSERTs) can still call getRefCnt() / getWeakRefCnt(). This adds tools/RefCntIs.{h,cpp}, which lets tests make their assertions in both debug and release modes. BUG=skia:2726 R=senorblanco@chromium.org, mtklein@google.com, reed@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/378643003
* Revert of Make GrDrawState and GrPaint take GrEffect* instead of ↵Gravatar reed2014-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | GrEffectRef*. (https://codereview.chromium.org/377503004/) Reason for revert: broke linux builders Original issue's description: > Make GrDrawState and GrPaint take GrEffect* instead of GrEffectRef*. > > Make Sk-effect virtuals produce GrEffect* rather than GrEffectRef* > > Make GrEffectRef a typedef for GrEffect. > > Committed: https://skia.googlesource.com/skia/+/2011fe9cdfa63b83489a146cea6a724cede352c8 R=robertphillips@google.com, bsalomon@google.com TBR=bsalomon@google.com, robertphillips@google.com NOTREECHECKS=true NOTRY=true Author: reed@google.com Review URL: https://codereview.chromium.org/372053003
* Make GrDrawState and GrPaint take GrEffect* instead of GrEffectRef*.Gravatar bsalomon2014-07-07
| | | | | | | | | | | | Make Sk-effect virtuals produce GrEffect* rather than GrEffectRef* Make GrEffectRef a typedef for GrEffect. R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/377503004
* Remove use of GrEffectRef from draw state and below.Gravatar bsalomon2014-07-07
| | | | | | | | R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/372773002
* Cleanup: Remove TestXCode project.Gravatar tfarina2014-07-07
| | | | | | | | | | | | | | GYP generates the project files for us now. $ GYP_GENERATORS=xcode ./gyp_skia BUG=None TEST=None R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/365263006
* Only you can prevent memory leaks.Gravatar mtklein2014-07-07
| | | | | | | | | | | | | | | SkPaint::setFoo() refs the foo, leaving the foo with a bonus ref unless you call ->unref(). Valgrind caught this: http://108.170.220.120:10117/builders/Test-Ubuntu12-ShuttleA-GTX550Ti-x86_64-Release-Valgrind/builds/317/steps/RunTests/logs/stdio BUG=skia: R=tomhudson@chromium.org, mtklein@google.com, tomhudson@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/377523002
* Linear-time implementation of willPlaybackBitmaps(), computed & cachedGravatar tomhudson2014-07-05
| | | | | | | | | | | | | on construction in SkPicture. Unit test. Template trickery thanks to mtklein@. BUG=skia:2702 R=mtklein@google.com, reed@android.com, reed@google.com, tomhudson@google.com, mtklein, reed Author: tomhudson@chromium.org Review URL: https://codereview.chromium.org/366443002
* Fix SkColorFilterImageFilter matrix optimization.Gravatar senorblanco2014-07-03
| | | | | | | | | | | | | The order of matrices passed to multiplication was wrong (apparently, this optimization was only being tested with matrices which commute). See Chrome bug http://crbug.com/378362 R=sugoi@chromium.org Author: senorblanco@chromium.org Review URL: https://codereview.chromium.org/371523002
* move SkChecksum and SkEmptyShader to privateGravatar reed2014-07-03
| | | | | | | | TBR=reed@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/366133002
* return early instead of crashing if fileData failsGravatar reed2014-07-02
| | | | | | | | | BUG=skia: R=krajcevski@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/362833004
* correctly plumb through explicit rowbytes for allocPixelsGravatar reed2014-07-01
| | | | | | | | | BUG=skia: R=caryclark@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/357073003
* Cleanup usage of GetResourcePath() after commit ↵Gravatar tfarina2014-07-01
| | | | | | | | | | | | | | | | | bcbc1788b478b1e54079318ad073e8490aa66fae. There was a clean up opportunity left over after https://skia.googlesource.com/skia/+/bcbc1788b478b1e54079318ad073e8490aa66fae, that could make use of the default parameter of GetResourcePath() function to make some call sites cleaner. We decided to make it in a separate CL to make reviewer's and author's life easier, so we could catch errors and/or mistakes easily. BUG=None TEST=make all && out/Debug/dm && out/Debug/SampleApp R=mtklein@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/351133003
* Rename SkPicturePlayback to SkPictureDataGravatar robertphillips2014-07-01
| | | | | | | | | | This is in preparation for splitting the playback portion of the new SkPictureData class into a new SkPicturePlayback class. R=reed@google.com, mtklein@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/362773002
* Fix SkTypeface::serialize() on Mac by properly indicating local fontsGravatar caseq2014-06-30
| | | | | | | | | | | | We used to always set isLocalStream to false in SkTypeface_Mac::onGetFontDescriptor(), which caused SkTypeface::serialize() to never actually serialize fonts. BUG=skia:2698 R=reed@google.com, bungeman@google.com Author: caseq@chromium.org Review URL: https://codereview.chromium.org/353993003
* stop calling SkCanvas::getDeviceGravatar reed2014-06-30
| | | | | | | | | BUG=skia: R=bsalomon@google.com, robertphillips@google.com, junov@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/355193006
* Begin atlasingGravatar robertphillips2014-06-30
| | | | | | | | | | | | | | | | | | | This CL makes it possible for pulled-forward-layers to be atlased. It currently has a couple glaring limitations (which is why it is disabled): 1) the atlased layers cannot be purged nor aged out 2) the texture backing the atlas is not pulled from (or returned to) the resource cache #1 is on hold until we have a recycling rectanizer A separate major limitation (the non-atlased layers aren't cached) is blocked until we can transmute entries in the resource cache from scratch to non-scratch while potentially preserving their contents. Committed: https://skia.googlesource.com/skia/+/55e61f0ef4e5c8c34ac107deaadc9b4ffef3111b R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/354533004
* SaveFlags be-goneGravatar Florin Malita2014-06-30
| | | | | | | | | | Remove the deprecated save(SaveFlags), willSave(SaveFlags) and all traces of kMatrix_SaveFlags/kClip_SaveFlag. BUG=skia:2297 R=mtklein@google.com, reed@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/340403003
* Revert of Begin atlasing (https://codereview.chromium.org/354533004/)Gravatar robertphillips2014-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reason for revert: Sigh Original issue's description: > Begin atlasing > > This CL makes it possible for pulled-forward-layers to be atlased. It currently has a couple glaring limitations (which is why it is disabled): > > 1) the atlased layers cannot be purged nor aged out > 2) the texture backing the atlas is not pulled from (or returned to) the resource cache > > #1 is on hold until we have a recycling rectanizer > > A separate major limitation (the non-atlased layers aren't cached) is blocked until we can transmute entries in the resource cache from scratch to non-scratch while potentially preserving their contents. > > Committed: https://skia.googlesource.com/skia/+/55e61f0ef4e5c8c34ac107deaadc9b4ffef3111b R=bsalomon@google.com TBR=bsalomon@google.com NOTREECHECKS=true NOTRY=true Author: robertphillips@google.com Review URL: https://codereview.chromium.org/359953002
* Begin atlasingGravatar robertphillips2014-06-29
| | | | | | | | | | | | | | | | | This CL makes it possible for pulled-forward-layers to be atlased. It currently has a couple glaring limitations (which is why it is disabled): 1) the atlased layers cannot be purged nor aged out 2) the texture backing the atlas is not pulled from (or returned to) the resource cache #1 is on hold until we have a recycling rectanizer A separate major limitation (the non-atlased layers aren't cached) is blocked until we can transmute entries in the resource cache from scratch to non-scratch while potentially preserving their contents. R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/354533004
* writepixels needs to bump genIDGravatar reed2014-06-27
| | | | | | | | TBR= Author: reed@google.com Review URL: https://codereview.chromium.org/352573005
* Deprecate SkPicture::clone().Gravatar mtklein2014-06-27
| | | | | | | | | | | | | | | | | | Chrome will need -DSK_SUPPORT_LEGACY_PICTURE_CLONE. This removes the modes from our tools that use clone(). No bots run these. DM used clone() in a way that we can just share the picture now. I plan to bring back the ability to test multithreaded picture rendering soon. BUG=skia:2378 R=robertphillips@google.com, mtklein@google.com, bsalomon@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/338633011
* Fix RRect tranform bugGravatar robertphillips2014-06-27
| | | | | | | | | | | When a RRect is an oval transforming the rectangle and the radii separately can result in a non-oval result (i.e., due to numerical issues some tiny straight edges may creep in). This CL remedies the situation by computing the new radii directly from the transformed rect. BUG=skia:2696 R=caryclark@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/354913004
* Add SSE4 optimization of S32A_Opaque_BlitrowGravatar henrik.smiding2014-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adds optimization of Skia S32A_Opaque_Blitrow blitter using SSE4.2 SIMD instruction set. Special case for when alpha is zero or opaque. Performance increase of 10%-400% compared to the existing SSE2 optimization (measured on Silvermont architecture). Noticeable in ~25 different skia bench subtests, especially in bitmap_8888_*, repeatTile_*, and morph_*. bitmap_8888_A - 100% faster bitmap_8888_A_source_transparent - 250% faster bitmap_8888_A_source_opaque - 25% faster bitmap_8888_A_scale_bicubic - 75% faster Signed-off-by: Henrik Smiding <henrik.smiding@intel.com> Committed: https://skia.googlesource.com/skia/+/e2527b147679b0c43019fae7d59cc3777d2d097e Committed: https://skia.googlesource.com/skia/+/b5c281e1e06af3be804309877de1dac6145686b9 R=reed@google.com, mtklein@google.com, tomhudson@google.com, djsollen@google.com, joakim.landberg@intel.com Author: henrik.smiding@intel.com Review URL: https://codereview.chromium.org/289473009
* add SkSurface::NewRasterDirectReleaseProcGravatar reed2014-06-27
| | | | | | | | | | | allows for lifetime control of pixel memory on raster surface BUG=skia: R=fmalita@google.com, bsalomon@google.com, fmalita@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/351373005
* remove unnecessary bitmapdevice referencesGravatar reed2014-06-27
| | | | | | | | TBR= Author: reed@google.com Review URL: https://codereview.chromium.org/354143004
* don't create explicit bitmapdevice when not neededGravatar reed2014-06-26
| | | | | | | | TBR= Author: reed@google.com Review URL: https://codereview.chromium.org/349213006
* 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