split D3D/GLES texture creation
This commit is contained in:
@@ -39,7 +39,34 @@ abstract class ThermionFlutterPlatform extends PlatformInterface {
|
||||
/// call this yourself. May not be supported on all platforms.
|
||||
///
|
||||
Future<ThermionFlutterTexture?> createTexture(
|
||||
t.View view, int width, int height);
|
||||
int width, int height);
|
||||
|
||||
///
|
||||
///
|
||||
///
|
||||
///
|
||||
Future<ThermionFlutterTexture?> resizeTexture(
|
||||
ThermionFlutterTexture texture,
|
||||
int width, int height);
|
||||
|
||||
///
|
||||
///
|
||||
///
|
||||
Future destroyTexture(ThermionFlutterTexture texture);
|
||||
|
||||
///
|
||||
///
|
||||
///
|
||||
Future markTextureFrameAvailable(ThermionFlutterTexture texture);
|
||||
|
||||
///
|
||||
/// Binds a rendering surface to the given View.
|
||||
///
|
||||
/// This is internal; unless you are [thermion_*] package developer, don't
|
||||
/// call this yourself. May not be supported on all platforms.
|
||||
///
|
||||
Future bind(
|
||||
t.View view, ThermionFlutterTexture texture);
|
||||
|
||||
///
|
||||
/// Create a rendering window.
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
abstract class ThermionFlutterTexture {
|
||||
class ThermionFlutterTexture {
|
||||
|
||||
int get width;
|
||||
int get height;
|
||||
final int width;
|
||||
final int height;
|
||||
|
||||
int get flutterId;
|
||||
int get hardwareId;
|
||||
final int flutterId;
|
||||
final int hardwareId;
|
||||
|
||||
///
|
||||
/// Destroy a texture and clean up the texture cache (if applicable).
|
||||
///
|
||||
Future destroy();
|
||||
final int window;
|
||||
|
||||
Future resize(int width, int height, int left, int top);
|
||||
ThermionFlutterTexture({required this.width, required this.height, required this.flutterId, required this.hardwareId, required this.window});
|
||||
|
||||
Future markFrameAvailable();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user