423 Commits

Author SHA1 Message Date
Dan Field
d4932ba714
update method for skia (#11436) 2019-08-25 20:06:12 -07:00
Dan Field
66636eaded
Platform View implemenation for Metal (#11070) 2019-08-23 16:15:41 -07:00
Kaushik Iska
1e828b2326
Ios simulator unittests seem to not consider the full compilation unit (#11413)
They only reference the headers, so temporarily declaring and defining
in the header
2019-08-23 09:32:00 -07:00
Chinmay Garde
84bd736656
Update metal layer drawable size on relayout. (#11224)
This makes it so that the texture obtained by the next frame has the same dimensions as the frame being renderered.

Fixes https://github.com/flutter/flutter/issues/38754
2019-08-19 13:01:11 -07:00
Kaushik Iska
2897917b45
[dynamic_thread_merging] Resubmit only on the frame where the merge (#11075)
fixes https://github.com/flutter/flutter/issues/38735
2019-08-17 01:48:28 -07:00
Matt Carroll
5bb144ca8b
Re-lands platform brightness support on iOS, plus platform contrast (#10791) 2019-08-15 14:51:07 -07:00
Dan Field
f062ac44b0
Fix first frame logic (#11027) 2019-08-15 14:38:43 -07:00
Chinmay Garde
4c4c999778
On iOS report the preferred frames per second to tools via service protocol. (#11006) 2019-08-14 16:47:57 -07:00
Dan Field
90656d8824
Add isDisplayingFlutterUI to FlutterViewController (#10816) 2019-08-14 09:10:22 -07:00
Dan Field
e22893966a
Expose isolateId for engine (#10823) 2019-08-12 21:20:59 -07:00
Kaushik Iska
b5c198b699
Fix iOS references to PostPrerollResult (#10949) 2019-08-12 13:01:11 -07:00
Kaushik Iska
971a639151
Allow for dynamic thread merging on IOS for embedded view mutations (#9819)
After pre-roll we know if there have been any mutations made to the IOS embedded UIViews. If there are any mutations and the thread configuration is such chat the mutations will be committed on an illegal thread (GPU thread), we merge the threads and keep them merged until the lease expires. The lease is currently set to expire after 10 frames of no mutations. If there are any mutations in the interim we extend the lease.

TaskRunnerMerger will ultimately be responsible for enforcing the correct thread configurations.

This configuration will be inactive even after this change since still use the same thread when we create the iOS engine. That is slated to change in the coming PRs.
2019-08-12 12:32:38 -07:00
Qxyat
e95125aad3 Fix iOS keyboard crash (#10656)
Fixes an iOS crash on physical devices in `-[__NSCFString substringWithRange:]`: range out of bounds. According to Apple's docs for `UITextInput` method `positionFromPosition:(UITextPosition*)position offset:(NSInteger)offset`, this method should return:

A custom UITextPosition object that represents the location in a document that is at the specified offset from position. Return nil if the computed text position is less than 0 or greater than the length of the backing string.
2019-08-12 11:35:35 -07:00
Chinmay Garde
7cfb3de69b
Revert "Forwards iOS dark mode trait to the Flutter framework (#34441). (#9722)" (#10789)
This reverts commit 65fd5d4d629a2150cf85566857ab0bd2ddeb3d5a.
2019-08-08 17:15:06 -07:00
Matt Carroll
65fd5d4d62
Forwards iOS dark mode trait to the Flutter framework (#34441). (#9722) 2019-08-08 16:22:45 -07:00
Michael Goderbauer
f2f84ca95f
Fix empty composing range on iOS (#10381) 2019-08-07 09:22:40 -07:00
Qxyat
bad862e13d reset platformViewsController in engine.destroyContext when allowHeadlessExecution = false (#10629) 2019-08-05 17:36:58 -07:00
Dan Field
ed8e35c4cf
Remove get engine (#9747) 2019-07-30 17:11:04 -07:00
gaaclarke
0ecb793e1d
ios: Fixed the callback for the first frame so that it isn't predicated on having a splash screen. (#9952) 2019-07-25 12:37:38 -07:00
gaaclarke
aaf6bad4be
Fixed memory leak with engine registrars. (#10068) 2019-07-24 15:43:39 -07:00
gaaclarke
3d7f93a2e7
Removed logic from FlutterAppDelegate into FlutterPluginAppLifeCycleDelegate (#9893)
Removed logic from FlutterAppDelegate into
FlutterPluginAppLifeCycleDelegate.  This is a better place for
add-to-app since it doesn't require them to use our app delegate.
2019-07-19 10:58:39 -07:00
gaaclarke
273f4cfe83
Split out lifecycle protocol (#9922)
Split out lifecycle calls to plugins to their own protocol to clean up
FlutterPlugin and make the API slightly closer to Android.
2019-07-19 10:17:48 -07:00
Chris Yang
53f620f45e
[platform view] do not make clipping view and interceptor view clipToBounds (#9937) 2019-07-19 09:00:43 -07:00
gaaclarke
cf40c243a0
Removed unused method. (#9919) 2019-07-18 11:28:41 -07:00
Jason Simmons
3c9a22c778
Fall back to a fully qualified path to libapp.so if the library can not be loaded by name (#9762)
libapp.so contains compiled application Dart code.  On most Android systems,
this library can be loaded by calling dlopen("libapp.so"), which will search
Android's default library directories.

On some Android devices this does not work as expected.  As a workaround, this
patch provides a fallback path to libapp.so based on ApplicationInfo.nativeLibraryDir.

Fixes https://github.com/flutter/flutter/issues/35838
2019-07-11 12:39:42 -07:00
gaaclarke
3b944102a5
Un-deprecated FlutterViewController's binaryMessenger. (#9767)
Un-deprecated FlutterViewController's binaryMessenger.  Leaving it as
a valid convenience method and to help minimize a breaking change.
2019-07-11 10:04:26 -07:00
gaaclarke
9776043ea5
Synchronize main thread and gpu thread for first render frame (#9506)
Got rid of the black frame by synchronizing the main thread with the
gpu thread to make sure a frame is rendered before presenting the
view.
2019-07-10 13:14:07 -07:00
Chris Yang
802bd1518b
iOS platform view opacity (#9667) 2019-07-08 16:07:39 -07:00
Chris Yang
cea2c3617f
Mutators Stack refactoring (#9663)
Rename methods in the MutatorsStack to Pascal case to match standard cpp style
Refactor the operator== for Mutator class
2019-07-03 11:18:14 -07:00
Kaushik Iska
791143f172
ExternalViewEmbedder can CancelFrame after pre-roll (#9660)
* ExternalViewEmbedder can CancelFrame after pre-roll

- Resets the state so next pre-roll can be successful.
- Commit any pending `CATransaction` so we don't create
  nested transactions.

* Update flow/embedded_views.h
2019-07-03 08:38:19 -07:00
Kaushik Iska
d637f291a9
External view embedder can tell if embedded views have mutated (#9653)
* refactoring to move the mutator stack handling to preroll

* more review fixes

* Add support for external view embedded to know if it has changed

* remove the need to reset

* address comments

* Rename to HasPendingViewOperations
2019-07-03 07:28:53 -07:00
Chris Yang
8306ee68c7 Move the mutators stack handling to preroll (#9651)
* refactoring to move the mutator stack handling to preroll

* more review fixes
2019-07-02 16:35:47 -07:00
Chris Yang
8deeb77f05
make EmbeddedViewParams a unique ptr (#9640) 2019-07-02 13:27:12 -07:00
Chris Yang
a9ee687ac9
iOS PlatformView clip path (#9478) 2019-07-02 10:56:59 -07:00
gaaclarke
4e48fc47c4
Switched preprocessor logic for exporting symbols for testing. (NDEBUG (#9562)
wasn't working for Luci builds).
2019-06-27 18:03:59 -07:00
gaaclarke
50a8e73615
Has a binary messenger (#9419)
Made the engine and the view controllers have BinaryMessengers, not be
BinaryMessengers.  This allows us to break retain cycles and makes the
leaking channels we have not less dire.
2019-06-27 17:25:32 -07:00
Qxyat
6f7700fc83 fix FlutterOverlayView doesn't remove from superview in some cases (#9532) 2019-06-27 09:07:52 -07:00
Dan Field
da82361dad
Purge caches on low memory on iOS (#9491) 2019-06-25 20:47:55 -07:00
Chris Yang
2f1d4f03b5
fix build breakage on PlatformViews.mm (#9495) 2019-06-25 18:26:31 -07:00
Chris Yang
1ab99fb355
fix a bug where the platform view's transform is not reset before set frame (#9490) 2019-06-25 17:43:21 -07:00
Chris Yang
aa9b3a180a
Reland "IOS Platform view transform/clipping (#9075)" and fix the breakage. (#9483)
* Revert "Revert "IOS Platform view transform/clipping (#9075)" (#9480)"

This reverts commit 00d929f7f6088375b006746718a65b84678d01c0.

* fix fuschia buid
2019-06-25 15:29:47 -07:00
Chris Bracken
00d929f7f6
Revert "IOS Platform view transform/clipping (#9075)" (#9480)
This reverts commit ebb5b909fbb10dad2275acd4fc8ec1d9744a0bf6.

Seeing the following breakage on host build:
```
../../flutter/flow/scene_update_context.cc:205:36: error: non-const lvalue reference to type 'flutter::MutatorsStack' cannot bind to a value of unrelated type 'const flutter::Stopwatch'
                                   frame.context().raster_time(),
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../flutter/flow/scene_update_context.cc:207:36: error: no viable conversion from 'flutter::TextureRegistry' to 'const flutter::Stopwatch'
                                   frame.context().texture_registry(),
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../flutter/flow/instrumentation.h:55:32: note: candidate constructor not viable: no known conversion from 'flutter::TextureRegistry' to 'const flutter::Stopwatch &' for 1st argument
  FML_DISALLOW_COPY_AND_ASSIGN(Stopwatch);
                               ^
../../flutter/fml/macros.h:28:3: note: expanded from macro 'FML_DISALLOW_COPY_AND_ASSIGN'
  TypeName(const TypeName&) = delete;          \
  ^
../../flutter/flow/scene_update_context.cc:208:36: error: non-const lvalue reference to type 'flutter::TextureRegistry' cannot bind to a temporary of type 'flutter::RasterCache *'
                                   &frame.context().raster_cache(),
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../flutter/flow/scene_update_context.cc:209:36: error: cannot initialize a member subobject of type 'const flutter::RasterCache *' with an rvalue of type 'bool'
                                   false};
                                   ^~~~~
```
2019-06-25 10:48:37 -07:00
Chris Yang
ebb5b909fb
IOS Platform view transform/clipping (#9075) 2019-06-25 09:33:50 -07:00
gaaclarke
cd973f8aae
Added unit tests for the ios code. (#9388)
* Added unit tests for the ios code.

* Moved the tests to live next to the source.

* Added mocking library.

* Fixed formatting and removed third_party from the format check.

* fixed formatting 2

* Removed ocmock from third_party.

* Added ocmock to third_party, compile from source.

* removed ocmock from license checking

* updated licenses_flutter

* updated tool_signature
2019-06-20 17:37:03 -07:00
gaaclarke
54f88ab5da
Revert "Surrogate binary messenger (#9347)" (#9375)
This reverts commit 2f36285bc8d486a584e0ea917fae90245f2c5168.

This was crashing the integration test `- (void)testDualFlutterView`.
2019-06-19 12:29:08 -07:00
chunhtai
9ab6550b45
Introduce read only text field semantics (#9281) 2019-06-19 09:42:23 -07:00
gaaclarke
2f36285bc8
Surrogate binary messenger (#9347)
Created FlutterSurrogateBinaryMessenger to make sure that channels are
holding onto engines and not viewcontrollers.  This doesn't change the
public API but makes clients do what we want them to be doing, using
Engine for FlutterBinaryMessenger.
2019-06-18 17:58:45 -07:00
stuartmorgan
e00ac47f49
Reorganize darwin for shared ios/macOS (#9255)
When the macOS framework was initially landed, it included some iOS code
using a localized hack. This reorganizes the code structure to clearly
indicate which files are shared between iOS and macOS, vs. those that
are platform-specific.
2019-06-17 11:24:41 -07:00
gaaclarke
a0f85546f4
Removed an unused class definition for iOS code. (#9346) 2019-06-17 10:20:35 -07:00
Jenn Magder
1caff8d073
Decorate UIApplicationDelegate wrappers with matching UIKit deprecation (#9304) 2019-06-13 10:16:42 -07:00