Bug 1874684 - Part 28: Return DateDuration from DifferenceISODateTime. r=mgaudet
[gecko.git] / gfx / thebes / gfxMacUtils.cpp
blob0c0b66eb14dcde3ab918c367f3cc3a6132235f4c
1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "gfxMacUtils.h"
7 #include <CoreVideo/CoreVideo.h>
9 /* static */ CFStringRef gfxMacUtils::CFStringForTransferFunction(
10 mozilla::gfx::TransferFunction aTransferFunction) {
11 switch (aTransferFunction) {
12 case mozilla::gfx::TransferFunction::BT709:
13 return kCVImageBufferTransferFunction_ITU_R_709_2;
15 case mozilla::gfx::TransferFunction::SRGB:
16 return kCVImageBufferTransferFunction_sRGB;
18 case mozilla::gfx::TransferFunction::PQ:
19 return kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ;
21 case mozilla::gfx::TransferFunction::HLG:
22 return kCVImageBufferTransferFunction_ITU_R_2100_HLG;
24 default:
25 MOZ_ASSERT_UNREACHABLE("Unknown TransferFunction.");
26 return kCVImageBufferTransferFunction_ITU_R_709_2;