Internal change
PiperOrigin-RevId: 547614484
This commit is contained in:
		
							parent
							
								
									37b68714b8
								
							
						
					
					
						commit
						a2cd3e7f95
					
				| 
						 | 
					@ -100,6 +100,10 @@ const GlTextureInfo& GlTextureInfoForGpuBufferFormat(GpuBufferFormat format,
 | 
				
			||||||
               {GL_R8, GL_RED, GL_UNSIGNED_BYTE, 1},
 | 
					               {GL_R8, GL_RED, GL_UNSIGNED_BYTE, 1},
 | 
				
			||||||
#endif  // TARGET_OS_OSX
 | 
					#endif  // TARGET_OS_OSX
 | 
				
			||||||
           }},
 | 
					           }},
 | 
				
			||||||
 | 
					          {GpuBufferFormat::kOneComponent8Alpha,
 | 
				
			||||||
 | 
					           {
 | 
				
			||||||
 | 
					               {GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE, 1},
 | 
				
			||||||
 | 
					           }},
 | 
				
			||||||
          {GpuBufferFormat::kOneComponent8Red,
 | 
					          {GpuBufferFormat::kOneComponent8Red,
 | 
				
			||||||
           {
 | 
					           {
 | 
				
			||||||
               {GL_R8, GL_RED, GL_UNSIGNED_BYTE, 1},
 | 
					               {GL_R8, GL_RED, GL_UNSIGNED_BYTE, 1},
 | 
				
			||||||
| 
						 | 
					@ -221,6 +225,7 @@ ImageFormat::Format ImageFormatForGpuBufferFormat(GpuBufferFormat format) {
 | 
				
			||||||
    case GpuBufferFormat::kRGBA32:
 | 
					    case GpuBufferFormat::kRGBA32:
 | 
				
			||||||
      // TODO: this likely maps to ImageFormat::SRGBA
 | 
					      // TODO: this likely maps to ImageFormat::SRGBA
 | 
				
			||||||
    case GpuBufferFormat::kGrayHalf16:
 | 
					    case GpuBufferFormat::kGrayHalf16:
 | 
				
			||||||
 | 
					    case GpuBufferFormat::kOneComponent8Alpha:
 | 
				
			||||||
    case GpuBufferFormat::kOneComponent8Red:
 | 
					    case GpuBufferFormat::kOneComponent8Red:
 | 
				
			||||||
    case GpuBufferFormat::kTwoComponent8:
 | 
					    case GpuBufferFormat::kTwoComponent8:
 | 
				
			||||||
    case GpuBufferFormat::kTwoComponentHalf16:
 | 
					    case GpuBufferFormat::kTwoComponentHalf16:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,6 +43,7 @@ enum class GpuBufferFormat : uint32_t {
 | 
				
			||||||
  kGrayFloat32 = MEDIAPIPE_FOURCC('L', '0', '0', 'f'),
 | 
					  kGrayFloat32 = MEDIAPIPE_FOURCC('L', '0', '0', 'f'),
 | 
				
			||||||
  kGrayHalf16 = MEDIAPIPE_FOURCC('L', '0', '0', 'h'),
 | 
					  kGrayHalf16 = MEDIAPIPE_FOURCC('L', '0', '0', 'h'),
 | 
				
			||||||
  kOneComponent8 = MEDIAPIPE_FOURCC('L', '0', '0', '8'),
 | 
					  kOneComponent8 = MEDIAPIPE_FOURCC('L', '0', '0', '8'),
 | 
				
			||||||
 | 
					  kOneComponent8Alpha = MEDIAPIPE_FOURCC('A', '0', '0', '8'),
 | 
				
			||||||
  kOneComponent8Red = MEDIAPIPE_FOURCC('R', '0', '0', '8'),
 | 
					  kOneComponent8Red = MEDIAPIPE_FOURCC('R', '0', '0', '8'),
 | 
				
			||||||
  kTwoComponent8 = MEDIAPIPE_FOURCC('2', 'C', '0', '8'),
 | 
					  kTwoComponent8 = MEDIAPIPE_FOURCC('2', 'C', '0', '8'),
 | 
				
			||||||
  kTwoComponentHalf16 = MEDIAPIPE_FOURCC('2', 'C', '0', 'h'),
 | 
					  kTwoComponentHalf16 = MEDIAPIPE_FOURCC('2', 'C', '0', 'h'),
 | 
				
			||||||
| 
						 | 
					@ -101,6 +102,7 @@ inline OSType CVPixelFormatForGpuBufferFormat(GpuBufferFormat format) {
 | 
				
			||||||
      return kCVPixelFormatType_OneComponent32Float;
 | 
					      return kCVPixelFormatType_OneComponent32Float;
 | 
				
			||||||
    case GpuBufferFormat::kOneComponent8:
 | 
					    case GpuBufferFormat::kOneComponent8:
 | 
				
			||||||
      return kCVPixelFormatType_OneComponent8;
 | 
					      return kCVPixelFormatType_OneComponent8;
 | 
				
			||||||
 | 
					    case GpuBufferFormat::kOneComponent8Alpha:
 | 
				
			||||||
    case GpuBufferFormat::kOneComponent8Red:
 | 
					    case GpuBufferFormat::kOneComponent8Red:
 | 
				
			||||||
      return -1;
 | 
					      return -1;
 | 
				
			||||||
    case GpuBufferFormat::kTwoComponent8:
 | 
					    case GpuBufferFormat::kTwoComponent8:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user