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

Issue 405163003: SkPatch abstraction (Closed)

Created:
6 years, 5 months ago by dandov
Modified:
6 years, 4 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Added class SkPatch as a new drawing primitive for the library, it is the abstraction of a coons patch. SkPatch's method getVertexData generates the points, colors and texture coordinates and indices associated with the patch at a certain level of detail. Added a slide to sample app to show how to set up this classes and how they interact. BUG=skia: Committed: https://skia.googlesource.com/skia/+/50d715476b1d3a00fb43c13e34a80ea0a01d32bf

Patch Set 1 #

Total comments: 28

Patch Set 2 : Fixed most of the issues, still have to modify the API #

Patch Set 3 : Fixed indents #

Patch Set 4 : New API for SkPatch #

Patch Set 5 : Ajusted GM to new API #

Patch Set 6 : Get data directly from SkPatch #

Total comments: 7

Patch Set 7 : Adjusted names and comments for more readability #

Total comments: 26

Patch Set 8 : Moved ownership of vertex data out of SkPatch #

Total comments: 12

Patch Set 9 : Enum for control points #

Total comments: 12

Patch Set 10 : Small fixes and recover gyp files #

Total comments: 1

Patch Set 11 : Renamed SkPatch::PatchData to SkPatch::VertexData #

Patch Set 12 : Fixed failures #

Patch Set 13 : GPU only flag #

Patch Set 14 : Skip tiled flag #

Unified diffs Side-by-side diffs Delta from patch set Stats (+463 lines, -0 lines) Patch
A gm/patch.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +112 lines, -0 lines 0 comments Download
M gyp/core.gypi View 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M gyp/gmslides.gypi View 8 9 1 chunk +1 line, -0 lines 0 comments Download
A include/core/SkPatch.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +124 lines, -0 lines 0 comments Download
A src/core/SkPatch.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +224 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
dandov
First iteration of the skpatch. Currently the GM just calls drawIndexed for the GPU backed ...
6 years, 5 months ago (2014-07-21 20:01:07 UTC) #1
egdaniel
Just a first quick scan, more later https://codereview.chromium.org/405163003/diff/1/include/core/SkPatch.h File include/core/SkPatch.h (right): https://codereview.chromium.org/405163003/diff/1/include/core/SkPatch.h#newcode11 include/core/SkPatch.h:11: #include "SkPreConfig.h" ...
6 years, 5 months ago (2014-07-21 21:16:03 UTC) #2
jvanverth1
A first pass at comments from me: https://codereview.chromium.org/405163003/diff/1/include/core/SkPatch.h File include/core/SkPatch.h (right): https://codereview.chromium.org/405163003/diff/1/include/core/SkPatch.h#newcode21 include/core/SkPatch.h:21: class SkPatchMesh; ...
6 years, 5 months ago (2014-07-21 22:10:10 UTC) #3
egdaniel
First, the api seems strange to me having public methods for setting all the properties ...
6 years, 5 months ago (2014-07-21 23:55:48 UTC) #4
dandov
I fixed most of the small issues from the comments, I still have to see ...
6 years, 5 months ago (2014-07-22 13:55:14 UTC) #5
dandov
Fixed the API https://codereview.chromium.org/405163003/diff/80002/gm/patch.cpp File gm/patch.cpp (right): https://codereview.chromium.org/405163003/diff/80002/gm/patch.cpp#newcode41 gm/patch.cpp:41: // This is a GPU-specific GM. ...
6 years, 5 months ago (2014-07-22 18:00:31 UTC) #6
egdaniel
https://codereview.chromium.org/405163003/diff/80002/include/core/SkPatch.h File include/core/SkPatch.h (right): https://codereview.chromium.org/405163003/diff/80002/include/core/SkPatch.h#newcode27 include/core/SkPatch.h:27: void reset(int res); what exactly is the meaning behind ...
6 years, 5 months ago (2014-07-22 19:09:36 UTC) #7
dandov
Added description of forward differences, changed SkColor (*colors)[4] parameter of SkPatch to SkColor color[4] and ...
6 years, 5 months ago (2014-07-22 20:23:28 UTC) #8
jvanverth1
I think on the surface this meets Mike's request to get just SkPatch and a ...
6 years, 4 months ago (2014-07-24 17:37:05 UTC) #9
bsalomon
https://codereview.chromium.org/405163003/diff/110001/gm/patch.cpp File gm/patch.cpp (right): https://codereview.chromium.org/405163003/diff/110001/gm/patch.cpp#newcode32 gm/patch.cpp:32: return SkString("skpatch"); maybe just call it patch? I don't ...
6 years, 4 months ago (2014-07-24 18:10:24 UTC) #10
jvanverth1
https://codereview.chromium.org/405163003/diff/110001/include/core/SkPatch.h File include/core/SkPatch.h (right): https://codereview.chromium.org/405163003/diff/110001/include/core/SkPatch.h#newcode60 include/core/SkPatch.h:60: inline SkPoint operator++() { On 2014/07/24 18:10:23, bsalomon wrote: ...
6 years, 4 months ago (2014-07-24 18:25:22 UTC) #11
egdaniel
https://codereview.chromium.org/405163003/diff/110001/include/core/SkPatch.h File include/core/SkPatch.h (right): https://codereview.chromium.org/405163003/diff/110001/include/core/SkPatch.h#newcode11 include/core/SkPatch.h:11: #include "SkColor.h" Is it possible to not include skcolor ...
6 years, 4 months ago (2014-07-24 19:07:38 UTC) #12
dandov
Fixed all the minor changes and removed the ownership of the vertex data from SkPatch ...
6 years, 4 months ago (2014-07-24 19:56:47 UTC) #13
bsalomon
https://codereview.chromium.org/405163003/diff/130001/include/core/SkPatch.h File include/core/SkPatch.h (right): https://codereview.chromium.org/405163003/diff/130001/include/core/SkPatch.h#newcode21 include/core/SkPatch.h:21: struct PatchData { Maybe a comment here about how ...
6 years, 4 months ago (2014-07-25 13:14:35 UTC) #14
dandov
Added the enum for the control points and inverted the top and bottom curves. Passed ...
6 years, 4 months ago (2014-07-25 14:08:14 UTC) #15
bsalomon
https://codereview.chromium.org/405163003/diff/150001/include/core/SkPatch.h File include/core/SkPatch.h (right): https://codereview.chromium.org/405163003/diff/150001/include/core/SkPatch.h#newcode23 include/core/SkPatch.h:23: * as a parameter to the function getVertexData. "The ...
6 years, 4 months ago (2014-07-25 14:16:37 UTC) #16
egdaniel
Look likes you may have lost your gyp files along the way https://codereview.chromium.org/405163003/diff/150001/include/core/SkPatch.h File include/core/SkPatch.h ...
6 years, 4 months ago (2014-07-25 14:49:27 UTC) #17
dandov
Recovered gyp files and made small changes based on comments. https://codereview.chromium.org/405163003/diff/150001/include/core/SkPatch.h File include/core/SkPatch.h (right): https://codereview.chromium.org/405163003/diff/150001/include/core/SkPatch.h#newcode23 ...
6 years, 4 months ago (2014-07-25 15:07:09 UTC) #18
bsalomon
lgtm. One optional suggestion: rename PatchData to VertexData, , MeshData, or TessData since it captures ...
6 years, 4 months ago (2014-07-25 15:18:08 UTC) #19
dandov
The CQ bit was checked by dandov@google.com
6 years, 4 months ago (2014-07-25 15:31:47 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/dandov@google.com/405163003/190001
6 years, 4 months ago (2014-07-25 15:32:50 UTC) #21
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Mac10.8-Clang-x86-Release-Trybot on tryserver.skia ...
6 years, 4 months ago (2014-07-25 15:47:42 UTC) #22
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-07-25 15:49:21 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug-Trybot on tryserver.skia (http://108.170.220.120:10117/builders/Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug-Trybot/builds/863)
6 years, 4 months ago (2014-07-25 15:49:22 UTC) #24
dandov
The CQ bit was checked by dandov@google.com
6 years, 4 months ago (2014-07-25 17:31:18 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/dandov@google.com/405163003/230001
6 years, 4 months ago (2014-07-25 17:31:44 UTC) #26
commit-bot: I haz the power
6 years, 4 months ago (2014-07-25 17:45:00 UTC) #27
Message was sent while issue was closed.
Change committed as 50d715476b1d3a00fb43c13e34a80ea0a01d32bf

Powered by Google App Engine
This is Rietveld 408576698