Flutter Engine
The Flutter Engine
Classes | Namespaces | Functions | Variables
FlutterPlatformViews.mm File Reference
#import "flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h"
#include <Metal/Metal.h>
#include "flutter/fml/platform/darwin/scoped_nsobject.h"
#import "flutter/shell/platform/darwin/ios/framework/Source/FlutterOverlayView.h"
#import "flutter/shell/platform/darwin/ios/framework/Source/FlutterView.h"
#import "flutter/shell/platform/darwin/ios/ios_surface.h"

Go to the source code of this file.

Classes

class  DelayingGestureRecognizer
 
class  ForwardingGestureRecognizer
 

Namespaces

namespace  flutter
 

Functions

static bool ClipRectContainsPlatformViewBoundingRect (const SkRect &clip_rect, const SkRect &platformview_boundingrect, const SkMatrix &transform_matrix)
 
static bool ClipRRectContainsPlatformViewBoundingRect (const SkRRect &clip_rrect, const SkRect &platformview_boundingrect, const SkMatrix &transform_matrix)
 

Variables

BOOL flutter::canApplyBlurBackdrop = YES
 
NSInteger _currentTouchPointersCount
 
fml::scoped_nsobject< UIViewController< FlutterViewResponder > > _flutterViewController
 

Function Documentation

◆ ClipRectContainsPlatformViewBoundingRect()

static bool ClipRectContainsPlatformViewBoundingRect ( const SkRect clip_rect,
const SkRect platformview_boundingrect,
const SkMatrix transform_matrix 
)
static

Definition at line 38 of file FlutterPlatformViews.mm.

40 {
41 SkRect transformed_rect = transform_matrix.mapRect(clip_rect);
42 return transformed_rect.contains(platformview_boundingrect);
43}
bool mapRect(SkRect *dst, const SkRect &src, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
Definition: SkMatrix.cpp:1141
bool contains(SkScalar x, SkScalar y) const
Definition: extension.cpp:19

◆ ClipRRectContainsPlatformViewBoundingRect()

static bool ClipRRectContainsPlatformViewBoundingRect ( const SkRRect clip_rrect,
const SkRect platformview_boundingrect,
const SkMatrix transform_matrix 
)
static

Definition at line 53 of file FlutterPlatformViews.mm.

55 {
56 SkVector upper_left = clip_rrect.radii(SkRRect::Corner::kUpperLeft_Corner);
57 SkVector upper_right = clip_rrect.radii(SkRRect::Corner::kUpperRight_Corner);
58 SkVector lower_right = clip_rrect.radii(SkRRect::Corner::kLowerRight_Corner);
59 SkVector lower_left = clip_rrect.radii(SkRRect::Corner::kLowerLeft_Corner);
60 SkScalar transformed_upper_left_x = transform_matrix.mapRadius(upper_left.x());
61 SkScalar transformed_upper_left_y = transform_matrix.mapRadius(upper_left.y());
62 SkScalar transformed_upper_right_x = transform_matrix.mapRadius(upper_right.x());
63 SkScalar transformed_upper_right_y = transform_matrix.mapRadius(upper_right.y());
64 SkScalar transformed_lower_right_x = transform_matrix.mapRadius(lower_right.x());
65 SkScalar transformed_lower_right_y = transform_matrix.mapRadius(lower_right.y());
66 SkScalar transformed_lower_left_x = transform_matrix.mapRadius(lower_left.x());
67 SkScalar transformed_lower_left_y = transform_matrix.mapRadius(lower_left.y());
68 SkRect transformed_clip_rect = transform_matrix.mapRect(clip_rrect.rect());
69 SkRRect transformed_rrect;
70 SkVector corners[] = {{transformed_upper_left_x, transformed_upper_left_y},
71 {transformed_upper_right_x, transformed_upper_right_y},
72 {transformed_lower_right_x, transformed_lower_right_y},
73 {transformed_lower_left_x, transformed_lower_left_y}};
74 transformed_rrect.setRectRadii(transformed_clip_rect, corners);
75 return transformed_rrect.contains(platformview_boundingrect);
76}
SkScalar mapRadius(SkScalar radius) const
Definition: SkMatrix.cpp:1170
const SkRect & rect() const
Definition: SkRRect.h:264
SkVector radii(Corner corner) const
Definition: SkRRect.h:271
void setRectRadii(const SkRect &rect, const SkVector radii[4])
Definition: SkRRect.cpp:189
bool contains(const SkRect &rect) const
Definition: SkRRect.cpp:360
float SkScalar
Definition: extension.cpp:12
constexpr float y() const
Definition: SkPoint_impl.h:187
constexpr float x() const
Definition: SkPoint_impl.h:181

Variable Documentation

◆ _currentTouchPointersCount

NSInteger _currentTouchPointersCount
Initial value:
{
std::shared_ptr< flutter::FlutterPlatformViewsController > _platformViewsController

Definition at line 1124 of file FlutterPlatformViews.mm.

◆ _flutterViewController

fml::scoped_nsobject<UIViewController<FlutterViewResponder> > _flutterViewController

Definition at line 1129 of file FlutterPlatformViews.mm.