gfxMacUtils.cpp (1051B)
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/. */ 5 6 #include "gfxMacUtils.h" 7 #include <CoreVideo/CoreVideo.h> 8 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; 14 15 case mozilla::gfx::TransferFunction::SRGB: 16 return kCVImageBufferTransferFunction_sRGB; 17 18 case mozilla::gfx::TransferFunction::PQ: 19 return kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ; 20 21 case mozilla::gfx::TransferFunction::HLG: 22 return kCVImageBufferTransferFunction_ITU_R_2100_HLG; 23 24 default: 25 MOZ_ASSERT_UNREACHABLE("Unknown TransferFunction."); 26 return kCVImageBufferTransferFunction_ITU_R_709_2; 27 } 28 }