aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrOvalRenderer.cpp
Commit message (Collapse)AuthorAge
* Fix compilation with SK_ENABLE_INST_COUNT=1Gravatar commit-bot@chromium.org2013-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add INHERITED declarations to class declarations that prevent compilation with the flag. Remove SK_DEFINE_INST_COUNT from all class implementations. Instead, use function-local static variables in the reference count helper classes to create the global instances to store the needed info. The accessor functions are defined inline in the helper classes, so definitions are not needed. The initialization point of the variables should be as well defined as previously. Remove SK_DECLARE_INST_COUNT_TEMPLATE and use SK_DECLARE_INST_COUNT instead. This avoids possible future compilation errors further. For SK_ENABLE_INST_COUNT=0 compilation, add an empty static member function to all classes that use SK_DECLARE_INST_COUNT and SK_DECLARE_INST_COUNT_ROOT macros. The function ensures that classes contain public INHERITED typedef. This member function seems to be compiled away. This shouĺd ensure that part of the compilation errors are caught earlier. Also adds DSK_DECLARE_INST_COUNT to few SkPDFDict subclasses. R=robertphillips@google.com, richardlin@chromium.org, bsalomon@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/98703002 git-svn-id: http://skia.googlecode.com/svn/trunk@12501 2bbb7eff-a529-9590-31e7-b0007b416f81
* Apply hairline optimization only if the path renderer wants itGravatar commit-bot@chromium.org2013-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make the decision to convert thin, non-hairline paths to hairline paths at the renderer level. The current nv_path_rendering implementation does not render hairlines. Rendering the hairlines with normal renderers cause unneccessary gl program changes, which is quite slow. Changes the behavior of non-nv_path_rendering paths to always perform the optimization if the shape ends up being painted by a renderer that wants the optimization. Previously the optimization was applied only when callgraph started with SkCanvas::drawPath. Applies the optimization for GrAAHairLineRenderer and GrDefaultPathRenderer. This changes gm results for dashing3_{msaa4,gpu} and drawlooper_msaa4. R=bsalomon@google.com, jvanverth@google.com, rmistry@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/38573007 git-svn-id: http://skia.googlecode.com/svn/trunk@12357 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Do not apply hairline optimization for paths if nv_path_rendering is ↵Gravatar bsalomon@google.com2013-11-08
| | | | | | | | | | used" This reverts commit r12185. Review URL: https://codereview.chromium.org/66813002 git-svn-id: http://skia.googlecode.com/svn/trunk@12187 2bbb7eff-a529-9590-31e7-b0007b416f81
* Do not apply hairline optimization for paths if nv_path_rendering is usedGravatar commit-bot@chromium.org2013-11-08
| | | | | | | | | | | | | | | | | | | | | | | | Do not convert thin, non-hairline paths to hairline paths if nv_path_rendering is used. The current nv_path_rendering implementation does not render hairlines. Rendering the hairlines with normal renderers cause unneccessary gl program changes, which is quite slow. Changes the behavior of non-nv_path_rendering paths to always perform the optimization if the shape ends up being painted by the path-drawing code (GrContext::drawPathInternal). Previously the optimization was applied only when callgraph started with SkCanvas::drawPath. This changes drawlooper_msaa4, dashing3_msaa4 and dashing3_gpu R=bsalomon@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/38573007 git-svn-id: http://skia.googlecode.com/svn/trunk@12185 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix for thin filled and hairline roundrects.Gravatar commit-bot@chromium.org2013-11-07
| | | | | | | | | | | | | | | | The roundrect renderer was dropping into the ConvexPathRenderer when it didn't need to -- if a stroke is just on the edge of being acceptable it will now use the roundrect renderer. BUG=Skia:1802 R=robertphillips@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/59903005 git-svn-id: http://skia.googlecode.com/svn/trunk@12168 2bbb7eff-a529-9590-31e7-b0007b416f81
* Implement SkColorFilter as a GrGLEffectGravatar commit-bot@chromium.org2013-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds GrEffect::willUseInputColor() which indicates whether or not the input color affects the output of the effect. This is needed for certain Xfermodes, such as kSrc_Mode. For these modes the color filter will not use the input color. An effect with GrEffect::willUseInputColor() true will cause all color or coverage effects before it to be discarded, as their computations cannot affect the output. In these cases program is marked as having white input color. This fixes an assert when Skia is compiled in a mode that prefers using uniforms instead of attributes for constants. (Flags GR_GL_USE_NV_PATH_RENDERING or GR_GL_NO_CONSTANT_ATTRIBUTES). Using attributes hides the problem where the fragment shader does not need input color for color filters that ignore DST part of the filter. The assert would be hit when uniform manager tries to bind an uniform which has been optimized away by the shader compiler. Adds specific GrGLSLExpr4 and GrGLSLExpr1 classes. This way the GLSL expressions like "(v - src.a)" can remain somewhat readable in form of "(v - src.a())". The GrGLSLExpr<typename> template implements the generic functionality, GrGLSLExprX is the specialization that exposes the type-safe interface to this functionality. Also adds operators so that GLSL binary operators of the form "(float * vecX)" can be expressed in C++. Before only the equivalent "(vecX * float)" was possible. This reverts the common blending calculations to more conventional order, such as "(1-a) * c" instead of "c * (1-a)". Changes GrGLSLExpr1::OnesStr from 1 to 1.0 in order to preserve the color filter blending formula string the same (with the exception of variable name change). Shaders change in case of input color being needed: - vec4 filteredColor; - filteredColor = (((1.0 - uFilterColor.a) * output_Stage0) + uFilterColor); - fsColorOut = filteredColor; + vec4 output_Stage1; + { // Stage 1: ModeColorFilterEffect + output_Stage1 = (((1.0 - uFilterColor_Stage1.a) * output_Stage0) + uFilterColor_Stage1); + } + fsColorOut = output_Stage1; Shaders change in case of input color being not needed: -uniform vec4 uFilterColor; -in vec4 vColor; +uniform vec4 uFilterColor_Stage0; out vec4 fsColorOut; void main() { - vec4 filteredColor; - filteredColor = uFilterColor; - fsColorOut = filteredColor; + vec4 output_Stage0; + { // Stage 0: ModeColorFilterEffect + output_Stage0 = uFilterColor_Stage0; + } + fsColorOut = output_Stage0; } R=bsalomon@google.com, robertphillips@google.com, jvanverth@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/25023003 git-svn-id: http://skia.googlecode.com/svn/trunk@11912 2bbb7eff-a529-9590-31e7-b0007b416f81
* Express (GLSL expression, possibly known value) pairs as a classGravatar commit-bot@chromium.org2013-10-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Express (GLSL expression, possibly known value) pairs as a class instead of two variables Introduces GrGLSLExpr<N> to encapsulate the expression and possibly constant-folded value of the expression. This simplifies passing of the expressions to functions. Changes the shaders with following patterns: { // Stage 0: Linear Gradient vec4 colorTemp = mix(uGradientStartColor_Stage0, uGradientEndColor_Stage0, clamp(vMatrixCoord_Stage0.x, 0.0, 1 colorTemp.rgb *= colorTemp.a; - output_Stage0 = vec4((vColor) * (colorTemp)); + output_Stage0 = (vColor * colorTemp); + } Previously the vector cast was always added if constant folding was effective, regardless of the term dimensions. Now the vector upcast is not inserted in places where it is not needed, ie. when the binary operator term is of the target dimension. Also, some parentheses can be omitted. It is assumed that GrGLSLExpr<N>("string") constructors construct a simple expression or parenthesized expression. Otherwise the shader code remains identical. R=jvanverth@google.com, bsalomon@google.com, robertphillips@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/25048002 git-svn-id: http://skia.googlecode.com/svn/trunk@11690 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move VertexBuilder to a GrGLFullShaderBuilder subclassGravatar commit-bot@chromium.org2013-10-04
| | | | | | | | | | | | | | | | | | | Removes the VertexBuilder nested class from GrGLShaderBuilder in favor of a new GrGLFullShaderBuilder subclass, and adds an optional emitCode overload to GrGLEffect that takes a GrGLFullShaderBuilder. Makes setData virtual in GrGLEffectArray and adds a GrGLVertexEffectArray subclass that gets built using a GrGLFullShaderBuilder. Also adds a new GrGLVertexEffect subclass that makes the GrGLFullShaderBuilder overload required for emitCode, and updates GrGLEffects to inherit from GrGLVertexEffect where needed. R=bsalomon@google.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/25474006 git-svn-id: http://skia.googlecode.com/svn/trunk@11612 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make GPU coord transforms automaticGravatar bsalomon@google.com2013-10-02
| | | | | | | | | | | | | Adds a GrCoordTransform class and updates the framework to handle coord transforms similar to how it handles textures with GrTextureAccess. Renames GrGLEffectMatrix to GrGLCoordTransform and slightly repurposes it to be used by the framework instead of effects. R=bsalomon@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/24853002 git-svn-id: http://skia.googlecode.com/svn/trunk@11569 2bbb7eff-a529-9590-31e7-b0007b416f81
* Mark when effects and programs have vertex codeGravatar commit-bot@chromium.org2013-09-30
| | | | | | | | | | | | | | | | Adds a 'hasVertexCode' method to GrEffect and a 'fHasVertexCode' field to GrGLProgramDesc::KeyHeader. Also adds a GrVertexEffect class that effects have to inherit from in order to set the 'hasVertexCode' flag and be able to emit vertex code, and updates the existing effects to use it as needed. R=bsalomon@google.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/23653059 git-svn-id: http://skia.googlecode.com/svn/trunk@11537 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Add a requiresVertexShader method to GrGLEffect"Gravatar commit-bot@chromium.org2013-09-30
| | | | | | | | | | | | | This reverts commit 1a30a3af805b7ea688d4a0f0bfe373c204085a27. We're going to take a different direction for vertexless shaders. R=bsalomon@google.com Author: cdalton@nvidia.com Review URL: https://codereview.chromium.org/23464082 git-svn-id: http://skia.googlecode.com/svn/trunk@11521 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix for ovals failing on Xoom.Gravatar jvanverth@google.com2013-09-10
| | | | | | | | | | | | The fallback path for ellipses when we don't have GLSL derivative instructions was only setting one attribute in the effect stage, but we use two attributes. R=robertphillips@google.com Review URL: https://codereview.chromium.org/23514047 git-svn-id: http://skia.googlecode.com/svn/trunk@11184 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change old PRG to be SkLCGRandom; change new one to SkRandomGravatar commit-bot@chromium.org2013-09-09
| | | | | | | | | | | | | | The goal here is to get people to start using the new random number generator, while leaving the old one in place so we don't have to rebaseline GMs. R=reed@google.com, bsalomon@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/23576015 git-svn-id: http://skia.googlecode.com/svn/trunk@11169 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove GrRefCnt.h in favor of SkRefCnt.hGravatar commit-bot@chromium.org2013-09-09
| | | | | | | | | | | | | | | | | This removes GrRefCnt.h with all its tyepdefs and #defines and just switch them to the Sk* equivalents. GrSafeSetNull was promoted to SkSafeSetNull in SkRefCnt.h. BUG=None TEST=none, no functional changes. R=bsalomon@google.com, robertphillips@google.com Author: tfarina@chromium.org Review URL: https://chromiumcodereview.appspot.com/23904003 git-svn-id: http://skia.googlecode.com/svn/trunk@11151 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a requiresVertexShader method to GrGLEffectGravatar commit-bot@chromium.org2013-09-06
| | | | | | | | | | | | | | | | Adds requiresVertexShader to GrGLEffect and updates the necessary effects to override it and return true. Also reworks GrGLProgram and GrGLShaderBuilder so the program creates all the GL effects at the beginning, and determines if it needs a vertex shader before creating the shader builder. R=bsalomon@google.com Author: cdalton@nvidia.com Review URL: https://chromiumcodereview.appspot.com/23471008 git-svn-id: http://skia.googlecode.com/svn/trunk@11140 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix for aliasing in device-independent ovals on Nexus 10.Gravatar commit-bot@chromium.org2013-09-06
| | | | | | | | | | | | Switch to using two attributes so that dFdx and dFdy generate valid results. R=robertphillips@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/23992005 git-svn-id: http://skia.googlecode.com/svn/trunk@11137 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-09-06
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11126 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add device-independent rendering of ovals, take two.Gravatar commit-bot@chromium.org2013-09-05
| | | | | | | | | | | | | | This permits GPU support for arbitrary matrices. The only exception is not all stroked ovals are supported, as thin ovals + fat strokes do not produce elliptical borders. R=bsalomon@google.com, robertphillips@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/23701013 git-svn-id: http://skia.googlecode.com/svn/trunk@11115 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r11075.Gravatar jvanverth@google.com2013-09-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11080 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add device-independent GPU rendering of ovals.Gravatar commit-bot@chromium.org2013-09-04
| | | | | | | | | | | | This permits GPU support for arbitrary matrices. The only exception is not all stroked ovals are supported, as thin ovals and fat strokes do not produce ellipses. R=robertphillips@google.com, bsalomon@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/23719004 git-svn-id: http://skia.googlecode.com/svn/trunk@11075 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-08-31
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11049 2bbb7eff-a529-9590-31e7-b0007b416f81
* Isolate VertexBuilder from GrGLShaderBuilderGravatar commit-bot@chromium.org2013-08-30
| | | | | | | | | | | | | | | Adds a nested class to GrGLShaderBuilder called VertexBuilder. Now GrGLShaderBuilder can only modify the fragment shader directly. In order to modify the vertex shader, the client code needs to call getVertexShader, which will return null for vertex-less shaders. R=bsalomon@google.com Author: cdalton@nvidia.com Review URL: https://chromiumcodereview.appspot.com/23754003 git-svn-id: http://skia.googlecode.com/svn/trunk@11046 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix stroked oval and rrect rendering on Ubuntu-x86-Release.Gravatar commit-bot@chromium.org2013-08-30
| | | | | | | | | | | | | | | The Ubuntu-x86 compiler was optimizing out a case where I was reseting the isStroked boolean based on the new inner radii. This changes it to check the radii at the time the effect is created, which tricks the compiler into doing the right thing. R=bsalomon@google.com, robertphillips@google.com Author: jvanverth@google.com Review URL: https://chromiumcodereview.appspot.com/23592021 git-svn-id: http://skia.googlecode.com/svn/trunk@11035 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace uses of GR_DEBUG by SK_DEBUG.Gravatar commit-bot@chromium.org2013-08-28
| | | | | | | | | | | BUG=None R=bsalomon@google.com, robertphillips@google.com Author: tfarina@chromium.org Review URL: https://chromiumcodereview.appspot.com/23137022 git-svn-id: http://skia.googlecode.com/svn/trunk@10978 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace uses of GrAssert by SkASSERT.Gravatar tfarina@chromium.org2013-08-17
| | | | | | | | R=bsalomon@google.com Review URL: https://codereview.chromium.org/22850006 git-svn-id: http://skia.googlecode.com/svn/trunk@10789 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace all instances of GrRect with SkRect.Gravatar commit-bot@chromium.org2013-07-17
| | | | | | | | | | | | And remove the typedef in GrRect.h. The same with GrIRect. R=robertphillips@google.com Author: tfarina@chromium.org Review URL: https://chromiumcodereview.appspot.com/19449002 git-svn-id: http://skia.googlecode.com/svn/trunk@10130 2bbb7eff-a529-9590-31e7-b0007b416f81
* The two leaks are:Gravatar commit-bot@chromium.org2013-07-11
| | | | | | | | | | | | | | | missing unrefs in megalooper GM missing reset capability in oval renderer This CL also expands the instance counting system to some recently adding classes (e.g., SkFontStyleSet) R=bsalomon@google.com, jvanverth@google.com Author: robertphillips@google.com Review URL: https://chromiumcodereview.appspot.com/18461007 git-svn-id: http://skia.googlecode.com/svn/trunk@10030 2bbb7eff-a529-9590-31e7-b0007b416f81
* 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