Flutter Engine
The Flutter Engine
Instance Methods | List of all members
FlutterScenarioTestTexture Class Reference

#import <ContinuousTexture.h>

Inheritance diagram for FlutterScenarioTestTexture:
<FlutterTexture>

Instance Methods

(CVPixelBufferRef _Nullable) - copyPixelBuffer [implementation]
 
(CVPixelBufferRef) - pixelBuffer [implementation]
 
- Instance Methods inherited from <FlutterTexture>
(CVPixelBufferRef _Nullable) - copyPixelBuffer
 
(void) - onTextureUnregistered:
 

Detailed Description

Definition at line 19 of file ContinuousTexture.h.

Method Documentation

◆ copyPixelBuffer

- (CVPixelBufferRef _Nullable) copyPixelBuffer
implementation

Copy the contents of the texture into a CVPixelBuffer.

The type of the pixel buffer is one of the following:

  • kCVPixelFormatType_32BGRA
  • kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
  • kCVPixelFormatType_420YpCbCr8BiPlanarFullRange

Reimplemented from <FlutterTexture>.

Definition at line 1 of file ContinuousTexture.m.

24 {
25 return [self pixelBuffer];
26}

◆ pixelBuffer

- (CVPixelBufferRef) pixelBuffer
implementation

Definition at line 1 of file ContinuousTexture.m.

28 {
29 NSDictionary* options = @{
30 // This key is required to generate SKPicture with CVPixelBufferRef in metal.
31 (NSString*)kCVPixelBufferMetalCompatibilityKey : @YES
32 };
33 CVPixelBufferRef pxbuffer = NULL;
34 CVReturn status = CVPixelBufferCreate(kCFAllocatorDefault, 200, 200, kCVPixelFormatType_32BGRA,
35 (__bridge CFDictionaryRef)options, &pxbuffer);
36
37 NSAssert(status == kCVReturnSuccess && pxbuffer != NULL, @"Failed to create pixel buffer.");
38 return pxbuffer;
39}
const char * options

The documentation for this class was generated from the following files: