Flutter Engine
The Flutter Engine
shell
platform
android
io
flutter
plugin
platform
SurfaceProducerPlatformViewRenderTarget.java
Go to the documentation of this file.
1
package
io.flutter.plugin.platform;
2
3
import
static
io.flutter.Build.API_LEVELS;
4
5
import
android
.annotation.TargetApi;
6
import
android
.view.Surface;
7
import
io.flutter.view.TextureRegistry.SurfaceProducer;
8
9
@TargetApi(API_LEVELS.API_29)
10
public class
SurfaceProducerPlatformViewRenderTarget
implements
PlatformViewRenderTarget
{
11
private
static
final
String
TAG
=
"SurfaceProducerRenderTarget"
;
12
private
SurfaceProducer
producer;
13
14
public
SurfaceProducerPlatformViewRenderTarget
(
SurfaceProducer
producer) {
15
this.producer = producer;
16
}
17
18
// Called when the render target should be resized.
19
public
void
resize
(
int
width
,
int
height
) {
20
this.producer.
setSize
(
width
,
height
);
21
}
22
23
// Returns the currently specified width.
24
public
int
getWidth
() {
25
return
this.producer.
getWidth
();
26
}
27
28
// Returns the currently specified height.
29
public
int
getHeight
() {
30
return
this.producer.
getHeight
();
31
}
32
33
// The id of this render target.
34
public
long
getId
() {
35
return
this.producer.
id
();
36
}
37
38
// Releases backing resources.
39
public
void
release
() {
40
this.producer.
release
();
41
this.producer =
null
;
42
}
43
44
// Returns true in the case that backing resource have been released.
45
public
boolean
isReleased
() {
46
return
this.producer ==
null
;
47
}
48
49
// Returns the Surface to be rendered on to.
50
public
Surface
getSurface
() {
51
return
this.producer.
getSurface
();
52
}
53
54
public
void
scheduleFrame
() {
55
this.producer.
scheduleFrame
();
56
}
57
}
io.flutter.plugin.platform.SurfaceProducerPlatformViewRenderTarget
Definition:
SurfaceProducerPlatformViewRenderTarget.java:10
io.flutter.plugin.platform.SurfaceProducerPlatformViewRenderTarget.SurfaceProducerPlatformViewRenderTarget
SurfaceProducerPlatformViewRenderTarget(SurfaceProducer producer)
Definition:
SurfaceProducerPlatformViewRenderTarget.java:14
io.flutter.plugin.platform.SurfaceProducerPlatformViewRenderTarget.resize
void resize(int width, int height)
Definition:
SurfaceProducerPlatformViewRenderTarget.java:19
io.flutter.plugin.platform.SurfaceProducerPlatformViewRenderTarget.getWidth
int getWidth()
Definition:
SurfaceProducerPlatformViewRenderTarget.java:24
io.flutter.plugin.platform.SurfaceProducerPlatformViewRenderTarget.scheduleFrame
void scheduleFrame()
Definition:
SurfaceProducerPlatformViewRenderTarget.java:54
io.flutter.plugin.platform.SurfaceProducerPlatformViewRenderTarget.getId
long getId()
Definition:
SurfaceProducerPlatformViewRenderTarget.java:34
io.flutter.plugin.platform.SurfaceProducerPlatformViewRenderTarget.getSurface
Surface getSurface()
Definition:
SurfaceProducerPlatformViewRenderTarget.java:50
io.flutter.plugin.platform.SurfaceProducerPlatformViewRenderTarget.release
void release()
Definition:
SurfaceProducerPlatformViewRenderTarget.java:39
io.flutter.plugin.platform.SurfaceProducerPlatformViewRenderTarget.isReleased
boolean isReleased()
Definition:
SurfaceProducerPlatformViewRenderTarget.java:45
io.flutter.plugin.platform.SurfaceProducerPlatformViewRenderTarget.getHeight
int getHeight()
Definition:
SurfaceProducerPlatformViewRenderTarget.java:29
io.flutter.plugin.platform.PlatformViewRenderTarget
Definition:
PlatformViewRenderTarget.java:14
io.flutter.view.TextureRegistry.SurfaceProducer
Definition:
TextureRegistry.java:71
io.flutter.view.TextureRegistry.SurfaceProducer.getSurface
Surface getSurface()
io.flutter.view.TextureRegistry.SurfaceProducer.getWidth
int getWidth()
io.flutter.view.TextureRegistry.SurfaceProducer.getHeight
int getHeight()
io.flutter.view.TextureRegistry.SurfaceProducer.scheduleFrame
void scheduleFrame()
io.flutter.view.TextureRegistry.SurfaceProducer.setSize
void setSize(int width, int height)
io.flutter.view.TextureRegistry.TextureEntry.id
long id()
io.flutter.view.TextureRegistry.TextureEntry.release
void release()
android
Definition:
BitmapRegionDecoder.cpp:14
TAG
#define TAG()
Definition:
regexp_assembler_ir.cc:29
height
int32_t height
Definition:
serialization_callbacks.cc:1
width
int32_t width
Definition:
serialization_callbacks.cc:0
Generated on Sun Jun 23 2024 21:55:10 for Flutter Engine by
1.9.4