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

Instance Methods

(void) - drawRect:
 

Properties

SkiaViewControllercontroller
 

Detailed Description

Definition at line 15 of file SkiaUIContext.mm.

Method Documentation

◆ drawRect:

- (void) drawRect: (CGRect)  rect
Initial value:
{
SkBitmap fBackBuffer

Definition at line 16 of file SkiaUIContext.mm.

26 :(CGRect)rect {
27 SkiaViewController* viewController = [self controller];
28 static constexpr double kFrameRate = 1.0 / 30.0;
29 double next = [viewController isPaused] ? 0 : kFrameRate + SkTime::GetNSecs() * 1e-9;
30 [super drawRect:rect];
31 CGSize size = [self bounds].size;
32 SkISize iSize = {(int)size.width, (int)size.height};
33 if (fBackBuffer.drawsNothing() || iSize != fBackBuffer.dimensions()) {
34 fBackBuffer.allocN32Pixels(iSize.fWidth, iSize.fHeight);
35 }
36 fBackBuffer.eraseColor(SK_ColorTRANSPARENT);
37 {
38 SkCanvas canvas(fBackBuffer);
39 [viewController draw:rect toCanvas:&canvas atSize:size];
40 }
41 SkCGDrawBitmap(UIGraphicsGetCurrentContext(), fBackBuffer, 0, 0);
42 if (next) {
43 [NSTimer scheduledTimerWithTimeInterval:std::max(0.0, next - SkTime::GetNSecs() * 1e-9)
44 target:self
45 selector:@selector(setNeedsDisplay)
46 userInfo:nil
47 repeats:NO];
48 }
49}
static float next(float f)
constexpr SkColor SK_ColorTRANSPARENT
Definition SkColor.h:99
Type::kYUV Type::kRGBA() int(0.7 *637)
FlutterViewController * viewController
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
int32_t fHeight
Definition SkSize.h:18
int32_t fWidth
Definition SkSize.h:17

Property Documentation

◆ controller

- (SkiaViewController*) controller
readwriteatomicstrong

Definition at line 16 of file SkiaUIContext.mm.


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