Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Instance Methods | Properties | List of all members
SkiaMtkView Class Reference
Inheritance diagram for SkiaMtkView:

Instance Methods

(void) - drawRect:
 
(instancetype) - initWithFrame:device:queue:grDevice:
 

Properties

SkiaViewControllercontroller
 

Detailed Description

Definition at line 17 of file SkiaMetalContext.mm.

Method Documentation

◆ drawRect:

- (void) drawRect: (CGRect)  rect

Definition at line 32 of file SkiaMetalContext.mm.

46 :(CGRect)rect {
47 [super drawRect:rect];
48 // TODO(halcanary): Use the rect and the InvalidationController to speed up rendering.
49 SkiaViewController* viewController = [self controller];
50 if (!viewController || ![[self currentDrawable] texture] || !fDContext) {
51 return;
52 }
53 CGSize size = [self drawableSize];
55 if (!surface) {
56 NSLog(@"error: no sksurface");
57 return;
58 }
59 [viewController draw:rect toCanvas:surface->getCanvas() atSize:size];
61 surface = nullptr;
62
63 id<MTLCommandBuffer> commandBuffer = [fQueue commandBuffer];
64 [commandBuffer presentDrawable:[self currentDrawable]];
65 [commandBuffer commit];
66
67 bool paused = [viewController isPaused];
68 [self setEnableSetNeedsDisplay:paused];
69 [self setPaused:paused];
70}
sk_sp< SkSurface > SkMtkViewToSurface(MTKView *, GrRecordingContext *)
GrDirectContext * fDContext
void flushAndSubmit(GrSyncCpu sync=GrSyncCpu::kNo)
VkSurfaceKHR surface
Definition main.cc:49
void draw:toCanvas:atSize:(CGRect rect,[toCanvas] SkCanvas *canvas,[atSize] CGSize size)
FlutterViewController * viewController
FlTexture * texture
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition switches.h:259

◆ initWithFrame:device:queue:grDevice:

- (instancetype) initWithFrame: (CGRect)  frameRect
device: (id<MTLDevice>)  device
queue: (id<MTLCommandQueue>)  queue
grDevice: (GrDirectContext*)  dContext 

Definition at line 32 of file SkiaMetalContext.mm.

35 :(CGRect)frameRect
36 device:(id<MTLDevice>)mtlDevice
37 queue:(id<MTLCommandQueue>)queue
38 grDevice:(GrDirectContext*)dContext {
39 self = [super initWithFrame:frameRect device:mtlDevice];
40 fQueue = queue;
41 fDContext = dContext;
43 return self;
44}
void SkMtkViewConfigForSkia(MTKView *)
VkDevice device
Definition main.cc:53
VkQueue queue
Definition main.cc:55
instancetype initWithFrame
const uintptr_t id

Property Documentation

◆ controller

- (SkiaViewController*) controller
readwriteatomicstrong

Definition at line 18 of file SkiaMetalContext.mm.


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