Closed Bug 1616587 Opened 5 years ago Closed 5 years ago

Implement conic-gradient for Skia graphics backend

Categories

(Core :: Graphics, enhancement, P5)

enhancement

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: ntim, Assigned: ntim)

References

Details

Attachments

(1 file)

I think Skia has an API to do this: https://searchfox.org/mozilla-central/search?q=conical&case=false&regexp=false&path=gfx%2Fskia
SweepGradient is the right API for this in Skia.

https://fiddle.skia.org/ looks pretty useful to understand the API. See https://skia.org/user/api/skpaint_overview

Type: task → enhancement
Priority: -- → P5
Assignee: nobody → ntim.bugs
Depends on: 1615862
Attachment #9127719 - Attachment description: Bug 1616587 - Implement conic-gradient for Skia graphics backend → Bug 1616587 - Implement conic-gradient for Skia graphics backend.
Pushed by ntim.bugs@gmail.com: https://hg.mozilla.org/integration/autoland/rev/2d804daeaccb Implement conic-gradient for Skia graphics backend. r=lsalzman

Backed out for bustage on DrawTargetCairo.cpp

backout: https://hg.mozilla.org/integration/autoland/rev/4552aa5c9c7c37107293fd6f5942c9ab08da02f1

push: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=2d804daeaccba403e143fbe96ffaaef0a7c6c96c&group_state=expanded&selectedJob=289764980

failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=289764980&repo=autoland&lineNumber=29342

[task 2020-02-20T23:13:20.665Z] 23:13:20 INFO - In file included from Unified_cpp_gfx_2d0.cpp:83:
[task 2020-02-20T23:13:20.665Z] 23:13:20 ERROR - /builds/worker/workspace/build/src/gfx/2d/DrawTargetCairo.cpp:524:5: error: variable 'pat' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
[task 2020-02-20T23:13:20.665Z] 23:13:20 INFO - default: {
[task 2020-02-20T23:13:20.665Z] 23:13:20 INFO - ^~~~~~~
[task 2020-02-20T23:13:20.665Z] 23:13:20 INFO - /builds/worker/workspace/build/src/gfx/2d/DrawTargetCairo.cpp:540:10: note: uninitialized use occurs here
[task 2020-02-20T23:13:20.665Z] 23:13:20 INFO - return pat;
[task 2020-02-20T23:13:20.665Z] 23:13:20 INFO - ^~~
[task 2020-02-20T23:13:20.665Z] 23:13:20 INFO - /builds/worker/workspace/build/src/gfx/2d/DrawTargetCairo.cpp:449:23: note: initialize the variable 'pat' to silence this warning
[task 2020-02-20T23:13:20.665Z] 23:13:20 INFO - cairo_pattern_t* pat;
[task 2020-02-20T23:13:20.665Z] 23:13:20 INFO - ^
[task 2020-02-20T23:13:20.665Z] 23:13:20 INFO - = nullptr
[task 2020-02-20T23:13:20.665Z] 23:13:20 INFO - In file included from Unified_cpp_gfx_2d0.cpp:119:
[task 2020-02-20T23:13:20.665Z] 23:13:20 ERROR - /builds/worker/workspace/build/src/gfx/2d/DrawTargetRecording.cpp:618:20: error: enumeration value 'CONIC_GRADIENT' not handled in switch [-Werror,-Wswitch]
[task 2020-02-20T23:13:20.665Z] 23:13:20 INFO - switch (aPattern.GetType()) {
[task 2020-02-20T23:13:20.665Z] 23:13:20 INFO - ^
[task 2020-02-20T23:13:20.666Z] 23:13:20 INFO - In file included from Unified_cpp_gfx_2d0.cpp:137:
[task 2020-02-20T23:13:20.666Z] 23:13:20 ERROR - /builds/worker/workspace/build/src/gfx/2d/DrawTargetWrapAndRecord.cpp:706:20: error: enumeration value 'CONIC_GRADIENT' not handled in switch [-Werror,-Wswitch]
[task 2020-02-20T23:13:20.666Z] 23:13:20 INFO - switch (aPattern.GetType()) {
[task 2020-02-20T23:13:20.666Z] 23:13:20 INFO - ^
[task 2020-02-20T23:13:20.666Z] 23:13:20 INFO - 3 errors generated.
[task 2020-02-20T23:13:20.666Z] 23:13:20 INFO - /builds/worker/workspace/build/src/config/rules.mk:731: recipe for target 'Unified_cpp_gfx_2d0.o' failed
[task 2020-02-20T23:13:20.666Z] 23:13:20 ERROR - make[4]: *** [Unified_cpp_gfx_2d0.o] Error 1

Flags: needinfo?(ntim.bugs)
Pushed by ntim.bugs@gmail.com: https://hg.mozilla.org/integration/autoland/rev/bf981458da0c Implement conic-gradient for Skia graphics backend. r=lsalzman
Flags: needinfo?(ntim.bugs)

Backed out for bustage on DrawTargetCairo.cpp - error: unused variable 'pattern' [-Werror,-Wunused-variable]

backout: https://hg.mozilla.org/integration/autoland/rev/d55fdb45e7aca86c1f0e39f8e5ea6bd877d6be8c

push: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=bf981458da0c8c2a711fe5370a39bc7819eed4fd&group_state=expanded&selectedJob=289777676

failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=289777676&repo=autoland&lineNumber=29235

[task 2020-02-21T00:02:25.639Z] 00:02:25 INFO - In file included from Unified_cpp_gfx_2d0.cpp:83:
[task 2020-02-21T00:02:25.639Z] 00:02:25 ERROR - /builds/worker/workspace/build/src/gfx/2d/DrawTargetCairo.cpp:530:35: error: unused variable 'pattern' [-Werror,-Wunused-variable]
[task 2020-02-21T00:02:25.639Z] 00:02:25 INFO - const ConicGradientPattern& pattern =
[task 2020-02-21T00:02:25.639Z] 00:02:25 INFO - ^
[task 2020-02-21T00:02:25.639Z] 00:02:25 INFO - 1 error generated.
[task 2020-02-21T00:02:25.639Z] 00:02:25 INFO - /builds/worker/workspace/build/src/config/rules.mk:731: recipe for target 'Unified_cpp_gfx_2d0.o' failed
[task 2020-02-21T00:02:25.639Z] 00:02:25 ERROR - make[4]: *** [Unified_cpp_gfx_2d0.o] Error 1
[task 2020-02-21T00:02:25.639Z] 00:02:25 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/gfx/2d'
[task 2020-02-21T00:02:25.639Z] 00:02:25 INFO - make[4]: *** Waiting for unfinished jobs....

Flags: needinfo?(ntim.bugs)
Flags: needinfo?(ntim.bugs)
Pushed by ntim.bugs@gmail.com: https://hg.mozilla.org/integration/autoland/rev/7c4f276cf807 Implement conic-gradient for Skia graphics backend. r=lsalzman
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
Regressions: 1619006
Depends on: 1620328
Depends on: 1620951
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: