-
Notifications
You must be signed in to change notification settings - Fork 6k
createOverlaySurface JNI #18870
createOverlaySurface JNI #18870
Conversation
7d7e795 to
d95bb0e
Compare
| ORIGIN: ../../../flutter/LICENSE | ||
| TYPE: LicenseType.bsd | ||
| FILE: ../../../flutter/.clang-tidy | ||
| FILE: ../../../flutter/.gradle/6.5/fileChanges/last-build.bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need these .gradle/** files? I think they can be reverted in case you didn't intend to commit them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blasten The format_and_dart_test failed and said that licenses_flutter needed that file added on line 14.
Collecting licenses for fuchsia
Skipping this component - no change in signature
Collecting licenses for gpu
Skipping this component - no change in signature
Collecting licenses for third_party
Skipping this component - no change in signature
Collecting licenses for skia
Skipping this component - no change in signature
============================= ERROR =============================
License script got different results than expected for out/license_script_output/licenses_flutter.
Please rerun the licenses script locally to verify that it is
correctly catching any new licenses for anything you may have
changed, and then update this file:
flutter/sky/packages/sky_engine/LICENSE
For more information, see the script in:
https://github.com/flutter/engine/tree/master/tools/licenses
| private final Surface surface; | ||
| private final long id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
surface needs the @NonNull annotation since it cannot be null.
| private final Surface surface; | ||
| private final long id; | ||
|
|
||
| public FlutterOverlaySurface(long id, Surface surface) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment about the annotation public FlutterOverlaySurface(long id, @NonNull Surface surface). id doesn't need one because it's a primitive type.
|
|
||
| import android.view.Surface; | ||
|
|
||
| public class FlutterOverlaySurface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class needs the @Keep annotation. This is because the C++ code will do lookup by method/class name. As a result, these names cannot change, but tools like Proguard or R8 make classes and methods names shorter to reduce code size.
|
There's now a centralized interface called engine/shell/platform/android/jni/platform_view_android_jni.h Lines 128 to 132 in e5845af
You would need to fix the conflicts and move the jni function to this interface. |
5da230b to
fac302b
Compare
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
1 similar comment
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
1 similar comment
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
|
Moved to #19040 |
Description
Add JNI method createOverlaySurface for hybrid composition in the engine.
Related Issues
flutter/flutter#58288
Tests
I added the following tests:
createOverlaySurface__callsPlatformViewsControllerChecklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.Breaking Change
Did any tests fail when you ran them? Please read handling breaking changes.