Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,6 @@ class PlatformViewsController {
/// This state is only modified on the raster thread.
std::unordered_set<int64_t> views_to_recomposite_;

#if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG
/// A set to keep track of embedded views that do not have (0, 0) origin.
/// An insertion triggers a warning message about non-zero origin logged on the debug console.
/// See https://github.com/flutter/flutter/issues/109700 for details.
std::unordered_set<int64_t> non_zero_origin_views_;
#endif

/// @brief The composition order from the previous thread.
///
/// Only accessed from the platform thread.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -537,26 +537,9 @@ bool ClipRRectContainsPlatformViewBoundingRect(const SkRRect& clip_rrect,
// included in the `views_to_recomposite_`.
void PlatformViewsController::CompositeWithParams(int64_t view_id,
const EmbeddedViewParams& params) {
/// TODO(https://github.com/flutter/flutter/issues/109700)
CGRect frame = CGRectMake(0, 0, params.sizePoints().width(), params.sizePoints().height());
FlutterTouchInterceptingView* touchInterceptor = platform_views_[view_id].touch_interceptor;
#if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG
FML_DCHECK(CGPointEqualToPoint([touchInterceptor embeddedView].frame.origin, CGPointZero));
if (non_zero_origin_views_.find(view_id) == non_zero_origin_views_.end() &&
!CGPointEqualToPoint([touchInterceptor embeddedView].frame.origin, CGPointZero)) {
non_zero_origin_views_.insert(view_id);
NSLog(
@"A Embedded PlatformView's origin is not CGPointZero.\n"
" View id: %@\n"
" View info: \n %@ \n"
"A non-zero origin might cause undefined behavior.\n"
"See https://github.com/flutter/flutter/issues/109700 for more details.\n"
"If you are the author of the PlatformView, please update the implementation of the "
"PlatformView to have a (0, 0) origin.\n"
"If you have a valid case of using a non-zero origin, "
"please leave a comment at https://github.com/flutter/flutter/issues/109700 with details.",
@(view_id), [touchInterceptor embeddedView]);
}
#endif
touchInterceptor.layer.transform = CATransform3DIdentity;
touchInterceptor.frame = frame;
touchInterceptor.alpha = 1;
Expand Down