-
Notifications
You must be signed in to change notification settings - Fork 6k
Handle SurfaceView in a VirtualDisplay #33599
Changes from 1 commit
0832efc
e2b2b94
e2e2341
a8675ec
9d30502
6981201
b8e49a0
583b597
dde18d7
7f87be7
5e924ab
7cb2919
42adbc4
cf3b220
225f943
58e54df
cffe771
33877fa
e44e6cd
8f821f6
1cde9af
7b4708a
f0d1029
110bdb5
5a2c81b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,6 @@ | |
| import android.util.SparseArray; | ||
| import android.view.MotionEvent; | ||
| import android.view.SurfaceView; | ||
| import android.view.TextureView; | ||
| import android.view.View; | ||
| import android.view.ViewGroup; | ||
| import android.widget.FrameLayout; | ||
|
|
@@ -52,12 +51,18 @@ | |
| public class PlatformViewsController implements PlatformViewsAccessibilityDelegate { | ||
| private static final String TAG = "PlatformViewsController"; | ||
|
|
||
| // These view types allow out-of-band drawing operation that don't notify the Android view | ||
| // These view types allow out-of-band drawing commands that don't notify the Android view | ||
| // hierarchy. | ||
| // To support these cases, Flutter hosts the embedded view in a VirtualDisplay, | ||
| // and binds the VirtualDisplay to a GL texture that is then composed by the engine. | ||
| // However, there are a few issues with Virtual Displays. For example, they don't fully support | ||
| // accessibility due to https://github.com/flutter/flutter/issues/29717, | ||
| // and keyboard interactions may have non-derterministic behavior. | ||
| // Views that issue out-of-band drawing commands that aren't included in this array are | ||
| // required to call `View#invalidate()` to notify Flutter about the update. | ||
| // This isn't ideal, but given all the other limitations it's a reasonable tradeoff. | ||
| // Related issue: https://github.com/flutter/flutter/issues/103630 | ||
| private static Class[] VIEW_TYPES_REQUIRE_VD = {SurfaceView.class, TextureView.class}; | ||
| private static Class[] VIEW_TYPES_REQUIRE_VD = {SurfaceView.class}; | ||
|
||
|
|
||
| private final PlatformViewRegistryImpl registry; | ||
|
|
||
|
|
||
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.
typo: "deterministic"
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.
done