Commit Graph

76 Commits

Author SHA1 Message Date
commit-bot@chromium.org
261dc569b6 Move VertexBuilder to a GrGLFullShaderBuilder subclass
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
2013-10-04 15:42:56 +00:00
commit-bot@chromium.org
3390b9ac9a Repurpose GrGLCoordTransform as GrGLProgramEffects
Creates a GrGLProgramEffects class that the GrGLProgram uses to manage
an array of effects. This gives us enough abstraction for the program
to cleanly handle different types of coord transforms.

R=bsalomon@google.com

Author: cdalton@nvidia.com

Review URL: https://codereview.chromium.org/25605008

git-svn-id: http://skia.googlecode.com/svn/trunk@11588 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-03 15:17:58 +00:00
commit-bot@chromium.org
09846a05be Add new skyline Rectanizer
The skyline Rectanizer tracks the leading silhouette of the
currently packed rects and tries to fit the next rectangle
on top of that. This gives slightly better packing behavior
than the current log2 scheme.

Also shrank the size of the plots, which increases their
number from 18 to 32 and gives better cache behavior (fewer
purges and uploads).

R=bsalomon@google.com

Author: jvanverth@google.com

Review URL: https://codereview.chromium.org/25584002

git-svn-id: http://skia.googlecode.com/svn/trunk@11577 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-02 17:37:59 +00:00
bsalomon@google.com
ea1abfcab6 Fix gpu.gypi missing file issue
git-svn-id: http://skia.googlecode.com/svn/trunk@11571 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-02 15:02:55 +00:00
bsalomon@google.com
77af6805e5 Make GPU coord transforms automatic
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
2013-10-02 13:04:56 +00:00
commit-bot@chromium.org
76eaf749cf Add a GrCustomCoordsTextureEffect class
Extracts a GrCustomCoordsTextureEffect class from
GrSimpleTextureEffect. This way there are no effects that can
conditionally require a vertex shader. They either always need one or
never do. Also removes kCustom_CoordsType from the CoordsType enum in
GrEffect (that enum is really only meant for coords provided by the
framework), and updates GrSimpleTextureEffect::TestCreate to make the
effect with position as well, instead of just local coords.

R=bsalomon@google.com

Author: cdalton@nvidia.com

Review URL: https://codereview.chromium.org/24018007

git-svn-id: http://skia.googlecode.com/svn/trunk@11531 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 18:41:38 +00:00
reed@google.com
939ca7ce86 move GrMalloc, GrFree, Gr_bzero to their sk equivalents
BUG=
R=bsalomon@google.com

Review URL: https://codereview.chromium.org/23566022

git-svn-id: http://skia.googlecode.com/svn/trunk@11486 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-26 19:56:51 +00:00
commit-bot@chromium.org
a0b40280a4 Replace uses of GrNoncopyable by SkNoncopyable.
BUG=None
TEST=None, no functional changes.
R=bsalomon@google.com, robertphillips@google.com

Author: tfarina@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23483042

git-svn-id: http://skia.googlecode.com/svn/trunk@11341 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-18 13:00:55 +00:00
commit-bot@chromium.org
a4de8c257e Remove GrRefCnt.h in favor of SkRefCnt.h
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
2013-09-09 13:38:37 +00:00
jvanverth@google.com
bfe2b9d3a2 Move oval and rect renderer includes to private interface
R=bsalomon@google.com, robertphillips@google.com

Review URL: https://codereview.chromium.org/23513016

git-svn-id: http://skia.googlecode.com/svn/trunk@11132 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-06 16:57:29 +00:00
humper@google.com
3aad3b01af add support for high quality image filtering on the GPU
R=bsalomon@google.com, reed@google.com

Review URL: https://codereview.chromium.org/23779003

git-svn-id: http://skia.googlecode.com/svn/trunk@11087 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-04 19:23:53 +00:00
commit-bot@chromium.org
07e1c3fd50 Pull out Effect Shaders in GPU Path Renderer
Move the effects in HairLinePathRender (and eventually others into their
own class called GrBezierEffects. This will allow for more sharing of
code between different path renderers on GPU.

BUG=

Committed: http://code.google.com/p/skia/source/detail?r=10877

R=bsalomon@google.com, jvanverth@google.com, robertphillips@google.com

Author: egdaniel@google.com

Review URL: https://chromiumcodereview.appspot.com/23004010

git-svn-id: http://skia.googlecode.com/svn/trunk@10884 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-22 20:41:15 +00:00
egdaniel@google.com
2398bbd8dc Revert "Pull out Effect Shaders in GPU Path Renderer"
This reverts commit c48a99661cb3df9baa7012c001f8d7dcf0a2f368.

git-svn-id: http://skia.googlecode.com/svn/trunk@10881 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-22 18:32:25 +00:00
commit-bot@chromium.org
89ff637a84 Pull out Effect Shaders in GPU Path Renderer
Move the effects in HairLinePathRender (and eventually others into their
own class called GrBezierEffects. This will allow for more sharing of
code between different path renderers on GPU.

BUG=
R=bsalomon@google.com, jvanverth@google.com, robertphillips@google.com

Author: egdaniel@google.com

Review URL: https://chromiumcodereview.appspot.com/23004010

git-svn-id: http://skia.googlecode.com/svn/trunk@10877 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-22 17:31:06 +00:00
commit-bot@chromium.org
24ab3b0ce5 Add blend optimization helpers and use to convert rect draws to clears.
R=robertphillips@google.com, jvanverth@google.com

Author: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/22558003

git-svn-id: http://skia.googlecode.com/svn/trunk@10723 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-14 21:56:37 +00:00
bsalomon@google.com
75796db3b3 Revert "Add blend optimization helpers and use to convert rect draws to clears."
This reverts commit r10537.

git-svn-id: http://skia.googlecode.com/svn/trunk@10601 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-07 13:34:14 +00:00
commit-bot@chromium.org
c1cdf21ab8 Add blend optimization helpers and use to convert rect draws to clears.
Committed: http://code.google.com/p/skia/source/detail?r=10537

R=robertphillips@google.com, jvanverth@google.com, reed@google.com

Author: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/21877006

git-svn-id: http://skia.googlecode.com/svn/trunk@10562 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-06 15:07:23 +00:00
bsalomon@google.com
9b6a185e36 Revert "Add blend optimization helpers and use to convert rect draws to clears."
This reverts commit r10537.

git-svn-id: http://skia.googlecode.com/svn/trunk@10542 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-05 18:27:23 +00:00
commit-bot@chromium.org
66017f6cc5 Add blend optimization helpers and use to convert rect draws to clears.
R=robertphillips@google.com, jvanverth@google.com, reed@google.com

Author: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/21877006

git-svn-id: http://skia.googlecode.com/svn/trunk@10537 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-05 16:55:55 +00:00
commit-bot@chromium.org
42dacab4e7 Make GrPaint have a variable sized array of color and coverage stages rather than a fixed size.
R=robertphillips@google.com, jvanverth@google.com

Author: bsalomon@google.com

Review URL: https://chromiumcodereview.appspot.com/18686007

git-svn-id: http://skia.googlecode.com/svn/trunk@10062 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-07-13 17:24:24 +00:00
robertphillips@google.com
e63296e5d6 Fuse skgr & gr targets in gyp files
https://codereview.chromium.org/17101010/



git-svn-id: http://skia.googlecode.com/svn/trunk@9653 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-18 14:43:53 +00:00
bsalomon@google.com
018f179efb Expand modulate, add, subtract, extract component glsl helpers.
Review URL: https://codereview.chromium.org/13895006

git-svn-id: http://skia.googlecode.com/svn/trunk@8755 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-18 19:36:09 +00:00
commit-bot@chromium.org
90c240aca0 Move edge GrEffects to locally defined classes.
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
2013-04-02 17:57:21 +00:00
bsalomon@google.com
798c8c4fe6 Move GrGLProgramDesc::Build to new cpp file.
Review URL: https://codereview.chromium.org/13097007

git-svn-id: http://skia.googlecode.com/svn/trunk@8414 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-27 19:50:27 +00:00
bsalomon@google.com
31ec7985f2 Move GrGLProgram::Desc out of GrGLProgram.
Review URL: https://codereview.chromium.org/12942014

git-svn-id: http://skia.googlecode.com/svn/trunk@8411 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-27 18:14:57 +00:00
bsalomon@google.com
4647f90598 Replace edge types with GrEdgeEffect.
This strips out last of the edge types and the fixed function edge attribute and replaces them with using GrEdgeEffect. Also fixes a minor bug when checking attribute counts -- it was using kAttribIndexCount instead of kVertexAttribCnt. 

Original Author: jvanverth@google.com
Review URL: https://codereview.chromium.org/13069003

git-svn-id: http://skia.googlecode.com/svn/trunk@8392 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-26 14:45:27 +00:00
bsalomon@google.com
c26d94fd7d Move nested class GrDrawTarget::Caps out as GrDrawTargetCaps.
Pass caps to GrEffect::TestCreate() functions so that they can return effects that will work with the capabilities.
Review URL: https://codereview.chromium.org/12965018

git-svn-id: http://skia.googlecode.com/svn/trunk@8369 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25 18:19:00 +00:00
commit-bot@chromium.org
81312830ef Move oval rendering code to GrOvalRenderer.
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
2013-03-22 18:34:09 +00:00
jvanverth@google.com
65eb4d5a21 Add stroked ovals and CircleEdgeEffect.
Adds some optimizations to the circle and ellipse shaders, static effect 
instances for their GrEffects, and some minor changes to GrDrawState::setEffect
to make GrEffect setup faster.


git-svn-id: http://skia.googlecode.com/svn/trunk@8238 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-19 18:51:02 +00:00
skia.committer@gmail.com
91274b9972 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8120 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-13 07:01:04 +00:00
commit-bot@chromium.org
ff6ea2663f Add GrEllipseEdgeEffect.
Adds the effect that replaces the old oval rendering code. Also hooks in code to set attribute names and indices for effects.

Author: jvanverth@google.com

Review URL: https://chromiumcodereview.appspot.com/12462008

git-svn-id: http://skia.googlecode.com/svn/trunk@8092 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-12 12:26:08 +00:00
bsalomon@google.com
6918d482d6 Use vertex array objects on core profiles.
Review URL: https://codereview.chromium.org/12533007

git-svn-id: http://skia.googlecode.com/svn/trunk@8024 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-07 19:09:11 +00:00
bsalomon@google.com
ecd84842b3 Add support to GrGLInterface for vertex array objects
Committed: https://code.google.com/p/skia/source/detail?r=7919
Review URL: https://codereview.chromium.org/12379025

git-svn-id: http://skia.googlecode.com/svn/trunk@7924 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-01 15:36:02 +00:00
bsalomon@google.com
b82c3993c2 Revert 7919 and 7920 (committed wrong version of r7919.)
git-svn-id: http://skia.googlecode.com/svn/trunk@7923 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-01 15:32:49 +00:00
bsalomon@google.com
87c6d7a99e Add support to GrGLInterface for vertex array objects
Review URL: https://codereview.chromium.org/12379025

git-svn-id: http://skia.googlecode.com/svn/trunk@7919 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-01 14:37:18 +00:00
robertphillips@google.com
6177e6999d Split GrGLContextInfo into GrGLContext & GrGLContextInfo
https://codereview.appspot.com/7436045/



git-svn-id: http://skia.googlecode.com/svn/trunk@7905 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-28 20:16:25 +00:00
bsalomon@google.com
1744f97ea7 Use glGetStringi to get extensions when available.
Review URL: https://codereview.chromium.org/12328111

git-svn-id: http://skia.googlecode.com/svn/trunk@7872 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-26 21:46:32 +00:00
bsalomon@google.com
8f9436161a Consolidate functions common the the null and debug GL interfaces.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/7400053

git-svn-id: http://skia.googlecode.com/svn/trunk@7860 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-26 14:34:43 +00:00
bsalomon@google.com
e49ad45404 Add GrGLBufferImpl to unify implementation of GrGLVertexBuffer and GrGLIndexBuffer.
Review URL: https://codereview.appspot.com/7346055

git-svn-id: http://skia.googlecode.com/svn/trunk@7798 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-20 19:33:20 +00:00
bsalomon@google.com
85983288ba Remove compile time option to use different types for text vertices.
Review URL: https://codereview.appspot.com/7309060

git-svn-id: http://skia.googlecode.com/svn/trunk@7658 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 22:00:29 +00:00
bsalomon@google.com
68b58c9538 Remove default implementation of GrEffect::isEqual. Make GrSingleTextureEffect abstract.
Review URL: https://codereview.appspot.com/7142049

git-svn-id: http://skia.googlecode.com/svn/trunk@7254 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-17 16:50:08 +00:00
bsalomon@google.com
21cbec4870 Remove GrTDArray.
Two dynamic array classes is enough.

R=reed@google.com
Review URL: https://codereview.appspot.com/7069047

git-svn-id: http://skia.googlecode.com/svn/trunk@7053 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-07 17:23:00 +00:00
bsalomon@google.com
11f20d6270 Remove GrInstanceCounter.
R=reed@google.com
Review URL: https://codereview.appspot.com/6849125

git-svn-id: http://skia.googlecode.com/svn/trunk@6972 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-02 19:57:10 +00:00
bsalomon@google.com
0797c2ccea Reland 6914 w/ fixes.
git-svn-id: http://skia.googlecode.com/svn/trunk@6916 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-20 15:13:01 +00:00
bsalomon@google.com
0b6ad2297f Revert 6914 to fix build issues.
git-svn-id: http://skia.googlecode.com/svn/trunk@6915 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-20 14:23:26 +00:00
bsalomon@google.com
4b86e3428b Simplify cache IDs and keys.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6954047

git-svn-id: http://skia.googlecode.com/svn/trunk@6914 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-20 14:18:10 +00:00
bsalomon@google.com
45a15f551b Modifications to GrPatherRenderer(Chain) interfaces to support clip mask manager.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6904069

git-svn-id: http://skia.googlecode.com/svn/trunk@6741 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-10 19:10:17 +00:00
bsalomon@google.com
170bd792e1 Move GrReducedClip to its own files.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6891045

git-svn-id: http://skia.googlecode.com/svn/trunk@6686 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-05 22:26:11 +00:00
tfarina@chromium.org
223137f49d Remove GrRandom API in favor of SkRandom.
TEST=tests
R=bsalomon@google.com

Review URL: https://codereview.appspot.com/6855062

git-svn-id: http://skia.googlecode.com/svn/trunk@6539 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-21 22:38:36 +00:00
bsalomon@google.com
b9086a0268 Replace GrMatrix with SkMatrix.
Review URL: https://codereview.appspot.com/6814067

git-svn-id: http://skia.googlecode.com/svn/trunk@6247 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-01 18:02:54 +00:00