Closed Bug 1697670 Opened 5 years ago Closed 5 years ago

YUVColorSpace::UNKNOWN should be Maybe<YUVColorSpace>

Categories

(Core :: Graphics, task)

task

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: jgilbert, Assigned: jgilbert)

Details

Attachments

(1 external file)

It makes it really hard to change or maintain code when sometimes it can be UNKNOWN, but not other times, and we just sorta hope for the best and fix errors/asserts as we hit them.

Instead, we should extract as much compile-time guarantee as possible, and fall back to Maybe<YUVColorSpace> if we need runtime fallibility.

Replace with Maybe<YUVColorSpace> where still needed.

Pushed by jgilbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f155cf6af343 Remove gfx::YUVColorSpace::UNKNOWN. r=mstange

Backed out for bustage on gfxUtils.cpp

backout: https://hg.mozilla.org/integration/autoland/rev/6328fc731c222bba0198e6785ea06146a3776402

push: https://treeherder.mozilla.org/jobs?repo=autoland&searchStr=linux%2Cx64%2Cdebug%2Cbuild-linux64-base-toolchains%2Fdebug%2Cbb&revision=f155cf6af343014b74590906e07181ebc2b991af

failure log: https://treeherder.mozilla.org/logviewer?job_id=333469896&repo=autoland&lineNumber=42141

[task 2021-03-17T00:26:41.121Z] 00:26:41 INFO - In file included from Unified_cpp_gfx_thebes1.cpp:119:0:
[task 2021-03-17T00:26:41.122Z] 00:26:41 INFO - /builds/worker/checkouts/gecko/gfx/thebes/gfxUtils.cpp: In static member function 'static const float* gfxUtils::YuvToRgbMatrix4x3RowMajor(mozilla::gfx::YUVColorSpace)':
[task 2021-03-17T00:26:41.122Z] 00:26:41 ERROR - /builds/worker/checkouts/gecko/gfx/thebes/gfxUtils.cpp:1132:1: error: control reaches end of non-void function [-Werror=return-type]
[task 2021-03-17T00:26:41.122Z] 00:26:41 INFO - }
[task 2021-03-17T00:26:41.122Z] 00:26:41 INFO - ^
[task 2021-03-17T00:26:41.123Z] 00:26:41 INFO - /builds/worker/checkouts/gecko/gfx/thebes/gfxUtils.cpp: In static member function 'static const float* gfxUtils::YuvToRgbMatrix3x3ColumnMajor(mozilla::gfx::YUVColorSpace)':
[task 2021-03-17T00:26:41.123Z] 00:26:41 ERROR - /builds/worker/checkouts/gecko/gfx/thebes/gfxUtils.cpp:1156:1: error: control reaches end of non-void function [-Werror=return-type]
[task 2021-03-17T00:26:41.123Z] 00:26:41 INFO - }
[task 2021-03-17T00:26:41.124Z] 00:26:41 INFO - ^
[task 2021-03-17T00:26:41.124Z] 00:26:41 INFO - /builds/worker/checkouts/gecko/gfx/thebes/gfxUtils.cpp: In static member function 'static const float* gfxUtils::YuvToRgbMatrix4x4ColumnMajor(mozilla::gfx::YUVColorSpace)':
[task 2021-03-17T00:26:41.126Z] 00:26:41 ERROR - /builds/worker/checkouts/gecko/gfx/thebes/gfxUtils.cpp:1183:1: error: control reaches end of non-void function [-Werror=return-type]
[task 2021-03-17T00:26:41.126Z] 00:26:41 INFO - }
[task 2021-03-17T00:26:41.126Z] 00:26:41 INFO - ^

Failure was first seen on https://treeherder.mozilla.org/jobs?repo=autoland&selectedTaskRun=UIL6H4F_RC-HQd4dZQhJqw.1&searchStr=linux%2Cx64%2Cdebug%2Cbuild-linux64-base-toolchains%2Fdebug%2Cbb&revision=fda1a09ee5bf383113bce40c3c7dc99e3aca11dc

Flags: needinfo?(jgilbert)
Pushed by jgilbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8ba8458ce662 Remove gfx::YUVColorSpace::UNKNOWN. r=mstange
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
Flags: needinfo?(jgilbert)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: