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

Issue 1152963009: Add support for linear gradients, implemented as skia shaders. (Closed)

Created:
5 years, 6 months ago by Matt Perry
Modified:
5 years, 6 months ago
CC:
abarth-chromium, gregsimon, mojo-reviews_chromium.org, qsr+mojo_chromium.org
Base URL:
git@github.com:/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Add support for linear gradients, implemented as skia shaders. I had to complicate the IDL bindings generation to allow passing an array of colors. Without these changes, we'd try to convert the dart object to Vector<SkColor>, which C++ thinks is Vector<unsigned>, and we'd use the wrong converter. So I added some template grease to force it to use a Vector<CanvasColor> converter. R=eseidel@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/7e243bb0c635ef6988a43d5f7cb23e035d0317bb

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Total comments: 6

Patch Set 4 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+233 lines, -41 lines) Patch
M sky/engine/bindings/scripts/dart_types.py View 1 2 3 2 chunks +9 lines, -3 lines 0 comments Download
M sky/engine/core/core.gni View 1 2 3 4 chunks +6 lines, -0 lines 0 comments Download
M sky/engine/core/painting/CanvasColor.h View 1 chunk +7 lines, -0 lines 0 comments Download
M sky/engine/core/painting/CanvasColor.cpp View 1 2 chunks +11 lines, -12 lines 0 comments Download
A sky/engine/core/painting/CanvasGradient.h View 1 2 3 1 chunk +31 lines, -0 lines 0 comments Download
A sky/engine/core/painting/CanvasGradient.cpp View 1 2 3 1 chunk +40 lines, -0 lines 0 comments Download
A sky/engine/core/painting/Gradient.dart View 1 2 3 1 chunk +23 lines, -0 lines 0 comments Download
A sky/engine/core/painting/Gradient.idl View 1 chunk +10 lines, -0 lines 0 comments Download
M sky/engine/core/painting/Paint.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M sky/engine/core/painting/Paint.cpp View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M sky/engine/core/painting/Paint.idl View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M sky/engine/core/painting/Point.h View 1 chunk +1 line, -0 lines 0 comments Download
M sky/engine/core/painting/Point.cpp View 2 chunks +12 lines, -9 lines 0 comments Download
A sky/engine/core/painting/Shader.h View 1 chunk +31 lines, -0 lines 0 comments Download
A + sky/engine/core/painting/Shader.cpp View 1 chunk +4 lines, -5 lines 0 comments Download
A + sky/engine/core/painting/Shader.idl View 1 chunk +2 lines, -1 line 0 comments Download
M sky/engine/tonic/dart_converter.h View 3 chunks +31 lines, -10 lines 0 comments Download
M sky/examples/raw/painting.sky View 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 8 (2 generated)
Matt Perry
5 years, 6 months ago (2015-06-04 21:11:48 UTC) #2
eseidel
Very exciting. https://codereview.chromium.org/1152963009/diff/40001/sky/engine/core/painting/CanvasGradient.h File sky/engine/core/painting/CanvasGradient.h (right): https://codereview.chromium.org/1152963009/diff/40001/sky/engine/core/painting/CanvasGradient.h#newcode20 sky/engine/core/painting/CanvasGradient.h:20: static PassRefPtr<CanvasGradient> create(int type, enum? https://codereview.chromium.org/1152963009/diff/40001/sky/engine/core/painting/Shader.h File ...
5 years, 6 months ago (2015-06-04 21:21:12 UTC) #4
Matt Perry
ping
5 years, 6 months ago (2015-06-08 17:22:38 UTC) #5
eseidel
lgtm https://codereview.chromium.org/1152963009/diff/40001/sky/engine/core/painting/CanvasGradient.cpp File sky/engine/core/painting/CanvasGradient.cpp (right): https://codereview.chromium.org/1152963009/diff/40001/sky/engine/core/painting/CanvasGradient.cpp#newcode14 sky/engine/core/painting/CanvasGradient.cpp:14: Vector<Point> end_points, These are going to cause the ...
5 years, 6 months ago (2015-06-08 17:26:57 UTC) #6
Matt Perry
https://codereview.chromium.org/1152963009/diff/40001/sky/engine/core/painting/CanvasGradient.cpp File sky/engine/core/painting/CanvasGradient.cpp (right): https://codereview.chromium.org/1152963009/diff/40001/sky/engine/core/painting/CanvasGradient.cpp#newcode14 sky/engine/core/painting/CanvasGradient.cpp:14: Vector<Point> end_points, On 2015/06/08 17:26:57, eseidel wrote: > These ...
5 years, 6 months ago (2015-06-08 17:43:53 UTC) #7
Matt Perry
5 years, 6 months ago (2015-06-08 17:49:16 UTC) #8
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
7e243bb0c635ef6988a43d5f7cb23e035d0317bb (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698