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

Issue 13852049: Add GPU support for roundrects (Closed)

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

Description

Add GPU support for roundrects 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. Committed: http://code.google.com/p/skia/source/detail?r=8859

Patch Set 1 #

Patch Set 2 : Add new roundrect shader to clean up edges; other edge fixes #

Patch Set 3 : Use circle edge renderer for some rrects; don't draw centers of stroked rrects #

Patch Set 4 : Change to new static creation method #

Patch Set 5 : Remove some unnecessary checks #

Total comments: 29

Patch Set 6 : Changed to use long-lived index buffer; nits #

Patch Set 7 : Initialize index buffer pointer to NULL #

Total comments: 3

Patch Set 8 : Add oval check to SkCanvas #

Unified diffs Side-by-side diffs Delta from patch set Stats (+539 lines, -9 lines) Patch
M include/core/SkDevice.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M include/core/SkDrawFilter.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M include/gpu/GrContext.h View 1 2 3 4 5 6 1 chunk +11 lines, -0 lines 0 comments Download
M include/gpu/GrOvalRenderer.h View 1 2 3 4 5 6 2 chunks +9 lines, -3 lines 0 comments Download
M include/gpu/SkGpuDevice.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M src/core/SkCanvas.cpp View 1 2 3 4 5 6 7 1 chunk +12 lines, -4 lines 0 comments Download
M src/core/SkDevice.cpp View 1 2 3 4 5 6 2 chunks +11 lines, -0 lines 0 comments Download
M src/gpu/GrContext.cpp View 1 2 3 4 5 6 1 chunk +16 lines, -0 lines 0 comments Download
M src/gpu/GrOvalRenderer.cpp View 1 2 3 4 5 6 7 chunks +440 lines, -2 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 2 3 4 5 6 2 chunks +34 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
jvanverth1
Here are the times before (Mac OS): running bench [640 480] rrects_3_stroke_4 GPU: msecs = ...
7 years, 8 months ago (2013-04-24 13:16:00 UTC) #1
bsalomon
Adding Mike for the SkCanvas/SkDevice changes. https://codereview.chromium.org/13852049/diff/18001/src/gpu/GrContext.cpp File src/gpu/GrContext.cpp (right): https://codereview.chromium.org/13852049/diff/18001/src/gpu/GrContext.cpp#newcode978 src/gpu/GrContext.cpp:978: GrDrawState::AutoStageDisable atr(fDrawState); I ...
7 years, 8 months ago (2013-04-24 14:36:38 UTC) #2
jvanverth1
Replies inline. On 2013/04/24 14:36:38, bsalomon wrote: > Adding Mike for the SkCanvas/SkDevice changes. > ...
7 years, 8 months ago (2013-04-24 14:52:49 UTC) #3
robertphillips
lgtm + nits https://codereview.chromium.org/13852049/diff/18001/include/gpu/GrOvalRenderer.h File include/gpu/GrOvalRenderer.h (right): https://codereview.chromium.org/13852049/diff/18001/include/gpu/GrOvalRenderer.h#newcode34 include/gpu/GrOvalRenderer.h:34: bool drawSimpleRRect(GrDrawTarget* target, const GrContext* context, ...
7 years, 8 months ago (2013-04-24 15:13:30 UTC) #4
bsalomon
https://codereview.chromium.org/13852049/diff/18001/src/gpu/GrOvalRenderer.cpp File src/gpu/GrOvalRenderer.cpp (right): https://codereview.chromium.org/13852049/diff/18001/src/gpu/GrOvalRenderer.cpp#newcode756 src/gpu/GrOvalRenderer.cpp:756: On 2013/04/24 15:13:30, robertphillips wrote: > I agree with ...
7 years, 8 months ago (2013-04-24 15:17:20 UTC) #5
jvanverth1
https://codereview.chromium.org/13852049/diff/18001/include/gpu/GrOvalRenderer.h File include/gpu/GrOvalRenderer.h (right): https://codereview.chromium.org/13852049/diff/18001/include/gpu/GrOvalRenderer.h#newcode34 include/gpu/GrOvalRenderer.h:34: bool drawSimpleRRect(GrDrawTarget* target, const GrContext* context, const GrPaint& paint, ...
7 years, 8 months ago (2013-04-24 19:02:27 UTC) #6
bsalomon
lgtm For real adding reed@ for the canvas/device changes this time.
7 years, 8 months ago (2013-04-24 19:55:22 UTC) #7
reed1
lgtm https://codereview.chromium.org/13852049/diff/33002/include/core/SkDevice.h File include/core/SkDevice.h (right): https://codereview.chromium.org/13852049/diff/33002/include/core/SkDevice.h#newcode262 include/core/SkDevice.h:262: virtual void drawRRect(const SkDraw&, const SkRRect& rr, Woot! ...
7 years, 8 months ago (2013-04-25 13:33:55 UTC) #8
jvanverth1
https://codereview.chromium.org/13852049/diff/33002/src/core/SkCanvas.cpp File src/core/SkCanvas.cpp (right): https://codereview.chromium.org/13852049/diff/33002/src/core/SkCanvas.cpp#newcode1584 src/core/SkCanvas.cpp:1584: return; On 2013/04/25 13:33:55, reed1 wrote: > Do you ...
7 years, 8 months ago (2013-04-25 13:37:47 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/jvanverth@google.com/13852049/39001
7 years, 8 months ago (2013-04-25 15:18:45 UTC) #10
commit-bot: I haz the power
7 years, 8 months ago (2013-04-25 15:27:04 UTC) #11
Message was sent while issue was closed.
Change committed as 8859

Powered by Google App Engine
This is Rietveld 408576698