Changeset 251988 in webkit
- Timestamp:
- Nov 4, 2019 7:38:37 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r251985 r251988 1 2019-11-04 Cathie Chen <cathiechen@igalia.com> 2 3 Build error: redefinition of `TransferFunction` 4 https://bugs.webkit.org/show_bug.cgi?id=203742 5 6 Reviewed by Jer Noble. 7 8 `TransferFunction` defined in both VideoTextureCopierCV.cpp and TransferFunction.h. 9 Renamed `TransferFunction` in VideoTextureCopierCV.cpp to `TransferFunctionCV`. 10 11 * platform/graphics/cv/VideoTextureCopierCV.cpp: 12 (WebCore::transferFunctionFromString): 13 (WebCore::YCbCrToRGBMatrixForRangeAndTransferFunction): 14 1 15 2019-11-04 youenn fablet <youenn@apple.com> 2 16 -
trunk/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp
r248697 r251988 52 52 }; 53 53 54 enum class TransferFunction {54 enum class TransferFunctionCV { 55 55 Unknown, 56 56 kITU_R_709_2, … … 86 86 } 87 87 88 static TransferFunction transferFunctionFromString(CFStringRef string)88 static TransferFunctionCV transferFunctionFromString(CFStringRef string) 89 89 { 90 90 if (!string || CFGetTypeID(string) != CFStringGetTypeID()) 91 return TransferFunction ::Unknown;91 return TransferFunctionCV::Unknown; 92 92 if (CFEqual(string, kCVImageBufferYCbCrMatrix_ITU_R_709_2)) 93 return TransferFunction ::kITU_R_709_2;93 return TransferFunctionCV::kITU_R_709_2; 94 94 if (CFEqual(string, kCVImageBufferYCbCrMatrix_ITU_R_601_4)) 95 return TransferFunction ::kITU_R_601_4;95 return TransferFunctionCV::kITU_R_601_4; 96 96 if (CFEqual(string, kCVImageBufferYCbCrMatrix_SMPTE_240M_1995)) 97 return TransferFunction ::kSMPTE_240M_1995;97 return TransferFunctionCV::kSMPTE_240M_1995; 98 98 if (canLoad_CoreVideo_kCVImageBufferYCbCrMatrix_DCI_P3() && CFEqual(string, kCVImageBufferYCbCrMatrix_DCI_P3)) 99 return TransferFunction ::kDCI_P3;99 return TransferFunctionCV::kDCI_P3; 100 100 if (canLoad_CoreVideo_kCVImageBufferYCbCrMatrix_P3_D65() && CFEqual(string, kCVImageBufferYCbCrMatrix_P3_D65)) 101 return TransferFunction ::kP3_D65;101 return TransferFunctionCV::kP3_D65; 102 102 if (canLoad_CoreVideo_kCVImageBufferYCbCrMatrix_ITU_R_2020() && CFEqual(string, kCVImageBufferYCbCrMatrix_ITU_R_2020)) 103 return TransferFunction ::kITU_R_2020;104 return TransferFunction ::Unknown;103 return TransferFunctionCV::kITU_R_2020; 104 return TransferFunctionCV::Unknown; 105 105 } 106 106 … … 237 237 } 238 238 239 static const Vector<GLfloat> YCbCrToRGBMatrixForRangeAndTransferFunction(PixelRange range, TransferFunction transferFunction)240 { 241 using MapKey = std::pair<PixelRange, TransferFunction >;239 static const Vector<GLfloat> YCbCrToRGBMatrixForRangeAndTransferFunction(PixelRange range, TransferFunctionCV transferFunction) 240 { 241 using MapKey = std::pair<PixelRange, TransferFunctionCV>; 242 242 using MatrixMap = StdMap<MapKey, Vector<GLfloat>>; 243 243 … … 338 338 339 339 dispatch_once(&onceToken, ^{ 340 matrices.get().emplace(MapKey(PixelRange::Video, TransferFunction ::kITU_R_601_4), r601VideoMatrix);341 matrices.get().emplace(MapKey(PixelRange::Full, TransferFunction ::kITU_R_601_4), r601FullMatrix);342 matrices.get().emplace(MapKey(PixelRange::Video, TransferFunction ::kITU_R_709_2), r709VideoMatrix);343 matrices.get().emplace(MapKey(PixelRange::Full, TransferFunction ::kITU_R_709_2), r709FullMatrix);344 matrices.get().emplace(MapKey(PixelRange::Video, TransferFunction ::kITU_R_2020), bt2020VideoMatrix);345 matrices.get().emplace(MapKey(PixelRange::Full, TransferFunction ::kITU_R_2020), bt2020FullMatrix);346 matrices.get().emplace(MapKey(PixelRange::Video, TransferFunction ::kSMPTE_240M_1995), smpte240MVideoMatrix);347 matrices.get().emplace(MapKey(PixelRange::Full, TransferFunction ::kSMPTE_240M_1995), smpte240MFullMatrix);340 matrices.get().emplace(MapKey(PixelRange::Video, TransferFunctionCV::kITU_R_601_4), r601VideoMatrix); 341 matrices.get().emplace(MapKey(PixelRange::Full, TransferFunctionCV::kITU_R_601_4), r601FullMatrix); 342 matrices.get().emplace(MapKey(PixelRange::Video, TransferFunctionCV::kITU_R_709_2), r709VideoMatrix); 343 matrices.get().emplace(MapKey(PixelRange::Full, TransferFunctionCV::kITU_R_709_2), r709FullMatrix); 344 matrices.get().emplace(MapKey(PixelRange::Video, TransferFunctionCV::kITU_R_2020), bt2020VideoMatrix); 345 matrices.get().emplace(MapKey(PixelRange::Full, TransferFunctionCV::kITU_R_2020), bt2020FullMatrix); 346 matrices.get().emplace(MapKey(PixelRange::Video, TransferFunctionCV::kSMPTE_240M_1995), smpte240MVideoMatrix); 347 matrices.get().emplace(MapKey(PixelRange::Full, TransferFunctionCV::kSMPTE_240M_1995), smpte240MFullMatrix); 348 348 }); 349 349 … … 357 357 // Assume unknown transfer functions are r.601: 358 358 if (iterator == matrices.get().end()) 359 iterator = matrices.get().find({range, TransferFunction ::kITU_R_601_4});359 iterator = matrices.get().find({range, TransferFunctionCV::kITU_R_601_4}); 360 360 361 361 ASSERT(iterator != matrices.get().end());
Note: See TracChangeset
for help on using the changeset viewer.