Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 148491a

Browse files
committed
revert bad fix
1 parent 7366e97 commit 148491a

File tree

6 files changed

+18
-17
lines changed

6 files changed

+18
-17
lines changed

shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include <map>
99
#include <memory>
1010
#include <string>
11-
#include <utility>
1211

1312
#include "flutter/common/graphics/persistent_cache.h"
1413
#include "flutter/flow/rtree.h"

shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ class IOSContextGL;
112112
class IOSSurface;
113113

114114
struct FlutterPlatformViewLayer {
115-
FlutterPlatformViewLayer(fml::scoped_nsobject<UIView> overlay_view,
116-
fml::scoped_nsobject<UIView> overlay_view_wrapper,
115+
FlutterPlatformViewLayer(const fml::scoped_nsobject<UIView>& overlay_view,
116+
const fml::scoped_nsobject<UIView>& overlay_view_wrapper,
117117
std::unique_ptr<IOSSurface> ios_surface,
118118
std::unique_ptr<Surface> surface);
119119

@@ -142,8 +142,9 @@ class FlutterPlatformViewLayerPool {
142142

143143
// Gets a layer from the pool if available, or allocates a new one.
144144
// Finally, it marks the layer as used. That is, it increments `available_layer_index_`.
145-
std::shared_ptr<FlutterPlatformViewLayer> GetLayer(GrDirectContext* gr_context,
146-
std::shared_ptr<IOSContext> ios_context);
145+
std::shared_ptr<FlutterPlatformViewLayer> GetLayer(
146+
GrDirectContext* gr_context,
147+
const std::shared_ptr<IOSContext>& ios_context);
147148

148149
// Gets the layers in the pool that aren't currently used.
149150
// This method doesn't mark the layers as unused.
@@ -207,10 +208,11 @@ class FlutterPlatformViewsController {
207208
// returns nil.
208209
UIView* GetPlatformViewByID(int view_id);
209210

210-
PostPrerollResult PostPrerollAction(fml::RefPtr<fml::RasterThreadMerger> raster_thread_merger);
211+
PostPrerollResult PostPrerollAction(
212+
const fml::RefPtr<fml::RasterThreadMerger>& raster_thread_merger);
211213

212214
void EndFrame(bool should_resubmit_frame,
213-
fml::RefPtr<fml::RasterThreadMerger> raster_thread_merger);
215+
const fml::RefPtr<fml::RasterThreadMerger>& raster_thread_merger);
214216

215217
std::vector<SkCanvas*> GetCurrentCanvases();
216218

@@ -226,7 +228,7 @@ class FlutterPlatformViewsController {
226228
void Reset();
227229

228230
bool SubmitFrame(GrDirectContext* gr_context,
229-
std::shared_ptr<IOSContext> ios_context,
231+
const std::shared_ptr<IOSContext>& ios_context,
230232
std::unique_ptr<SurfaceFrame> frame);
231233

232234
void OnMethodCall(FlutterMethodCall* call, FlutterResult& result);
@@ -236,7 +238,7 @@ class FlutterPlatformViewsController {
236238
long FindFirstResponderPlatformViewId();
237239

238240
// Pushes backdrop filter mutation to the mutator stack of each visited platform view.
239-
void PushFilterToVisitedPlatformViews(std::shared_ptr<const DlImageFilter> filter,
241+
void PushFilterToVisitedPlatformViews(const std::shared_ptr<const DlImageFilter>& filter,
240242
const SkRect& filter_rect);
241243

242244
// Pushes the view id of a visted platform view to the list of visied platform views.

shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.mm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
namespace flutter {
1414

1515
FlutterPlatformViewLayer::FlutterPlatformViewLayer(
16-
fml::scoped_nsobject<UIView> overlay_view,
17-
fml::scoped_nsobject<UIView> overlay_view_wrapper,
16+
const fml::scoped_nsobject<UIView>& overlay_view,
17+
const fml::scoped_nsobject<UIView>& overlay_view_wrapper,
1818
std::unique_ptr<IOSSurface> ios_surface,
1919
std::unique_ptr<Surface> surface)
20-
: overlay_view(std::move(overlay_view)),
21-
overlay_view_wrapper(std::move(overlay_view_wrapper)),
20+
: overlay_view(overlay_view),
21+
overlay_view_wrapper(overlay_view_wrapper),
2222
ios_surface(std::move(ios_surface)),
2323
surface(std::move(surface)){};
2424

shell/platform/darwin/ios/ios_external_view_embedder.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
IOSExternalViewEmbedder::IOSExternalViewEmbedder(
1010
const std::shared_ptr<FlutterPlatformViewsController>& platform_views_controller,
1111
std::shared_ptr<IOSContext> context)
12-
: platform_views_controller_(platform_views_controller), ios_context_(context) {
12+
: platform_views_controller_(platform_views_controller), ios_context_(std::move(context)) {
1313
FML_CHECK(ios_context_);
1414
}
1515

@@ -82,7 +82,7 @@
8282
std::unique_ptr<SurfaceFrame> frame) {
8383
TRACE_EVENT0("flutter", "IOSExternalViewEmbedder::SubmitFrame");
8484
FML_CHECK(platform_views_controller_);
85-
platform_views_controller_->SubmitFrame(std::move(context), ios_context_, std::move(frame));
85+
platform_views_controller_->SubmitFrame(context, ios_context_, std::move(frame));
8686
TRACE_EVENT0("flutter", "IOSExternalViewEmbedder::DidSubmitFrame");
8787
}
8888

shell/platform/darwin/ios/ios_surface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ bool IsIosEmbeddedViewsPreviewEnabled();
2525
class IOSSurface {
2626
public:
2727
static std::unique_ptr<IOSSurface> Create(std::shared_ptr<IOSContext> context,
28-
fml::scoped_nsobject<CALayer> layer);
28+
const fml::scoped_nsobject<CALayer>& layer);
2929

3030
std::shared_ptr<IOSContext> GetContext() const;
3131

shell/platform/darwin/ios/ios_surface.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
namespace flutter {
1717

1818
std::unique_ptr<IOSSurface> IOSSurface::Create(std::shared_ptr<IOSContext> context,
19-
fml::scoped_nsobject<CALayer> layer) {
19+
const fml::scoped_nsobject<CALayer>& layer) {
2020
FML_DCHECK(layer);
2121
FML_DCHECK(context);
2222

0 commit comments

Comments
 (0)