aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMatrix.cpp
Commit message (Collapse)AuthorAge
* Remove SkCanvas matrix ops return value.Gravatar commit-bot@chromium.org2014-03-18
| | | | | | | | | | | | | The internal SkMatrix ops can no longer fail -> we can remove the bool return value. R=bsalomon@google.com, reed@google.com, robertphillips@google.com, scroggo@google.com, fmalita@google.com Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/200223008 git-svn-id: http://skia.googlecode.com/svn/trunk@13849 2bbb7eff-a529-9590-31e7-b0007b416f81
* Allow toString capability to be toggled independent of developer mode.Gravatar commit-bot@chromium.org2014-03-13
| | | | | | | | | | | | This change is motivated by the desire to see the text information in the debugger when not in developer mode. It is structured so user's can disable it if the capability is not wanted. R=bsalomon@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/197763008 git-svn-id: http://skia.googlecode.com/svn/trunk@13795 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove (unnecessary) SkScalarMul and SkScalarMulAdd macros from SkMatrix.cpp.Gravatar commit-bot@chromium.org2014-01-30
| | | | | | | | | | | | | SkScalarMulDiv remains, but it can be removed later (though it is slightly clearer to use it at times). BUG=skia: R=caryclark@google.com, mtklein@google.com, halcanary@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/150493002 git-svn-id: http://skia.googlecode.com/svn/trunk@13252 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove remaining references to Sk64 (obsolete)Gravatar reed@google.com2014-01-13
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/136673002 git-svn-id: http://skia.googlecode.com/svn/trunk@13042 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove last remnant of SK_SCALAR_IS_FIXED codeGravatar reed@google.com2013-12-18
| | | | | | | | | | move SkScalarMean into its only caller, reducing out public API exposure BUG= Review URL: https://codereview.chromium.org/117133004 git-svn-id: http://skia.googlecode.com/svn/trunk@12733 2bbb7eff-a529-9590-31e7-b0007b416f81
* move SkScalarMean into its only caller, reducing out public API exposureGravatar reed@google.com2013-12-18
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/117973002 git-svn-id: http://skia.googlecode.com/svn/trunk@12732 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floatsGravatar reed@google.com2013-12-17
| | | | | | | | | | | | | To keep the CL (slightly) managable, this does not make any changes to existing macros (e.g. SkScalarMul). Just tackling #ifdef constructs this time around. BUG= R=bsalomon@google.com, caryclark@google.com Review URL: https://codereview.chromium.org/117053002 git-svn-id: http://skia.googlecode.com/svn/trunk@12712 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkFP.h and replace SkFP with SkScalar stop respecting ↵Gravatar reed@google.com2013-12-16
| | | | | | | | | | | SK_SOFTWARE_FLOAT, assume its always false stop respecting SK_SCALAR_SLOW_COMPARES, assume its always false BUG= R=caryclark@google.com Review URL: https://codereview.chromium.org/116183002 git-svn-id: http://skia.googlecode.com/svn/trunk@12686 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkScalarCompare type and headerGravatar reed@google.com2013-12-13
| | | | | | | | | BUG= R=fmalita@chromium.org Review URL: https://codereview.chromium.org/113193004 git-svn-id: http://skia.googlecode.com/svn/trunk@12681 2bbb7eff-a529-9590-31e7-b0007b416f81
* Do not use GrBicubic effect when downscaling. Also, don't use glTexStorage ↵Gravatar commit-bot@chromium.org2013-12-09
| | | | | | | | | | | | as it interferes with deleyed mipmap generation. R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/105353002 git-svn-id: http://skia.googlecode.com/svn/trunk@12576 2bbb7eff-a529-9590-31e7-b0007b416f81
* I feel like my clang is especially sensitive to unused variables.Gravatar mtklein@google.com2013-11-22
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/82913006 git-svn-id: http://skia.googlecode.com/svn/trunk@12369 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix compiler error where SK_SCALAR_IS_FLOAT is not defined. (attempt 2)Gravatar djsollen@google.com2013-11-21
| | | | | | | | R=reed@google.com Review URL: https://codereview.chromium.org/81323002 git-svn-id: http://skia.googlecode.com/svn/trunk@12352 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix compiler error where SK_SCALAR_IS_FLOAT is not defined.Gravatar djsollen@google.com2013-11-21
| | | | | | Review URL: https://codereview.chromium.org/80993004 git-svn-id: http://skia.googlecode.com/svn/trunk@12349 2bbb7eff-a529-9590-31e7-b0007b416f81
* Checking structure sizes before reading them from memory to avoid ↵Gravatar commit-bot@chromium.org2013-11-05
| | | | | | | | | | | | | | | | | overflowing the buffer's stream. BUG= R=reed@google.com, mtklein@google.com, senorblanco@chromium.org Committed: https://code.google.com/p/skia/source/detail?r=12114 Committed: https://code.google.com/p/skia/source/detail?r=12119 Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/41253002 git-svn-id: http://skia.googlecode.com/svn/trunk@12130 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Checking structure sizes before reading them from memory to avoid ↵Gravatar reed@google.com2013-11-04
| | | | | | | | overflowing the buffer's stream." This reverts commit 6bc22e8ef1ea70a1b58409aa21254358c50f149a. git-svn-id: http://skia.googlecode.com/svn/trunk@12124 2bbb7eff-a529-9590-31e7-b0007b416f81
* Checking structure sizes before reading them from memory to avoid ↵Gravatar sugoi@google.com2013-11-04
| | | | | | | | | | | | | overflowing the buffer's stream. BUG= R=reed@google.com Committed: https://code.google.com/p/skia/source/detail?r=12114 Review URL: https://codereview.chromium.org/41253002 git-svn-id: http://skia.googlecode.com/svn/trunk@12119 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r12114 due to https://code.google.com/p/skia/issues/detail?id=1794 ↵Gravatar epoger@google.com2013-11-04
| | | | | | ('Assertion failures on various buildbots as of r12114') git-svn-id: http://skia.googlecode.com/svn/trunk@12115 2bbb7eff-a529-9590-31e7-b0007b416f81
* Checking structure sizes before reading them from memory to avoid ↵Gravatar sugoi@google.com2013-11-04
| | | | | | | | | | | overflowing the buffer's stream. BUG= R=reed@google.com Review URL: https://codereview.chromium.org/41253002 git-svn-id: http://skia.googlecode.com/svn/trunk@12114 2bbb7eff-a529-9590-31e7-b0007b416f81
* SK_ONCE for SkData and SkPathRefGravatar commit-bot@chromium.org2013-10-23
| | | | | | | | | | | | | Adds SK_ONCE_FRIEND, to allow SK_DEF_ONCE code to be friends with a class. This had to go in include/core to be visible to headers there. BUG= R=reed@google.com, bungeman@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/26491003 git-svn-id: http://skia.googlecode.com/svn/trunk@11914 2bbb7eff-a529-9590-31e7-b0007b416f81
* Correct 32bit pointer assumption in assert in SkMatrix.Gravatar bungeman@google.com2013-10-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11739 2bbb7eff-a529-9590-31e7-b0007b416f81
* SK_ONCE for SkMatrix::I()Gravatar commit-bot@chromium.org2013-10-10
| | | | | | | | | | | | | | Going to start doing these in progressively larger and larger bulk, but I figured the first few changes probably merit caution. BUG= R=reed@google.com, bungeman@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/26905002 git-svn-id: http://skia.googlecode.com/svn/trunk@11721 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make skia almost compile again with clang.Gravatar commit-bot@chromium.org2013-10-07
| | | | | | | | | | | | clang is reporting many unused functions and variables. R=bsalomon@google.com, robertphillips@google.com, reed@google.com Author: tfarina@chromium.org Review URL: https://codereview.chromium.org/26167002 git-svn-id: http://skia.googlecode.com/svn/trunk@11630 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-09-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11071 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix Matrix44Test and double-to-float conversion in SVD codeGravatar jvanverth@google.com2013-09-03
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11067 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revise SVD code to remove arctangents. Gravatar commit-bot@chromium.org2013-09-03
| | | | | | | | | | | | Also added bench for timing matrix decomposition. R=reed@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/23596006 git-svn-id: http://skia.googlecode.com/svn/trunk@11066 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add homogeneous point mapping to MatrixGravatar egdaniel@google.com2013-08-15
| | | | | | | | | | | | | Adds mapping of homogeneous points (points with three scalar components, where the last component is not 1). Includes fix for tests when running on 32 bit debug builds BUG= R=bsalomon@google.com Review URL: https://codereview.chromium.org/22816005 git-svn-id: http://skia.googlecode.com/svn/trunk@10755 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r10659: Add a map homogenous points to SkMatrixGravatar jvanverth@google.com2013-08-09
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10667 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a map homogenous points to SkMatrixGravatar egdaniel@google.com2013-08-09
| | | | | | | | | BUG= R=bsalomon@google.com Review URL: https://codereview.chromium.org/22330004 git-svn-id: http://skia.googlecode.com/svn/trunk@10659 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-07-30
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10426 2bbb7eff-a529-9590-31e7-b0007b416f81
* Matrix decomposition cleanup: Add is_degenerate_2x2(), and fix some assertsGravatar commit-bot@chromium.org2013-07-29
| | | | | | | | | | | | (atan2 can take a zero x value, but both x == 0 and y == 0 is undefined). R=reed@google.com, robertphillips@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/20303003 git-svn-id: http://skia.googlecode.com/svn/trunk@10410 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-07-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10340 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add basic SVD support to SkMatrix. Allows you to pull out the x- and y-scale ↵Gravatar commit-bot@chromium.org2013-07-24
| | | | | | | | | | | | factors, sandwiched by two rotations. R=reed@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/19569007 git-svn-id: http://skia.googlecode.com/svn/trunk@10322 2bbb7eff-a529-9590-31e7-b0007b416f81
* 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