Flutter Engine
The Flutter Engine
PlatformViewRenderTarget.java
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5package io.flutter.plugin.platform;
6
7import android.view.Surface;
8
9/**
10 * A PlatformViewRenderTarget interface allows an Android Platform View to be rendered into an
11 * offscreen buffer (usually a texture is involved) that the engine can compose into the
12 * FlutterView.
13 */
14public interface PlatformViewRenderTarget {
15 // Called when the render target should be resized.
16 public void resize(int width, int height);
17
18 // Returns the currently specified width.
19 public int getWidth();
20
21 // Returns the currently specified height.
22 public int getHeight();
23
24 // The id of this render target.
25 public long getId();
26
27 // Releases backing resources.
28 public void release();
29
30 // Returns true in the case that backing resource have been released.
31 public boolean isReleased();
32
33 // Returns the Surface to be rendered on to.
34 public Surface getSurface();
35
36 // Schedules a frame to be drawn.
37 public default void scheduleFrame() {}
38}
int32_t height
int32_t width