aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMatrix.cpp
Commit message (Collapse)AuthorAge
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-04-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8584 2bbb7eff-a529-9590-31e7-b0007b416f81
* First pass at Rect EffectGravatar robertphillips@google.com2013-04-09
| | | | | | | | https://codereview.chromium.org/13521006/ git-svn-id: http://skia.googlecode.com/svn/trunk@8571 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change random number generator for 'tests' to SkMWCRandom. Also removes some Gravatar jvanverth@google.com2013-03-04
| | | | | | | | | | | | | | | | | | | | unused headers and fixes a couple of bugs exposed by changing the random number generator: First, the function SkMatrix::getMaxStretch() had an error where it was testing the square of a number against near-zero. This led to it occasionally taking a cheaper but imprecise path for computing the eigenvalues of the matrix. It's been replaced with a check against the square of SK_ScalarNearlyZero. The second case was a failure in ClipStackTest, where it hit the rare case of a practically empty clip stack (it has a single Union) and we set a tight bounds. The bounds rect doesn't get set by GrReducedClip::ReduceClipStack() in this case, so when it clips the reduced stack it's clipping against garbage, and the resulting regions don't match. The solution is to initialize the tightBounds rect. git-svn-id: http://skia.googlecode.com/svn/trunk@7952 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove obsolete build flags:Gravatar reed@google.com2013-02-22
| | | | | | | | | | | | | SK_IGNORE_TRANS_CLAMP_FIX SK_IGNORE_1XN_BITMAP_OPT SK_IGNORE_CLIP_BUG_FIX SK_IGNORE_FAST_SCALEMATRIX_INVERT SK_IGNORE_QUAD_STROKE_FIX SK_IGNORE_MULTIPLY_XFERMODE_OPT SK_IGNORE_LARGE_DASH_OPT Review URL: https://codereview.appspot.com/7381050 git-svn-id: http://skia.googlecode.com/svn/trunk@7829 2bbb7eff-a529-9590-31e7-b0007b416f81
* return if we're invertible for the fast scale+trans case when we have no inverseGravatar reed@google.com2013-01-30
| | | | | | | matrix to return. Review URL: https://codereview.appspot.com/7231063 git-svn-id: http://skia.googlecode.com/svn/trunk@7464 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add GPU support for axis-aligned ovals:Gravatar jvanverth@google.com2013-01-22
| | | | | | | | | | | | | | | - Add drawOval base function to SkDevice, and override in SkGpuDevice - Move isSimilarityMatrix to SkMatrix (renamed to isSimilarity) and fixed up unit test - Since both SkGpuDevice::drawOval() and GrContext::drawPath() can try to draw ovals, added GrContext::canDrawOval() and GrContext::internalDrawOval() to avoid duplicate code - Hooked in axis-aligned oval fill shader - Enabled GPU stroked circles - Added stroked circle bench test Review URL: https://codereview.appspot.com/7137050 git-svn-id: http://skia.googlecode.com/svn/trunk@7304 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added print out of SkShader information to debuggerGravatar robertphillips@google.com2013-01-15
| | | | | | | | https://codereview.appspot.com/7105045/ git-svn-id: http://skia.googlecode.com/svn/trunk@7201 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SK_IGNORE_FAST_SCALEMATRIX_INVERT guard for new invert codeGravatar reed@google.com2013-01-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7025 2bbb7eff-a529-9590-31e7-b0007b416f81
* special-case matrix invert for translate and scaleGravatar reed@google.com2013-01-04
| | | | | | | update unittest to use diff scale-x and scale-y values, and tests for non-invertible scale matrices Review URL: https://codereview.appspot.com/7027055 git-svn-id: http://skia.googlecode.com/svn/trunk@7019 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7010 2bbb7eff-a529-9590-31e7-b0007b416f81
* use SkTreatAsSprite in SkDraw (with guard for chrome if needed)Gravatar reed@google.com2013-01-03
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6994 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-03
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6982 2bbb7eff-a529-9590-31e7-b0007b416f81
* add unittest for SkTreatAsSpriteGravatar reed@google.com2013-01-02
| | | | | | Review URL: https://codereview.appspot.com/7042044 git-svn-id: http://skia.googlecode.com/svn/trunk@6974 2bbb7eff-a529-9590-31e7-b0007b416f81
* Shortcut inverting the identity matrix.Gravatar bsalomon@google.com2012-10-31
| | | | | | | | | Review URL: https://codereview.appspot.com/6775087/ git-svn-id: http://skia.googlecode.com/svn/trunk@6218 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix matrix type in setRectToRectGravatar reed@google.com2012-10-12
| | | | | | Review URL: https://codereview.appspot.com/6655055 git-svn-id: http://skia.googlecode.com/svn/trunk@5913 2bbb7eff-a529-9590-31e7-b0007b416f81
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | https://codereview.appspot.com/6465078/) This CL is part I of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6485054 git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove unused local var (warning fix)Gravatar reed@google.com2012-08-09
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5039 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix SkMatrix line endings (LF)Gravatar bsalomon@google.com2012-07-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4592 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixing type mask computation in SkMatrix to make it faster and make it so ↵Gravatar junov@chromium.org2012-07-12
| | | | | | | | | | | | | that matrices have the same type masks as their inverses. This patch also add bench tests that call invert() followed by mapRect() on various types of matrices. Performance of these tests was greatly affected by typemask computation Review URL: http://codereview.appspot.com/6380043/ BUG=https://code.google.com/p/chromium/issues/detail?id=135259 git-svn-id: http://skia.googlecode.com/svn/trunk@4562 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SK_CAN_USE_FLOAT (deprecated)Gravatar reed@google.com2012-06-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4232 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rename the existing flatten(void*) methods.Gravatar djsollen@google.com2012-06-08
| | | | | | | | This change avoids naminc confusion with the SkFlattenable flatten methods and also changes SkPath to use the void* model instead of taking a SkReader32. Review URL: https://codereview.appspot.com/6299062 git-svn-id: http://skia.googlecode.com/svn/trunk@4215 2bbb7eff-a529-9590-31e7-b0007b416f81
* Punctuation cleanup to satisfy idiosyncracies of OpenBSD gcc 4.2.1.Gravatar tomhudson@google.com2012-06-01
| | | | | | | | | | Original patch by landry.breuil. http://code.google.com/p/skia/issues/detail?id=626 git-svn-id: http://skia.googlecode.com/svn/trunk@4112 2bbb7eff-a529-9590-31e7-b0007b416f81
* [gpu] Remove getMaxStretch for perspective, use mapRadius for perspective ↵Gravatar bsalomon@google.com2011-09-09
| | | | | | | | | | path subdiv tol, add test Review URL: http://codereview.appspot.com/4975063/ git-svn-id: http://skia.googlecode.com/svn/trunk@2246 2bbb7eff-a529-9590-31e7-b0007b416f81
* Improve gpu path subdiv with perspective, remove tolerance scale, fix commentGravatar bsalomon@google.com2011-09-07
| | | | | | | | Review URL: http://codereview.appspot.com/4993041/ git-svn-id: http://skia.googlecode.com/svn/trunk@2239 2bbb7eff-a529-9590-31e7-b0007b416f81
* detect when scale is really 1.0, and don't mis-mark our flags to kScaleGravatar reed@google.com2011-09-06
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2230 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkMatrix::getPerspectiveTypeMaskOnly() and SkMatrix::isTriviallyIdentity().Gravatar tomhudson@google.com2011-08-30
| | | | | | | | | Reduces profile time in setConcat() and computeTypeMask() for demos that do a lot of matrix concatenation. git-svn-id: http://skia.googlecode.com/svn/trunk@2191 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix bug in SkMatrix::invert where typemask is not set on inverse when a ↵Gravatar bsalomon@google.com2011-08-01
| | | | | | | | | | matrix is inverted into itself. Review URL: http://codereview.appspot.com/4819050/ git-svn-id: http://skia.googlecode.com/svn/trunk@2002 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have manually examined all of these diffs and restored a few files that seem to require manual adjustment. The following files still need to be modified manually, in a separate CL: android_sample/SampleApp/AndroidManifest.xml android_sample/SampleApp/res/layout/layout.xml android_sample/SampleApp/res/menu/sample.xml android_sample/SampleApp/res/values/strings.xml android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java experimental/CiCarbonSampleMain.c experimental/CocoaDebugger/main.m experimental/FileReaderApp/main.m experimental/SimpleCocoaApp/main.m experimental/iOSSampleApp/Shared/SkAlertPrompt.h experimental/iOSSampleApp/Shared/SkAlertPrompt.m experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig gpu/src/android/GrGLDefaultInterface_android.cpp gyp/common.gypi gyp_skia include/ports/SkHarfBuzzFont.h include/views/SkOSWindow_wxwidgets.h make.bat make.py src/opts/memset.arm.S src/opts/memset16_neon.S src/opts/memset32_neon.S src/opts/opts_check_arm.cpp src/ports/SkDebug_brew.cpp src/ports/SkMemory_brew.cpp src/ports/SkOSFile_brew.cpp src/ports/SkXMLParser_empty.cpp src/utils/ios/SkImageDecoder_iOS.mm src/utils/ios/SkOSFile_iOS.mm src/utils/ios/SkStream_NSData.mm tests/FillPathTest.cpp Review URL: http://codereview.appspot.com/4816058 git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use texture cache for writePixels tempGravatar bsalomon@google.com2011-07-18
| | | | | | | | Review URL: http://codereview.appspot.com/4757050/ git-svn-id: http://skia.googlecode.com/svn/trunk@1887 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change pdfTransform to asAffine.Gravatar bungeman@google.com2011-07-13
| | | | | | | | http://codereview.appspot.com/4704044/ git-svn-id: http://skia.googlecode.com/svn/trunk@1851 2bbb7eff-a529-9590-31e7-b0007b416f81
* Increase use of SkMatrix::hasPerspective(), merge in has_perspective().Gravatar tomhudson@google.com2011-06-06
| | | | | | | | Unifies SkMatrix::hasPerspective(), has_perspective(), and manual tests of SkMatrix::getType & kPerspective_Mask. git-svn-id: http://skia.googlecode.com/svn/trunk@1517 2bbb7eff-a529-9590-31e7-b0007b416f81
* Attempt to correct issue with fixed point from SkMatrix changes in r1512.Gravatar tomhudson@google.com2011-06-06
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1515 2bbb7eff-a529-9590-31e7-b0007b416f81
* Benchmarking suggests that replacing some of the conversions from float to intGravatar tomhudson@google.com2011-06-06
| | | | | | | | | | | | | | | with direct floating-point comparisons in computeTypeMask() is a significant win (up to 40%?). In practice, we see a 10-15% speedup in this function (the current most expensive Skia function) in Chrome on the FishIETank demo. The remainder of the function looks like it ought to be amenable to similar speedups, but we haven't found a rewrite that behaves well in benchmarking yet. http://codereview.appspot.com/4551097/ git-svn-id: http://skia.googlecode.com/svn/trunk@1512 2bbb7eff-a529-9590-31e7-b0007b416f81
* speed-up SkMatrix::preScale by 3x, by special-casing it instead of just callingGravatar reed@google.com2011-06-01
| | | | | | | | concat. Inspired by the profile of the fishtank site git-svn-id: http://skia.googlecode.com/svn/trunk@1462 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make GrMatrix an alias of SkMatrix. Add new methods to SkMatrix.Gravatar bsalomon@google.com2011-05-10
| | | | | | | | | | Review URL: http://codereview.appspot.com/4538043/ Checked in on behalf of reed@ with some additional work (remove the do-nother sk->gr matrix converter). git-svn-id: http://skia.googlecode.com/svn/trunk@1289 2bbb7eff-a529-9590-31e7-b0007b416f81
* merge with changes for GPU backendGravatar reed@android.com2010-12-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@637 2bbb7eff-a529-9590-31e7-b0007b416f81
* Cleanup/unify matrix transform for PDF backend.Gravatar vandebo@chromium.org2010-10-26
| | | | | | Review URL: http://codereview.appspot.com/2719041 git-svn-id: http://skia.googlecode.com/svn/trunk@617 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix for SkMatrix::invert() for large coordinate values.Gravatar senorblanco@chromium.org2010-07-20
| | | | | | | | See http://codereview.appspot.com/1731053 git-svn-id: http://skia.googlecode.com/svn/trunk@589 2bbb7eff-a529-9590-31e7-b0007b416f81
* more float/double precision tweaksGravatar reed@android.com2009-09-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@355 2bbb7eff-a529-9590-31e7-b0007b416f81
* use doubles in matrix.invert() to keep more precision, needed for subtleGravatar reed@android.com2009-09-16
| | | | | | | | | bugs when drawing stretched bitmaps (like ninepatch) at nasty scale factors like 1.5 (where the inverse matrix steps 0.333333, 1.0, 1.666667, etc.) git-svn-id: http://skia.googlecode.com/svn/trunk@354 2bbb7eff-a529-9590-31e7-b0007b416f81
* use scalarcomparetype in matrix tests, so we don't do anything trickyGravatar reed@android.com2009-07-08
| | | | | | | | (unnecessary) when floats are fast git-svn-id: http://skia.googlecode.com/svn/trunk@259 2bbb7eff-a529-9590-31e7-b0007b416f81
* use sk_bzero instead of bzero, since it isn't always available.Gravatar reed@android.com2009-06-29
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@244 2bbb7eff-a529-9590-31e7-b0007b416f81
* add shape flatten so they work properly in picturesGravatar reed@android.com2009-06-29
| | | | | | | | add flatten/unflatten to matrix git-svn-id: http://skia.googlecode.com/svn/trunk@242 2bbb7eff-a529-9590-31e7-b0007b416f81
* add initial unittest framework (tests)Gravatar reed@android.com2009-02-27
| | | | | | | | move some previous unittests out of core classes and into tests git-svn-id: http://skia.googlecode.com/svn/trunk@96 2bbb7eff-a529-9590-31e7-b0007b416f81
* grab from latest androidGravatar reed@android.com2008-12-17
git-svn-id: http://skia.googlecode.com/svn/trunk@27 2bbb7eff-a529-9590-31e7-b0007b416f81