aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAge
* SkPDF: remove SK_NO_FLATE & dead code in SkPDFStreamGravatar halcanary2015-03-31
| | | | | | | | | | | | SkPDFStream copy constructor SkPDFStream Substitute mechanism SkPDFStream::setData(NULL); SkPDFStream SK_NO_FLATE logic BUG=skia:3585 TBR=bsalomon@google.com,reed@google.com Review URL: https://codereview.chromium.org/1041183002
* back to Sk4f for SkPMColorGravatar mtklein2015-03-31
| | | | | | | | | #floats BUG=skia: BUG=skia:3592 Review URL: https://codereview.chromium.org/1047823002
* Refactor Sk2x<T> + Sk4x<T> into SkNf<N,T> and SkNi<N,T>Gravatar mtklein2015-03-30
| | | | | | | | | | | | | | | | | | | | | The primary feature this delivers is SkNf and SkNd for arbitrary power-of-two N. Non-specialized types or types larger than 128 bits should now Just Work (and we can drop in a specialization to make them faster). Sk4s is now just a typedef for SkNf<4, SkScalar>; Sk4d is SkNf<4, double>, Sk2f SkNf<2, float>, etc. This also makes implementing new specializations easier and more encapsulated. We're now using template specialization, which means the specialized versions don't have to leak out so much from SkNx_sse.h and SkNx_neon.h. This design leaves us room to grow up, e.g to SkNf<8, SkScalar> == Sk8s, and to grown down too, to things like SkNi<8, uint16_t> == Sk8h. To simplify things, I've stripped away most APIs (swizzles, casts, reinterpret_casts) that no one's using yet. I will happily add them back if they seem useful. You shouldn't feel bad about using any of the typedef Sk4s, Sk4f, Sk4d, Sk2s, Sk2f, Sk2d, Sk4i, etc. Here's how you should feel: - Sk4f, Sk4s, Sk2d: feel awesome - Sk2f, Sk2s, Sk4d: feel pretty good No public API changes. TBR=reed@google.com BUG=skia:3592 Review URL: https://codereview.chromium.org/1048593002
* use Sk4f for matrix mathGravatar reed2015-03-29
| | | | | | | | | Need to land SK_SUPPORT_LEGACY_SCALAR_MAPPOINTS in chrome to suppress Affine version which causes slight differences (which will need to be rebaselined) BUG=skia: Review URL: https://codereview.chromium.org/1045493002
* SkCodec: add wbmp classGravatar halcanary2015-03-27
| | | | Review URL: https://codereview.chromium.org/1006583005
* impl SkConvertQuadToCubic w/ Sk2sGravatar reed2015-03-26
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1041573002
* Revert of Make the canvas draw looper setup update the canvas save count ↵Gravatar reed2015-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #1 id:1 of https://codereview.chromium.org/1034033004/) Reason for revert: makes internalSave and internalSaveLayer inconsistent. Need to find a different solution. Original issue's description: > Make the canvas draw looper setup update the canvas save count > > Image filter in a paint would leave save count in wrong state > for normal draws. This could be observed through the canvas > references during the draw call. An example of this is > inspecting the canvas during a draw looper. > > patch from issue 993863002 at patchset 20001 (http://crrev.com/993863002#ps20001) > > BUG=skia: > TBR=kkinnunen@nvidia.com > > Committed: https://skia.googlesource.com/skia/+/fd3a91e1fc4de69611b5297f624a1cd65db4ced1 TBR=kkinnunen@nvidia.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1037653004
* Make the canvas draw looper setup update the canvas save countGravatar reed2015-03-26
| | | | | | | | | | | | | | Image filter in a paint would leave save count in wrong state for normal draws. This could be observed through the canvas references during the draw call. An example of this is inspecting the canvas during a draw looper. patch from issue 993863002 at patchset 20001 (http://crrev.com/993863002#ps20001) BUG=skia: TBR=kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/1034033004
* SkPMFloat::trunc()Gravatar mtklein2015-03-26
| | | | | | | | | | | | | Add and test trunc(), which is what get() used to be before rounding. Using trunc() is a ~40% speedup on our linear gradient bench. #neon #floats BUG=skia:3592 #n5 #n9 CQ_INCLUDE_TRYBOTS=client.skia.android:Test-Android-Nexus5-Adreno330-Arm7-Debug-Trybot;client.skia.android:Test-Android-Nexus9-TegraK1-Arm64-Release-Trybot Review URL: https://codereview.chromium.org/1032243002
* use new faster/vector impl for chopping conicsGravatar reed2015-03-26
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1035943002
* cumulative pathops patchGravatar caryclark2015-03-26
| | | | | | | | | | | | | | | | | | | | | Replace the implicit curve intersection with a geometric curve intersection. The implicit intersection proved mathematically unstable and took a long time to zero in on an answer. Use pointers instead of indices to refer to parts of curves. Indices required awkward renumbering. Unify t and point values so that small intervals can be eliminated in one pass. Break cubics up front to eliminate loops and cusps. Make the Simplify and Op code more regular and eliminate arbitrary differences. Add a builder that takes an array of paths and operators. Delete unused code. BUG=skia:3588 R=reed@google.com Review URL: https://codereview.chromium.org/1037573004
* remove slower scalar code in favor of vectorsGravatar reed2015-03-26
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1001833006
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* Update 4-at-a-time APIs.Gravatar mtklein2015-03-25
| | | | | | | | | | | There is no reason to require the 4 SkPMFloats (registers) to be adjacent. The only potential win in loads and stores comes from the SkPMColors being adjacent. Makes no difference to existing bench. BUG=skia: Review URL: https://codereview.chromium.org/1035583002
* SkPDF SkPDFObject::addResources signature simplifiedGravatar halcanary2015-03-25
| | | | | | | | | | - SkPDFcatalog keeps a ordered list of object pointers - Elimiante SkTSet template class - SkPDFObject::addResources signature changes BUG=skia:3585 Review URL: https://codereview.chromium.org/1038523004
* SKPDF: refactor pdfcatalog and pdfdocumentGravatar halcanary2015-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkPDFCatalog: - remove first-page-specific code (no longer needed, never used) (e.g. addObject()). - Make use of SkHashMap for lookups (simplifies code). - inline all small methods - emitXrefTable moved to SkPDFDocument.cpp - no longer store offsets in this data structure (moved to SkPDFDocument.cpp) - setFileOffset gone. - own substitute refs directly. SkPDFDocument::EmitPDF() - All sites that call into SkPDFCatalog modified. - catalog.addObject only called in a single place, after the resouceSet is built - offsets moved to local array. SkPDFPage: - finalizePage no longer deals with SkPDFCatalog or resource sets. - GeneratePageTree no longer deals with SkPDFCatalog SkPDFObjRef - emitObject respects the substitution map Unit Tests: - respect SkPDFCatalog::addObject signature change. SkTHash: - #include SkChecksum for SkGoodHash - Copyright notice added Review URL: https://codereview.chromium.org/1033543002
* SkChopCubicAt2 using Sk2s -- 2x fasterGravatar reed2015-03-24
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1036753002
* SkPDF: unit test cleanupGravatar halcanary2015-03-24
| | | | | | BUG=skia:3585 Review URL: https://codereview.chromium.org/1033833002
* Revert of pathops version two (patchset #16 id:150001 of ↵Gravatar reed2015-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1002693002/) Reason for revert: ASAN investigation Original issue's description: > pathops version two > > R=reed@google.com > > marked 'no commit' to attempt to get trybots to run > > TBR=reed@google.com > > Committed: https://skia.googlesource.com/skia/+/ccec0f958ffc71a9986d236bc2eb335cb2111119 TBR=caryclark@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1029993002
* Revert of remove obsolete tests (patchset #1 id:1 of ↵Gravatar caryclark2015-03-24
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1030883002/) Reason for revert: working on asan fix Original issue's description: > remove obsolete tests > > remove tests that are breaking the build -- uninitialized memory > > TBR=reed > > Committed: https://skia.googlesource.com/skia/+/e02c944e97ad6a3b8befb1f4f784919767941ba6 TBR=reed@android.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1036633002
* Revert of fix destructor order to fix build (patchset #1 id:1 of ↵Gravatar caryclark2015-03-24
| | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1033703002/) Reason for revert: working on asan fix Original issue's description: > fix destructor order to fix build > > TBR=reed > > Committed: https://skia.googlesource.com/skia/+/c207f9b2e8d6fb5386197fa8a8d258d2c4603418 TBR=reed@android.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1033803002
* Go back to storeAligned / LoadAligned for SkPMFloat <->Sk4f.Gravatar mtklein2015-03-24
| | | | | | | | | | This seems to fix the miscompilation bug on ARM64 / Release / GCC 4.9. We switched this over originally for perf issues with NEON, but I can't see any now. Will keep an eye out. BUG=skia:3570 Review URL: https://codereview.chromium.org/1026403002
* fix destructor order to fix buildGravatar caryclark2015-03-24
| | | | | | TBR=reed Review URL: https://codereview.chromium.org/1033703002
* remove obsolete testsGravatar caryclark2015-03-24
| | | | | | | | remove tests that are breaking the build -- uninitialized memory TBR=reed Review URL: https://codereview.chromium.org/1030883002
* pathops version twoGravatar caryclark2015-03-24
| | | | | | | | | | R=reed@google.com marked 'no commit' to attempt to get trybots to run TBR=reed@google.com Review URL: https://codereview.chromium.org/1002693002
* aacc + bbddGravatar mtklein2015-03-24
| | | | | | | | | | | | | | SkMatrix::mapPts() using aacc/bbdd was always worse than using badc(): - On Intel, it was faster than exisiting swizzle, but badc() is 10% faster still (one pshufd instead of two). - On ARM, existing swizzle < badc() < aacc()+bbdd(), even though aacc() then bbdd() is really a single vtrn instruction. I will revert SkMatrix.cpp before submitting. Just thought you might like to look. Will think more and try to gear up Instruments on ARM. BUG=skia: Review URL: https://codereview.chromium.org/1012573003
* Start fresh on swizzlesGravatar mtklein2015-03-23
| | | | | | | | | This removes all the existing Sk4x swizzles and adds badc(), which is both fast on all implementations and currently useful. BUG=skia: Review URL: https://codereview.chromium.org/997353005
* Replace _mm_cvtps_epi32(x) with _mm_cvttps_epi32(_mm_add_ps(0.5f), x).Gravatar mtklein2015-03-23
| | | | | | | | | | | | | We don't have control over which way _mm_cvtps_epi32 rounds. - This makes the SSE SkPMFloat rounding consistent with _neon and _none. - Sk4f::cast<Sk4i>() is closer to (int)float's behavior. (Correct when >=0). Add tests that would fail at head. BUG=skia: Review URL: https://codereview.chromium.org/1029163002
* remove meaningless matrix benches, add mapPts() and add new benchesGravatar reed2015-03-23
| | | | | | | | | | mapPts definitely faster than mapPoints (identity and perspective same speed). Up to 3x for large values of N. cloned from https://codereview.chromium.org/1031443002/ BUG=skia: Review URL: https://codereview.chromium.org/1030653002
* Preserve texture compression when saving a revised skp from debuggerGravatar robertphillips2015-03-23
| | | | | | Without this CL, saving a revised skp out the debugger can greatly expand the memory it requires. Review URL: https://codereview.chromium.org/1020103005
* Do not playback pending commands for full deferred canvas writePixelsGravatar kkinnunen2015-03-23
| | | | | | | | | Do not playback pending commands for full deferred canvas writePixels. Changes the test to catch cases where discard is done without a snapshot. Review URL: https://codereview.chromium.org/939103002
* Some usability ideas around SkTHash.Gravatar mtklein2015-03-20
| | | | | | | | | | | | | | - By default, use new SkGoodHash to hash keys, which is: * for 4 byte values, use SkChecksum::Mix, * for SkStrings, use SkChecksum::Murmur3 on the data, * for other structs, shallow hash the struct with Murmur3. - Expand SkChecksum::Murmur3 to support non-4-byte-aligned data. - Add const foreach() methods. - Have foreach() take a functor, which allows lambdas. BUG=skia: Review URL: https://codereview.chromium.org/1021033002
* use Sk2s for conicsGravatar reed2015-03-20
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1025033002
* Sk2x::invert() and Sk2x::approxInvert()Gravatar mtklein2015-03-20
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1024993002
* Hack around skia:3570 for now.Gravatar mtklein2015-03-20
| | | | | | BUG=skia:3570 Review URL: https://codereview.chromium.org/1021353002
* Add divide to Sk2x, use native vdiv and vsqrt on ARM 64.Gravatar mtklein2015-03-20
| | | | | | | | | | Tests pass on N7 + N9. BUG=skia: CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.7-Clang-Arm7-Debug-iOS-Trybot,Build-Ubuntu-GCC-Arm64-Release-Android-Trybot Review URL: https://codereview.chromium.org/1027753003
* Allow negative error for Sk4f::sqrt() test.Gravatar mtklein2015-03-20
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1028743002
* Sk2x/Sk4x: add negate(), operator -()Gravatar mtklein2015-03-20
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1027783002
* Move SkMatrixImageFilter into core, and add a factory fn for it.Gravatar senorblanco2015-03-20
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1011273003
* use Sk2s for EvalQuadTangent and ChopQuadAtGravatar reed2015-03-20
| | | | | | | | cloned from https://codereview.chromium.org/1026633002/ BUG=skia: Review URL: https://codereview.chromium.org/1024873003
* operator overloads for Sk4x, use them all where possibleGravatar mtklein2015-03-20
| | | | | | | BUG=skia: NOTRY=true Review URL: https://codereview.chromium.org/1024633003
* add SkMatrix::decomposeScaleGravatar reed2015-03-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1006173005
* Try out operator overloads for Sk2x.Gravatar mtklein2015-03-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1024473005
* Port to real Sk2f.Gravatar mtklein2015-03-19
| | | | | | | | | | | The bench improves from 39 to 30, about half from porting to Sk2f, half from x.add(x) instead of x.multiply(two). Remove Sk4f Load2/store2 now that we have Sk2f. BUG=skia: Review URL: https://codereview.chromium.org/1019773004
* Sk2xGravatar mtklein2015-03-19
| | | | | | | | This adds an API, an SSE impl, a portable impl, and some tests for Sk2f/Sk2d/Sk2s. BUG=skia: Review URL: https://codereview.chromium.org/1025463002
* alt SkEvalQuadAt that returns its answer, using Sk2fGravatar reed2015-03-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1011493003
* guarded change to SkImageGenerator to make getInfo() constGravatar reed2015-03-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1017293002
* Add Load2/store2 to Sk4x (dumb impl for now)Gravatar reed2015-03-18
| | | | | | | | patch from issue 1001003002 at patchset 1 (http://crrev.com/1001003002#ps1) BUG=skia: Review URL: https://codereview.chromium.org/1001453006
* Remove uniqueID from all filter serialization.Gravatar senorblanco2015-03-18
| | | | | | | | | | | | (This is essentially a revert of https://codereview.chromium.org/503833002/.) This was necessary back when SkPaint was flattened even for in-process use. Now that we only flatten SkPaint for cross-process use, there's no need to serialize UniqueIDs. Note: SkDropShadowImageFilter is being constructed with a croprect and UniqueID (of 0) in Blink. I've made the uniqueID param default to 0 temporarily, until this rolls in and Blink can be changed. (Blink can't be changed first, since unlike the other filters, there's no constructor that takes a cropRect but not a uniqueID.) BUG=skia: Review URL: https://codereview.chromium.org/1019493002
* Let's find out what's up with the TSAN bot test failures.Gravatar mtklein2015-03-18
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1020573002