Skip to content

Commit 6c29aa1

Browse files
committed
Update embedder.h
1 parent 7081e73 commit 6c29aa1

File tree

3 files changed

+64
-28
lines changed

3 files changed

+64
-28
lines changed

flutter/shell/platform/embedder/embedder.h

Lines changed: 64 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ typedef enum {
164164
kFlutterSemanticsActionSetText = 1 << 21,
165165
/// Request that the respective focusable widget gain input focus.
166166
kFlutterSemanticsActionFocus = 1 << 22,
167+
/// Request that scrolls the current scrollable container to a given scroll
168+
/// offset.
169+
kFlutterSemanticsActionScrollToOffset = 1 << 23,
167170
} FlutterSemanticsAction;
168171

169172
/// The set of properties that may be associated with a semantics node.
@@ -243,6 +246,9 @@ typedef enum {
243246
kFlutterSemanticsFlagHasExpandedState = 1 << 26,
244247
/// Whether a semantic node that hasExpandedState is currently expanded.
245248
kFlutterSemanticsFlagIsExpanded = 1 << 27,
249+
/// The semantics node has the quality of either being "selected" or
250+
/// "not selected".
251+
kFlutterSemanticsFlagHasSelectedState = 1 << 28,
246252
} FlutterSemanticsFlag;
247253

248254
typedef enum {
@@ -322,9 +328,10 @@ typedef enum {
322328
/// occupying the lowest memory address.
323329
///
324330
/// - all other formats are called packed formats, and the component order
325-
/// as specified in the format name refers to the order in the native type.
326-
/// for example, for kFlutterSoftwarePixelFormatRGB565, the R component
327-
/// uses the 5 least significant bits of the uint16_t pixel value.
331+
/// as specified in the format name refers to the order from most
332+
/// significant to least significant bits in the native type. for example,
333+
/// for kFlutterSoftwarePixelFormatRGB565, R occupies the 5 most significant
334+
/// bits, G the middle 6 bits, and B the 5 least significant bits.
328335
///
329336
/// Each pixel format in this list is documented with an example on how to get
330337
/// the color components from the pixel.
@@ -337,41 +344,64 @@ typedef enum {
337344
/// can get the p for a RGBA8888 formatted buffer like this:
338345
/// const uint8_t *p = ((const uint8_t*) allocation) + row_bytes*y + x*4;
339346
typedef enum {
340-
/// pixel with 8 bit grayscale value.
347+
/// Pixel with 8 bit grayscale value.
341348
/// The grayscale value is the luma value calculated from r, g, b
342349
/// according to BT.709. (gray = r*0.2126 + g*0.7152 + b*0.0722)
343350
kFlutterSoftwarePixelFormatGray8,
344351

345-
/// pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word.
346-
/// r = p & 0x3F; g = (p>>5) & 0x3F; b = p>>11;
352+
/// Pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word.
353+
/// r = (p >> 11) & 0x1F;
354+
/// g = (p >> 5) & 0x3F;
355+
/// b = p & 0x1F;
356+
///
357+
/// On most (== little-endian) systems, this is equivalent to wayland format
358+
/// RGB565 (WL_DRM_FORMAT_RGB565, WL_SHM_FORMAT_RGB565).
347359
kFlutterSoftwarePixelFormatRGB565,
348360

349-
/// pixel with 4 bits for alpha, red, green, blue; in 16-bit word.
350-
/// r = p & 0xF; g = (p>>4) & 0xF; b = (p>>8) & 0xF; a = p>>12;
361+
/// Pixel with 4 bits each for alpha, red, green, blue; in 16-bit word.
362+
/// r = (p >> 8) & 0xF;
363+
/// g = (p >> 4) & 0xF;
364+
/// b = p & 0xF;
365+
/// a = (p >> 12) & 0xF;
366+
///
367+
/// On most (== little-endian) systems, this is equivalent to wayland format
368+
/// RGBA4444 (WL_DRM_FORMAT_RGBA4444, WL_SHM_FORMAT_RGBA4444).
351369
kFlutterSoftwarePixelFormatRGBA4444,
352370

353-
/// pixel with 8 bits for red, green, blue, alpha.
354-
/// r = p[0]; g = p[1]; b = p[2]; a = p[3];
371+
/// Pixel with 8 bits each for red, green, blue, alpha.
372+
/// r = p[0];
373+
/// g = p[1];
374+
/// b = p[2];
375+
/// a = p[3];
376+
///
377+
/// This is equivalent to wayland format ABGR8888 (WL_DRM_FORMAT_ABGR8888,
378+
/// WL_SHM_FORMAT_ABGR8888).
355379
kFlutterSoftwarePixelFormatRGBA8888,
356380

357-
/// pixel with 8 bits for red, green and blue and 8 unused bits.
358-
/// r = p[0]; g = p[1]; b = p[2];
381+
/// Pixel with 8 bits each for red, green and blue and 8 unused bits.
382+
/// r = p[0];
383+
/// g = p[1];
384+
/// b = p[2];
385+
///
386+
/// This is equivalent to wayland format XBGR8888 (WL_DRM_FORMAT_XBGR8888,
387+
/// WL_SHM_FORMAT_XBGR8888).
359388
kFlutterSoftwarePixelFormatRGBX8888,
360389

361-
/// pixel with 8 bits for blue, green, red and alpha.
362-
/// r = p[2]; g = p[1]; b = p[0]; a = p[3];
390+
/// Pixel with 8 bits each for blue, green, red and alpha.
391+
/// r = p[2];
392+
/// g = p[1];
393+
/// b = p[0];
394+
/// a = p[3];
395+
///
396+
/// This is equivalent to wayland format ARGB8888 (WL_DRM_FORMAT_ARGB8888,
397+
/// WL_SHM_FORMAT_ARGB8888).
363398
kFlutterSoftwarePixelFormatBGRA8888,
364399

365-
/// either kFlutterSoftwarePixelFormatBGRA8888 or
366-
/// kFlutterSoftwarePixelFormatRGBA8888 depending on CPU endianess and OS
400+
/// Either kFlutterSoftwarePixelFormatBGRA8888 or
401+
/// kFlutterSoftwarePixelFormatRGBA8888 depending on CPU endianess and OS.
367402
kFlutterSoftwarePixelFormatNative32,
368403
} FlutterSoftwarePixelFormat;
369404

370-
typedef enum {
371-
kFlutterGLImpellerTexturePixelBuffer,
372-
kFlutterGLImpellerTextureGpuSurface,
373-
} FlutterGLImpellerTextureType;
374-
375405
typedef struct {
376406
/// Target texture of the active texture unit (example GL_TEXTURE_2D or
377407
/// GL_TEXTURE_RECTANGLE).
@@ -386,8 +416,7 @@ typedef struct {
386416
size_t buffer_size;
387417
/// Callback invoked that the gpu surface texture start binding.
388418
BoolCallback bind_callback;
389-
/// The type of the texture.
390-
FlutterGLImpellerTextureType impeller_texture_type;
419+
391420
/// User data to be returned on the invocation of the destruction callback.
392421
void* user_data;
393422
/// Callback invoked (on an engine managed thread) that asks the embedder to
@@ -1661,6 +1690,8 @@ typedef struct {
16611690
/// A unique identifier for the task runner. If multiple task runners service
16621691
/// tasks on the same thread, their identifiers must match.
16631692
size_t identifier;
1693+
/// The callback invoked when the task runner is destroyed.
1694+
VoidCallback destruction_callback;
16641695
} FlutterTaskRunnerDescription;
16651696

16661697
typedef struct {
@@ -1732,7 +1763,8 @@ typedef struct {
17321763
/// store.
17331764
VoidCallback destruction_callback;
17341765
/// The pixel format that the engine should use to render into the allocation.
1735-
/// In most cases, kR
1766+
///
1767+
/// On Linux, kFlutterSoftwarePixelFormatBGRA8888 is most commonly used.
17361768
FlutterSoftwarePixelFormat pixel_format;
17371769
} FlutterSoftwareBackingStore2;
17381770

@@ -2002,6 +2034,14 @@ typedef struct {
20022034
/// The callback should return true if the operation was successful.
20032035
FlutterLayersPresentCallback present_layers_callback;
20042036
/// Avoid caching backing stores provided by this compositor.
2037+
///
2038+
/// The engine has an internal backing store cache. Instead of
2039+
/// creating & destroying backing stores for every frame, created
2040+
/// backing stores are automatically reused for subsequent frames.
2041+
///
2042+
/// If you wish to change this behavior and destroy backing stores after
2043+
/// they've been used once, and create new backing stores for every frame,
2044+
/// you can set this bool to true.
20052045
bool avoid_backing_store_cache;
20062046
/// Callback invoked by the engine to composite the contents of each layer
20072047
/// onto the specified view.

flutter/shell/platform/tizen/external_texture_pixel_egl_impeller.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ bool ExternalTexturePixelEGLImpeller::PopulateTexture(
3131
height = pixel_buffer->height;
3232

3333
// Populate the texture object used by the engine.
34-
opengl_texture->impeller_texture_type =
35-
FlutterGLImpellerTextureType::kFlutterGLImpellerTexturePixelBuffer;
3634
opengl_texture->buffer = pixel_buffer->buffer;
3735
opengl_texture->buffer_size =
3836
size_t(pixel_buffer->width) * size_t(pixel_buffer->height) * 4;

flutter/shell/platform/tizen/external_texture_surface_egl_impeller.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ bool ExternalTextureSurfaceEGLImpeller::PopulateTexture(
5959
return false;
6060
}
6161

62-
opengl_texture->impeller_texture_type =
63-
FlutterGLImpellerTextureType::kFlutterGLImpellerTextureGpuSurface;
6462
opengl_texture->bind_callback = OnBindCallback;
6563
opengl_texture->destruction_callback = nullptr;
6664
opengl_texture->user_data = this;

0 commit comments

Comments
 (0)