Flutter Engine
The Flutter Engine
Instance Methods | Protected Attributes | List of all members
TestCompositor Class Reference
Inheritance diagram for TestCompositor:

Instance Methods

(instancetype) - initWithLayer: [implementation]
 
(void) - commitTransaction [implementation]
 
(void) - dealloc [implementation]
 

Protected Attributes

FlutterMetalLayer_layer
 
IOSurfaceRef _presentedSurface
 

Detailed Description

A fake compositor that simulates presenting layer surface by increasing and decreasing IOSurface use count.

Definition at line 29 of file FlutterMetalLayerTest.mm.

Method Documentation

◆ commitTransaction

- (void) commitTransaction
implementation

Increment use count of currently presented surface and decrement use count of previously presented surface.

Definition at line 31 of file FlutterMetalLayerTest.mm.

47 {
48 IOSurfaceRef surface = (__bridge IOSurfaceRef)self->_layer.contents;
49 if (self->_presentedSurface) {
50 IOSurfaceDecrementUseCount(self->_presentedSurface);
51 }
52 IOSurfaceIncrementUseCount(surface);
53 self->_presentedSurface = surface;
54}
VkSurfaceKHR surface
Definition: main.cc:49
if(end==-1)

◆ dealloc

- (void) dealloc
implementation

Definition at line 31 of file FlutterMetalLayerTest.mm.

56 {
57 if (self->_presentedSurface) {
58 IOSurfaceDecrementUseCount(self->_presentedSurface);
59 }
60}

◆ initWithLayer:

- (instancetype) initWithLayer: (FlutterMetalLayer*)  layer
implementation

Definition at line 31 of file FlutterMetalLayerTest.mm.

37 :(FlutterMetalLayer*)layer {
38 self = [super init];
39 if (self) {
40 self->_layer = layer;
41 }
42 return self;
43}

Member Data Documentation

◆ _layer

- (FlutterMetalLayer*) _layer
protected

Definition at line 30 of file FlutterMetalLayerTest.mm.

◆ _presentedSurface

- (IOSurfaceRef) _presentedSurface
protected

Definition at line 31 of file FlutterMetalLayerTest.mm.


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