aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* Revert "Revert "change SkColorTable to be immutable""Gravatar reed@google.com2013-10-10
| | | | | | | | | | | | This reverts commit b8162cb840f4cb6002ef68d5ac775c6a122c52a9. Fixed was call-sites in benches that used the (now gone) setIsOpaque api. R=scroggo@google.com Review URL: https://codereview.chromium.org/26572006 git-svn-id: http://skia.googlecode.com/svn/trunk@11695 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change SkImageFilter's cropRect from SkIRect to a CropRect struct, ↵Gravatar senorblanco@chromium.org2013-10-10
| | | | | | | | | | | | | | containing an SkRect and flags indicating which parameters are set. NOTE: this will require SK_CROP_RECT_IS_INT=1 to be set in Chrome until Blink has been updated to use SkImageFilter::CropRect. Include https://codereview.chromium.org/26528002/ with the Skia roll. Note also that SK_CROP_RECT_IS_INT is a temporary measure until all call sites in Blink have been updated to use SkRect. R=reed@google.com Review URL: https://codereview.chromium.org/26371002 git-svn-id: http://skia.googlecode.com/svn/trunk@11692 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sketch of SK_ONCEGravatar mtklein@google.com2013-10-09
| | | | | | | | | BUG= R=bungeman@google.com Review URL: https://codereview.chromium.org/26563002 git-svn-id: http://skia.googlecode.com/svn/trunk@11674 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix valgrind uninitialized memory complaintGravatar robertphillips@google.com2013-10-09
| | | | | | | | https://codereview.chromium.org/26469003/ git-svn-id: http://skia.googlecode.com/svn/trunk@11664 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update valgrind suppressionsGravatar robertphillips@google.com2013-10-08
| | | | | | | | https://codereview.chromium.org/26465007/ git-svn-id: http://skia.googlecode.com/svn/trunk@11650 2bbb7eff-a529-9590-31e7-b0007b416f81
* Luminance-to-alpha color filter (SkLumaColorFilter).Gravatar commit-bot@chromium.org2013-10-07
| | | | | | | | | | | | | Adding a color filter luma implementation. The plan is to convert existing clients and then deprecate SkLumaXfermode. R=bsalomon@google.com, reed@google.com, robertphillips@google.com Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/25453004 git-svn-id: http://skia.googlecode.com/svn/trunk@11636 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-10-05
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11625 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add perspective support to SkMatrix44 initializers.Gravatar commit-bot@chromium.org2013-10-05
| | | | | | | | | | | | | | | | | | | | I noticed SkMatrix <-> SkMatrix44 conversions were dropping the perspective values on the floor. As we use SkMatrix44 heavily in Chromium, I'm concerned this missing code will cause a bug eventually. It should be correct to simply use the bottom row of the 4x4 matrix excluding the third column. Previously committed and reverted, second attempt with fix for incorrect use of SkMScalar/SkScalar. BUG= R=reed@google.com, caryclark@google.com Author: aelias@chromium.org Review URL: https://codereview.chromium.org/25484006 git-svn-id: http://skia.googlecode.com/svn/trunk@11624 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Add perspective support to SkMatrix44 initializers."Gravatar aelias@chromium.org2013-10-04
| | | | | | This reverts commit 93db1bcae0863feed8d00a61ae2cf72a90a0083c. git-svn-id: http://skia.googlecode.com/svn/trunk@11623 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add perspective support to SkMatrix44 initializers.Gravatar commit-bot@chromium.org2013-10-04
| | | | | | | | | | | | | | | | | I noticed SkMatrix <-> SkMatrix44 conversions were dropping the perspective values on the floor. As we use SkMatrix44 heavily in Chromium, I'm concerned this missing code will cause a bug eventually. It should be correct to simply use the bottom row of the 4x4 matrix excluding the third column. BUG= R=reed@google.com Author: aelias@chromium.org Review URL: https://codereview.chromium.org/25484006 git-svn-id: http://skia.googlecode.com/svn/trunk@11622 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use vertexless shaders when NVpr is availableGravatar commit-bot@chromium.org2013-10-04
| | | | | | | | | | | | | | | | Adds support for vertexless shaders and enables them when NV_path_rendering is available. This takes a GrGLFragmentOnlyShaderBuilder class, a GrGLTexGenEffectArray class, support for setting TexGen and the projection matrix in GrGpuGL, and code for setting the GL fixed function state where necessary. R=bsalomon@google.com, kkinnunen@nvidia.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/25846002 git-svn-id: http://skia.googlecode.com/svn/trunk@11620 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix narrowing warning errorGravatar halcanary@google.com2013-10-04
| | | | | | | | I was breaking build, by having a char instead of unsigned char. Review URL: https://codereview.chromium.org/25683012 git-svn-id: http://skia.googlecode.com/svn/trunk@11599 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make image decoding more fault resistant, less verbose.Gravatar halcanary@google.com2013-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change address what happens when a jpeg is partially downloaded before failing. Many browsers will render it anyway: we want Skia to do the same. The JpegTest takes a perfectly cromulent jpeg file and only passes into the ImageDecoder the first half of the image. We then verify that the image decoder returns a valid bitmap of the correct dimensions. We also fixed some png library errors, including issue 1691. Also, suppressed the majority of warnings from using libpng and libjpeg. By default, most warnings are *not* suppressed in debug mode. If you have a debug binary and wish to suppress warnings, set the following environment variables to true skia_images_png_suppressDecoderWarnings skia_images_jpeg_suppressDecoderWarnings or from within a program that links to Skia: #if defined(SK_DEBUG) #include "SkRTConf.h" SK_CONF_SET("images.jpeg.suppressDecoderWarnings", true); SK_CONF_SET("images.png.suppressDecoderWarnings", true); #endif I tested this, before (control) and after these changes (test), on 364,295 skps from the cluster telemetry. - number of errors+warnings in control = 2804 - number of errors+warnings fixed = 2283 - number of PNG verbosity fixed = 2152 - number of PNG error fixed = 4 - number of PNG segfault fixed = 3 - number of PNG errors changed to warnings = 62 - number of JPG verbosity fixed = 26 - number of JPG error fixed = 91 Not all errors and warning have been fixed. These numbers were generated using the find_bad_images_in_skps.py program. This program may be useful going forward for testing image-decoding libraries on skp files from the cluster telemetry. find_bad_images_in_skps.py depends on the test_image_decoder program, which simply executes the SkImageDecoder::DecodeFile function and uses its exit status to report success or failure. BUG=skia:1649 BUG=skia:1691 BUG=skia:1680 R=scroggo@google.com Review URL: https://codereview.chromium.org/24449003 git-svn-id: http://skia.googlecode.com/svn/trunk@11597 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use SkPicture::ExtractBitmap callback in pdf too, there is no need for a ↵Gravatar commit-bot@chromium.org2013-10-03
| | | | | | | | | | | | specialized function pointer for pdf only only to pass a rectangle, when we can use subseted bitmaps. R=scroggo@google.com, reed@google.com, vandebo@chromium.org, bsalomon@google.com Author: edisonn@google.com Review URL: https://codereview.chromium.org/25054002 git-svn-id: http://skia.googlecode.com/svn/trunk@11591 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-10-03
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11585 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make it explicit that some validate methods are debug onlyGravatar robertphillips@google.com2013-10-02
| | | | | | | | https://codereview.chromium.org/25716003/ git-svn-id: http://skia.googlecode.com/svn/trunk@11575 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sadly TSAN still reports this as a race, even when we're obviously writing theGravatar commit-bot@chromium.org2013-10-02
| | | | | | | | | | | | | same values. Initializing with the declaration should quiet it down. BUG= R=caryclark@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/25713004 git-svn-id: http://skia.googlecode.com/svn/trunk@11574 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix 10.6Gravatar caryclark@google.com2013-10-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11572 2bbb7eff-a529-9590-31e7-b0007b416f81
* path ops work in progressGravatar caryclark@google.com2013-10-02
| | | | | | | | | | | | make more skps work remove edit files BUG= Review URL: https://codereview.chromium.org/23542056 git-svn-id: http://skia.googlecode.com/svn/trunk@11570 2bbb7eff-a529-9590-31e7-b0007b416f81
* Writing to testName and reading its size isn't thread safe, TSAN reminds us.Gravatar commit-bot@chromium.org2013-10-01
| | | | | | | | | | | | | Guarding it into a no-op makes it safe. Looks like this is only used for debugging, presumably singlethreaded? BUG= R=caryclark@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/25366002 git-svn-id: http://skia.googlecode.com/svn/trunk@11562 2bbb7eff-a529-9590-31e7-b0007b416f81
* In skia_test.cc, atomics -> mutex.Gravatar commit-bot@chromium.org2013-10-01
| | | | | | | | | | | | | | | | | | | | | These guys are not heavily contended nor speed critical. No need for atomics, plus this makes tsan stop complaining (correctly) about reading fNextIndex unsafely in onEnd. I took a look at failCount/fFailCount, which I think is safely atomic and quite conveniently so: It's never read until all the threads which could possibly increment it have terminated (except for the one where it was created, obviously). We could guard it with a mutex too, but maybe we can let this one slide. BUG= R=bungeman@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/25357002 git-svn-id: http://skia.googlecode.com/svn/trunk@11561 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use explicitly-sized enums in GrGLProgramDesc::KeyHeaderGravatar commit-bot@chromium.org2013-10-01
| | | | | | | | | | | | | | Uses enums explicitly sized to 8 bits in GrGLProgramDesc::KeyHeader, instead of storing them as uint8_t values. This avoids the need to static_cast them. R=bsalomon@google.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/23875048 git-svn-id: http://skia.googlecode.com/svn/trunk@11560 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add an option on SkImageDecoder to skip writing 0s.Gravatar scroggo@google.com2013-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only implemented for PNG. Add a getter and setter, and sets the default to false in the constructor. Also copies the setting in copyFieldsToOther. Fix an indpendent bug where fDitherImage was not being copied in copyFieldsToOther. In SkScaledBitmapSampler::begin, consolidate the settings passed in by passing a const reference to the decoder. The decoder can be referenced for its settings of dither, unpremultiplied, and now skipping writing zeroes. Update callers to use the new API. In png decoder, rather than passing around a pointer to an initial read of getDitherImage, and potentially changing it, look at the field on the decoder itself, and modify it directly. This is a change in behavior - now if that same decoder is used to decode a different image, the dither setting has changed. I think this is okay because A) the typical use case is to use a new decoder for each decode, B) we do not make any promises that a decode does not change the decoder and C) it makes the code in SkScaledBitmapSampler much cleaner. In SkScaledBitmapScampler, add new row procs for skipping zeroes. Now that choosing the row proc has five dimensions (src config, dst config, dither, skip writing zeroes, unpremultiplied), use a new method: each src/dst combination has a function for choosing the right proc depending on the decoder. SkScaledBitmapScampler::RowProc is now public for convenience. Remove Sample_Gray_D8888_Unpremul, which is effectively no different from Sample_Gray_D8888. In cases where unpremultiplied was trivial, such as 565 and when sampling from gray, decoding may now succeed. Add a benchmark (currently disabled) for comparing the speed of skipping writing zeroes versus not skipping. For this particular image, which is mostly transparent pixels, normal decoding took about 3.6 milliseconds, while skipping zeroes in the decode took only about 2.5 milliseconds (this is on a Nexus 4). Presumably it would be slower on an image with a small amount of transparency, but there will be no slowdown for an image which reports that it has no transparency. In SkImageRef_ashmem, always skip writing zeroes, since ashmem memory is guaranteed to be initialized to 0. Add a flag to skip writing zeroes in skimage. Add a regression test for choosing the rowproc to ensure I did not change any behavior accidentally. BUG=skia:1661 R=reed@google.com Review URL: https://codereview.chromium.org/24269006 git-svn-id: http://skia.googlecode.com/svn/trunk@11558 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a buffered SkStream class.Gravatar scroggo@google.com2013-09-26
| | | | | | | | | | | | | This is used by Android to buffer an input stream which may not otherwise be able to rewind. Add a test for the new class. R=bungeman@google.com, mtklein@google.com, reed@google.com Review URL: https://codereview.chromium.org/23717055 git-svn-id: http://skia.googlecode.com/svn/trunk@11488 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkDivMod with a special case for ARM.Gravatar commit-bot@chromium.org2013-09-26
| | | | | | | | | | | BUG=skia:1663 R=djsollen@google.com, tomhudson@google.com, reed@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/24159009 git-svn-id: http://skia.googlecode.com/svn/trunk@11482 2bbb7eff-a529-9590-31e7-b0007b416f81
* We don't flatten or unflatten SkPaintOptionsAndroid. Reproduce and fix.Gravatar commit-bot@chromium.org2013-09-26
| | | | | | | | | | | BUG=skia:1625 R=djsollen@google.com, reed@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/24075010 git-svn-id: http://skia.googlecode.com/svn/trunk@11472 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add skia_tsan_build to match skia_asan_build and fix one example race.Gravatar bungeman@google.com2013-09-25
| | | | | | | | R=mtklein@google.com Review URL: https://codereview.chromium.org/24644003 git-svn-id: http://skia.googlecode.com/svn/trunk@11464 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change SkImageDecoders to take an SkStreamRewindable.Gravatar scroggo@google.com2013-09-25
| | | | | | | | | | | | | | | | | | | | Only affects factories, static functions that will use the factories, and subset decoding, which all require rewinding. The decoders themselves continue to take an SkStream. This is merely documentation stating which functions will possibly rewind the passed in SkStream. This is part of the general change to coordinate SkStreams with Android's streams, which don't necessarily support rewinding in all cases. Update callers to use SkStreamRewindable. BUG=skia:1572 R=bungeman@google.com, reed@google.com Review URL: https://codereview.chromium.org/23477009 git-svn-id: http://skia.googlecode.com/svn/trunk@11460 2bbb7eff-a529-9590-31e7-b0007b416f81
* Refactor PathTest.cpp test_isNestedRects and test_isRect.Gravatar bungeman@google.com2013-09-25
| | | | | | | | | | | The existing implementations make it difficult to add new tests and rely on non-local side effects. R=bsalomon@google.com Review URL: https://codereview.chromium.org/24502004 git-svn-id: http://skia.googlecode.com/svn/trunk@11455 2bbb7eff-a529-9590-31e7-b0007b416f81
* promote SkImage::AlphaType to SkAlphaTypeGravatar reed@google.com2013-09-20
| | | | | | | | | BUG= R=bsalomon@google.com Review URL: https://codereview.chromium.org/24130009 git-svn-id: http://skia.googlecode.com/svn/trunk@11421 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add sk_calloc. Remove SkMemory_stdlib, which seems unused.Gravatar mtklein@google.com2013-09-20
| | | | | | | | | | | I'm seeing basically no difference between malloc + bzero and calloc on my desktop, but on a Galaxy Nexus calloc is never slower, and significantly faster once the allocation size becomes large, both for allocation and for _reading_. BUG=skia:1662 R=reed@google.com Review URL: https://codereview.chromium.org/24251008 git-svn-id: http://skia.googlecode.com/svn/trunk@11414 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-09-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11411 2bbb7eff-a529-9590-31e7-b0007b416f81
* silence the error test to be a better citizenGravatar commit-bot@chromium.org2013-09-19
| | | | | | | | | | | BUG= R=caryclark@google.com, bsalomon@google.com, tfarina@chromium.org, mtklein@google.com Author: humper@google.com Review URL: https://chromiumcodereview.appspot.com/23481012 git-svn-id: http://skia.googlecode.com/svn/trunk@11409 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add an even more convenient way to declare tests, with example.Gravatar mtklein@google.com2013-09-19
| | | | | | | | | BUG= R=reed@google.com Review URL: https://codereview.chromium.org/23828008 git-svn-id: http://skia.googlecode.com/svn/trunk@11405 2bbb7eff-a529-9590-31e7-b0007b416f81
* expand alias fontname testGravatar reed@google.com2013-09-19
| | | | | | | | | BUG= R=bungeman@google.com Review URL: https://codereview.chromium.org/24198004 git-svn-id: http://skia.googlecode.com/svn/trunk@11393 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix build warning for unused functionGravatar djsollen@google.com2013-09-19
| | | | | | | | R=robertphillips@google.com Review URL: https://codereview.chromium.org/24240008 git-svn-id: http://skia.googlecode.com/svn/trunk@11382 2bbb7eff-a529-9590-31e7-b0007b416f81
* Disable broken test on AndroidGravatar djsollen@google.com2013-09-19
| | | | | | | | R=caryclark@google.com Review URL: https://codereview.chromium.org/23484057 git-svn-id: http://skia.googlecode.com/svn/trunk@11380 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update Android's FontHost to return NULL if familyName does not matchGravatar djsollen@google.com2013-09-19
| | | | | | | | R=scroggo@google.com, wangxianzhu@chromium.org Review URL: https://codereview.chromium.org/23601041 git-svn-id: http://skia.googlecode.com/svn/trunk@11377 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-09-19
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11375 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix fontconfig backend to only cache new fonts if their outName was uniqueGravatar reed@google.com2013-09-18
| | | | | | | | | BUG= R=bungeman@google.com Review URL: https://codereview.chromium.org/23710072 git-svn-id: http://skia.googlecode.com/svn/trunk@11364 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix printing of error messages in canvasstatetest.Gravatar commit-bot@chromium.org2013-09-18
| | | | | | | | | | R=scroggo@google.com, caryclark@google.com Author: djsollen@google.com Review URL: https://chromiumcodereview.appspot.com/23477067 git-svn-id: http://skia.googlecode.com/svn/trunk@11363 2bbb7eff-a529-9590-31e7-b0007b416f81
* pdf: write only ToUnicode mappings needed by the font, trimming anything out ↵Gravatar edisonn@google.com2013-09-18
| | | | | | | | | | of [firstChar, lastChar] interval. R=vandebo@chromium.org Review URL: https://codereview.chromium.org/23519006 git-svn-id: http://skia.googlecode.com/svn/trunk@11360 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r11342 (Add infrastructure for testing the debugger code) due to ↵Gravatar robertphillips@google.com2013-09-18
| | | | | | build breakages git-svn-id: http://skia.googlecode.com/svn/trunk@11343 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add infrastructure for testing the debugger code.Gravatar commit-bot@chromium.org2013-09-18
| | | | | | | | | | | | | | | This creates the necessarily files and GYP targets to start adding tests for the debugger code. There is currently one test added, more will be added once the infrastructure is in place. BUG= R=mtklein@google.com Author: dsinclair@chromium.org Review URL: https://chromiumcodereview.appspot.com/23589007 git-svn-id: http://skia.googlecode.com/svn/trunk@11342 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix Mac 10.6 DeviceLooperTest build error (this time with feeling)Gravatar robertphillips@google.com2013-09-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11338 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix for Mac10.6 compiler error on tests\DeviceLooperTest.cppGravatar robertphillips@google.com2013-09-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11337 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-09-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11336 2bbb7eff-a529-9590-31e7-b0007b416f81
* add missing fileGravatar reed@google.com2013-09-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11332 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-09-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11309 2bbb7eff-a529-9590-31e7-b0007b416f81
* Suppress test output.Gravatar scroggo@google.com2013-09-16
| | | | | | | | | | This output is for debugging purposes, and does not report an error. BUG=skia:1616 Review URL: https://codereview.chromium.org/24110003 git-svn-id: http://skia.googlecode.com/svn/trunk@11292 2bbb7eff-a529-9590-31e7-b0007b416f81