Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(41)

Issue 7137050: Add GPU support for axis-aligned ovals and enable all stroked circles (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by JimVV
Modified:
11 years, 5 months ago
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Add GPU support for axis-aligned ovals: - Add drawOval base function to SkDevice, and override in SkGpuDevice - Move isSimilarityTransform to SkMatrix (renamed to mapsCircleToCircle to match mapsRectToRect) - Since both SkGpuDevice::drawOval() and GrContext::drawPath() can try to draw ovals, added GrContext::canDrawOval() - Hooked in axis-aligned oval fill shader

Patch Set 1 #

Patch Set 2 : Fix oval rect in bench #

Total comments: 38

Patch Set 3 : Moved canDrawOval to private member in GrContext, cleaned up SkMatrix, and nits #

Patch Set 4 : Rebasing to latest #

Total comments: 1

Patch Set 5 : Call drawPath as mutable, and fixup isSimilarity unit test #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+281 lines, -147 lines) Patch
M bench/PathBench.cpp View 1 2 3 4 6 chunks +16 lines, -4 lines 0 comments Download
M include/core/SkDevice.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M include/core/SkDrawFilter.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkMatrix.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M include/gpu/GrContext.h View 1 2 3 4 2 chunks +7 lines, -7 lines 0 comments Download
M include/gpu/SkGpuDevice.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M src/core/SkCanvas.cpp View 1 2 3 4 1 chunk +7 lines, -4 lines 1 comment Download
M src/core/SkDevice.cpp View 1 2 3 4 1 chunk +11 lines, -3 lines 0 comments Download
M src/core/SkMatrix.cpp View 1 2 3 4 1 chunk +38 lines, -0 lines 2 comments Download
M src/gpu/GrContext.cpp View 1 2 3 4 4 chunks +129 lines, -75 lines 0 comments Download
M src/gpu/GrDrawState.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 2 3 4 2 chunks +30 lines, -1 line 0 comments Download
M src/gpu/gl/GrGLProgram.cpp View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M tests/MatrixTest.cpp View 1 2 3 4 4 chunks +23 lines, -53 lines 0 comments Download

Messages

Total messages: 9
JimVV
11 years, 5 months ago (2013-01-17 14:38:25 UTC) #1
reed1
https://codereview.appspot.com/7137050/diff/2001/include/core/SkDevice.h File include/core/SkDevice.h (right): https://codereview.appspot.com/7137050/diff/2001/include/core/SkDevice.h#newcode228 include/core/SkDevice.h:228: const SkPaint& paint); Perhaps we need to document which ...
11 years, 5 months ago (2013-01-17 15:18:27 UTC) #2
robertphillips
LGTM + nits & questions https://codereview.appspot.com/7137050/diff/2001/include/gpu/GrContext.h File include/gpu/GrContext.h (right): https://codereview.appspot.com/7137050/diff/2001/include/gpu/GrContext.h#newcode454 include/gpu/GrContext.h:454: * rename 'rect' to ...
11 years, 5 months ago (2013-01-17 15:25:43 UTC) #3
bsalomon
Do we have a good GM that exercises ovals in interesting ways -hairline stroke -fill ...
11 years, 5 months ago (2013-01-17 16:31:00 UTC) #4
bsalomon
I hand over the keys to my L_G_T_M to Robert since I'll be out of ...
11 years, 5 months ago (2013-01-17 19:55:42 UTC) #5
JimVV
Updated with requested changes. I don't think we have a single GM that covers all ...
11 years, 5 months ago (2013-01-17 20:53:44 UTC) #6
reed1
https://codereview.appspot.com/7137050/diff/17001/src/core/SkDevice.cpp File src/core/SkDevice.cpp (right): https://codereview.appspot.com/7137050/diff/17001/src/core/SkDevice.cpp#newcode334 src/core/SkDevice.cpp:334: // call the non-virtual version pass the last two ...
11 years, 5 months ago (2013-01-17 21:21:13 UTC) #7
JimVV
On 2013/01/17 21:21:13, reed1 wrote: > https://codereview.appspot.com/7137050/diff/17001/src/core/SkDevice.cpp > File src/core/SkDevice.cpp (right): > > https://codereview.appspot.com/7137050/diff/17001/src/core/SkDevice.cpp#newcode334 > ...
11 years, 5 months ago (2013-01-17 22:06:14 UTC) #8
reed1
11 years, 5 months ago (2013-01-18 18:22:36 UTC) #9
lgtm w/ random style thoughts (not required)

https://codereview.appspot.com/7137050/diff/18001/src/core/SkCanvas.cpp
File src/core/SkCanvas.cpp (right):

https://codereview.appspot.com/7137050/diff/18001/src/core/SkCanvas.cpp#newco...
src/core/SkCanvas.cpp:1544: 
Do you want kOval_Type here?

https://codereview.appspot.com/7137050/diff/18001/src/core/SkMatrix.cpp
File src/core/SkMatrix.cpp (right):

https://codereview.appspot.com/7137050/diff/18001/src/core/SkMatrix.cpp#newco...
src/core/SkMatrix.cpp:178: }
hasPerspective() is fine, though (mask & kPerspective_Mask) might be more in
parallel w/ the rest of this code (and minutely faster). Just a style
suggestion, not a request.

https://codereview.appspot.com/7137050/diff/18001/src/core/SkMatrix.cpp#newco...
src/core/SkMatrix.cpp:187: return !SkScalarNearlyZero(mx)
Just a thought. Is this code clearer than

nearlyequal(SkScalarAbs(mx), SkScalarAbs(my))
?
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b