7 #include "flutter/common/settings.h"
8 #include "flutter/common/task_runners.h"
9 #include "flutter/flow/layers/layer_tree.h"
10 #include "flutter/fml/platform/darwin/cf_utils.h"
11 #include "flutter/fml/synchronization/waitable_event.h"
12 #include "flutter/fml/trace_event.h"
13 #include "flutter/shell/common/platform_view.h"
14 #include "flutter/shell/common/rasterizer.h"
17 #include "third_party/skia/include/utils/mac/SkCGUtils.h"
24 NSAssert(NO,
@"FlutterOverlayView must init or initWithContentsScale");
29 NSAssert(NO,
@"FlutterOverlayView must init or initWithContentsScale");
33 - (instancetype)init {
34 self = [
super initWithFrame:CGRectZero];
37 self.layer.opaque = NO;
38 self.userInteractionEnabled = NO;
39 self.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
45 - (instancetype)initWithContentsScale:(CGFloat)contentsScale {
48 if ([
self.layer isKindOfClass:NSClassFromString(
@"CAMetalLayer")]) {
49 self.layer.allowsGroupOpacity = NO;
50 self.layer.contentsScale = contentsScale;
51 self.layer.rasterizationScale = contentsScale;