Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Issue 12676027: Replace edge types with GrEdgeEffect (Closed)

Created:
7 years, 9 months ago by jvanverth1
Modified:
7 years, 8 months ago
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

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.

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+270 lines, -202 lines) Patch
M gyp/gpu.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M src/gpu/GrAAConvexPathRenderer.cpp View 4 chunks +16 lines, -6 lines 0 comments Download
M src/gpu/GrAAHairLinePathRenderer.cpp View 7 chunks +19 lines, -8 lines 0 comments Download
M src/gpu/GrDrawState.h View 7 chunks +1 line, -57 lines 0 comments Download
M src/gpu/GrDrawState.cpp View 4 chunks +13 lines, -18 lines 0 comments Download
A src/gpu/effects/GrEdgeEffect.h View 1 chunk +84 lines, -0 lines 1 comment Download
A src/gpu/effects/GrEdgeEffect.cpp View 1 chunk +128 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLProgram.h View 3 chunks +0 lines, -8 lines 0 comments Download
M src/gpu/gl/GrGLProgram.cpp View 9 chunks +3 lines, -90 lines 0 comments Download
M tests/GLProgramsTest.cpp View 2 chunks +4 lines, -15 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
jvanverth1
Here's the last of the edge attribute. I probably won't get to landing it before ...
7 years, 9 months ago (2013-03-22 20:47:53 UTC) #1
bsalomon
7 years, 9 months ago (2013-03-25 13:35:54 UTC) #2
I might argue for separate classes for the edge effects since they don't share
very much. But I'd rather land this first and split them later if we think
that's a good idea.

I think we need some protection against using this when derivative functions
aren't supported (for kQuad and kHairQuad only). I believe the calling code will
handle that by not installing the GrPathRenderers that use the effects but I'm
not sure about the GLPrograms unit test. But it'd still be nice to have some
asserts down in the effect that derivative instructions are supported for cases
where we require them. It isn't possible now because that info is part of
GrDrawTarget::Caps not GrGLCaps.

I'll try to land a change that cleans up our caps situation and then see if I
can update this patch to guard against generated GrEdgeEffects without gradient
instruction support.

https://codereview.chromium.org/12676027/diff/1/src/gpu/effects/GrEdgeEffect.h
File src/gpu/effects/GrEdgeEffect.h (right):

https://codereview.chromium.org/12676027/diff/1/src/gpu/effects/GrEdgeEffect....
src/gpu/effects/GrEdgeEffect.h:19: * TODO: Fix the fact that HairLine edge types
use y-down coords.
I think this copied comment is out-of-date. We're using
GrGLShaderBuilder::fragmentPosition() in the code which will be Skia's notion of
device coords.

Powered by Google App Engine
This is Rietveld 408576698