aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrOvalRenderer.cpp
Commit message (Collapse)AuthorAge
* Fix for Ovals/RRects on N4 missing interior rectangles.Gravatar jvanverth@google.com2013-07-02
| | | | | | | | | | | | | | Clamp square of gradiant length to non-zero value so it can be passed to inversesqrt(). Also adds some fixes to rrect setup to avoid crossing zero. Skia issue #1372 R=bsalomon@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/18375003 git-svn-id: http://skia.googlecode.com/svn/trunk@9864 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace fixed-size array of effect stages in GrDrawState with two appendable ↵Gravatar bsalomon@google.com2013-06-13
| | | | | | | | | | arrays, one for color, one for coverage. R=robertphillips@google.com Review URL: https://codereview.chromium.org/16952006 git-svn-id: http://skia.googlecode.com/svn/trunk@9592 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace GrDrawState::AutoDeviceCoordDraw with ↵Gravatar bsalomon@google.com2013-05-29
| | | | | | | | | | GrDrawState::AutoViewMatrixRestore::setIdentity(). s R=robertphillips@google.com Review URL: https://codereview.chromium.org/15780002 git-svn-id: http://skia.googlecode.com/svn/trunk@9331 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-05-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9174 2bbb7eff-a529-9590-31e7-b0007b416f81
* Better method for rendering AA ellipses.Gravatar commit-bot@chromium.org2013-05-16
| | | | | | | | | | | | | | | | | | | | | | | This uses the standard ellipse equation as a signed distance test, and adjusts the result by the length of the gradient at that point to get a better approximation of the distance to the ellipse. It replaces the standard ellipse and roundrect shader renderers. Also adds a check to see if the curvature extrema of the stroke are less than the curvature extrema of the ellipse (i.e. the radius of curvature is larger). In this case, it's no longer an ellipse and we can't use this renderer. Only supports stroking for near-circular ellipses. R=bsalomon@google.com, robertphillips@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/14938004 git-svn-id: http://skia.googlecode.com/svn/trunk@9162 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-05-14
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9117 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix stroked roundrects on Nexus 10.Gravatar commit-bot@chromium.org2013-05-13
| | | | | | | | | | | | | | | Due to floating point precision errors, using the formula b^2x^2 + a^2y^2 - a^2b^2 doesn't work on the Nexus 10 GPU. Changed to use x^2/a^2 + y^2/b^2 - 1. Addresses issue 1290. R=bsalomon@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/15039016 git-svn-id: http://skia.googlecode.com/svn/trunk@9110 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r9055. Gravatar jvanverth@google.com2013-05-08
| | | | | | | Unreviewed. git-svn-id: http://skia.googlecode.com/svn/trunk@9061 2bbb7eff-a529-9590-31e7-b0007b416f81
* Better method for rendering AA ellipses.Gravatar commit-bot@chromium.org2013-05-08
| | | | | | | | | | | | | | | | | | | | | | | This uses the standard ellipse equation as a signed distance test, and adjusts the result by the length of the gradient at that point to get a better approximation of the distance to the ellipse. It replaces the standard ellipse and roundrect shader renderers. Also adds a check to see if the curvature extrema of the stroke are less than the curvature extrema of the ellipse (i.e. the radius of curvature is larger). In this case, it's no longer an ellipse and we can't use this renderer. Committed: http://code.google.com/p/skia/source/detail?r=9016 R=bsalomon@google.com, robertphillips@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/14938004 git-svn-id: http://skia.googlecode.com/svn/trunk@9055 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r9016 due to Nexus7 GM regressionsGravatar jvanverth@google.com2013-05-06
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9020 2bbb7eff-a529-9590-31e7-b0007b416f81
* Better method for rendering AA ellipses.Gravatar commit-bot@chromium.org2013-05-06
| | | | | | | | | | | | | | | | | | | | | This uses the standard ellipse equation as a signed distance test, and adjusts the result by the length of the gradient at that point to get a better approximation of the distance to the ellipse. It replaces the standard ellipse and roundrect shader renderers. Also adds a check to see if the curvature extrema of the stroke are less than the curvature extrema of the ellipse (i.e. the radius of curvature is larger). In this case, it's no longer an ellipse and we can't use this renderer. R=bsalomon@google.com, robertphillips@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/14938004 git-svn-id: http://skia.googlecode.com/svn/trunk@9016 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-05-03
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8976 2bbb7eff-a529-9590-31e7-b0007b416f81
* Disable AA for ovals and roundrects if MSAA is enabled.Gravatar commit-bot@chromium.org2013-05-02
| | | | | | | | | | | | | Also remove GrPaint from a number of methods -- we only use it to get the AA state. R=bsalomon@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/14109033 git-svn-id: http://skia.googlecode.com/svn/trunk@8954 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-04-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8873 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add GPU support for roundrectsGravatar commit-bot@chromium.org2013-04-25
| | | | | | | | | | | | | | | This uses the OvalRenderer to render roundrects as "stretched ovals." It adds an additional shader that handles the straight edges of ellipsoid roundrects better, and uses the circle shader for roundrects where the two radii are the same. Only axis-aligned, simple roundrects are supported. Handles fill, stroke and hairline. R=bsalomon@google.com, robertphillips@google.com, reed@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/13852049 git-svn-id: http://skia.googlecode.com/svn/trunk@8859 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove static effects from the effect memory pool.Gravatar bsalomon@google.com2013-04-23
| | | | | | Review URL: https://codereview.chromium.org/14081016 git-svn-id: http://skia.googlecode.com/svn/trunk@8828 2bbb7eff-a529-9590-31e7-b0007b416f81
* Vertex Attrib configurations now handled as pointers vs. SkSTArraysGravatar robertphillips@google.com2013-04-20
| | | | | | | | https://codereview.chromium.org/14328009/ git-svn-id: http://skia.googlecode.com/svn/trunk@8787 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-04-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8785 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix non-uniform scale and stroked ellipsesGravatar commit-bot@chromium.org2013-04-19
| | | | | | | | | | | | | | | | Strokes were not being scaled properly for ellipses -- the view matrix was being reset before the scale factors were being applied. Scaling the stroke has been moved up higher in the process. Also applies some optimizations suggested by robertphillips. R=robertphillips@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/14017012 git-svn-id: http://skia.googlecode.com/svn/trunk@8777 2bbb7eff-a529-9590-31e7-b0007b416f81
* Expand modulate, add, subtract, extract component glsl helpers.Gravatar bsalomon@google.com2013-04-18
| | | | | | Review URL: https://codereview.chromium.org/13895006 git-svn-id: http://skia.googlecode.com/svn/trunk@8755 2bbb7eff-a529-9590-31e7-b0007b416f81
* Disable GPU acceleration for narrow ovals. Gravatar jvanverth@google.com2013-04-16
| | | | | | | | | | | | GPU anti-aliasing is currently not correct for ellipses where the ratio of long axis length to short axis length is greater than 2 (see https://code.google.com/p/skia/issues/detail?id=1249). This disables the GPU path for those cases. Review URL: https://codereview.chromium.org/13925015/ git-svn-id: http://skia.googlecode.com/svn/trunk@8694 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-04-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8641 2bbb7eff-a529-9590-31e7-b0007b416f81
* Shader optimization for ovals.Gravatar commit-bot@chromium.org2013-04-11
| | | | | | | | | | | | | | | | Previously we were setting a center point as an attribute across all vertices, then using that with the interpolated position to compute an offset. However, because the offset computation is linear, we can just set the appropriate offset at the vertices and let the rasterizer interpolate it for us. Author: jvanverth@google.com Reviewed By: robertphillips@google.com Review URL: https://chromiumcodereview.appspot.com/14093002 git-svn-id: http://skia.googlecode.com/svn/trunk@8613 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-04-03
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8503 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move edge GrEffects to locally defined classes.Gravatar commit-bot@chromium.org2013-04-02
| | | | | | | | | | | | This removes the general GrEdgeEffect and the specialized oval GrEffects and declares them within the renderer files that use them. It also splits GrEdgeEffect into three different GrEffects. Author: jvanverth@google.com Reviewed By: robertphillips@google.com Review URL: https://chromiumcodereview.appspot.com/13344002 git-svn-id: http://skia.googlecode.com/svn/trunk@8493 2bbb7eff-a529-9590-31e7-b0007b416f81
* Take two for r8466:Gravatar jvanverth@google.com2013-04-01
| | | | | | | | | | | | | | | Replace the old attribute binding and index interface with one where we include the binding as part of the attribute array. Also removed the fixed attribute indices for constant color and coverage attributes, and replaced with dynamic ones based on current attribute set. Removed binding of color and coverage attributes unless they're actually set. Original author: bsalomon@google.com Author: jvanverth@google.com Reviewed By: bsalomon@google.com,robertphillips@google.com Review URL: https://chromiumcodereview.appspot.com/13296005 git-svn-id: http://skia.googlecode.com/svn/trunk@8468 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rolling back r8466. Gravatar jvanverth@google.com2013-04-01
| | | | | | | Not reviewed. git-svn-id: http://skia.googlecode.com/svn/trunk@8467 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revise attribute binding interface.Gravatar commit-bot@chromium.org2013-04-01
| | | | | | | | | | | | | | Replace the old attribute binding and index interface with one where we include the binding as part of the attribute array. Also removed the fixed attribute indices for constant color and coverage attributes, and replaced with dynamic ones based on current attribute set. Removed binding of color and coverage attributes unless they're actually set. Original author: bsalomon@google.com Author: jvanverth@google.com Reviewed By: bsalomon@google.com,robertphillips@google.com Review URL: https://chromiumcodereview.appspot.com/13296005 git-svn-id: http://skia.googlecode.com/svn/trunk@8466 2bbb7eff-a529-9590-31e7-b0007b416f81
* Simplify the circle outset code and add comment relating it to the shader code.Gravatar bsalomon@google.com2013-04-01
| | | | | | Review URL: https://codereview.chromium.org/13165012 git-svn-id: http://skia.googlecode.com/svn/trunk@8463 2bbb7eff-a529-9590-31e7-b0007b416f81
* Trim the copy of the dst made for dst-reading effects using the clip and ↵Gravatar commit-bot@chromium.org2013-04-01
| | | | | | | | | | | | | | dev-bounds of draw. Adds dev bounds to circles and rects drawn by GrDrawTarget base class (GrIODB already provides rect bounds). Author: bsalomon@google.com Reviewed By: robertphilips@google.com,jvanverth@google.com,robertphillips@google.com Review URL: https://chromiumcodereview.appspot.com/13222004 git-svn-id: http://skia.googlecode.com/svn/trunk@8453 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-03-23
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8350 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move oval rendering code to GrOvalRenderer.Gravatar commit-bot@chromium.org2013-03-22
Author: jvanverth@google.com Reviewed By: bsalomon@google.com,robertphillips@google.com Review URL: https://chromiumcodereview.appspot.com/12657003 git-svn-id: http://skia.googlecode.com/svn/trunk@8345 2bbb7eff-a529-9590-31e7-b0007b416f81