@geastack/engine 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/ui/render.cpp +12 -3
- package/ui/text.cpp +3 -0
- package/ui/tree_render.cpp +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geastack/engine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "GeaStack rendering engine, intrinsic JSX primitives, and native engine backends.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -57,6 +57,6 @@
|
|
|
57
57
|
},
|
|
58
58
|
"sideEffects": false,
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@geastack/core": "^0.1.
|
|
60
|
+
"@geastack/core": "^0.1.35"
|
|
61
61
|
}
|
|
62
62
|
}
|
package/ui/render.cpp
CHANGED
|
@@ -2725,6 +2725,9 @@ int gLastScrollUiFrame = -1000;
|
|
|
2725
2725
|
return;
|
|
2726
2726
|
|
|
2727
2727
|
const int stride = canvas->strideBytes() / static_cast<int>(sizeof(gea::framework::graphics::pixel::native_t));
|
|
2728
|
+
#if GEA_EMBEDDED_DISPLAY_ROTATE_LANDSCAPE
|
|
2729
|
+
const bool rotated = canvas->isLandscapeRotated();
|
|
2730
|
+
#endif
|
|
2728
2731
|
int dirtyX0 = canvas->width();
|
|
2729
2732
|
int dirtyY0 = canvas->height();
|
|
2730
2733
|
int dirtyX1 = -1;
|
|
@@ -3111,13 +3114,19 @@ int gLastScrollUiFrame = -1000;
|
|
|
3111
3114
|
alpha = (alpha * parentAlpha + 127) / 255;
|
|
3112
3115
|
if (alpha <= 0)
|
|
3113
3116
|
continue;
|
|
3117
|
+
auto *target = dst;
|
|
3118
|
+
#if GEA_EMBEDDED_DISPLAY_ROTATE_LANDSCAPE
|
|
3119
|
+
// Projected text writes native pixels directly, so it must use
|
|
3120
|
+
// the same logical-to-physical mapping as Canvas text drawing.
|
|
3121
|
+
if (rotated) target = canvas->pixels() + (canvas->width() - 1 - xi) * stride + y;
|
|
3122
|
+
#endif
|
|
3114
3123
|
if (alpha >= 255)
|
|
3115
|
-
*
|
|
3124
|
+
*target = textColorNative;
|
|
3116
3125
|
else
|
|
3117
3126
|
#if GEA_EMBEDDED_PIXEL_FORMAT == GEA_PIXEL_RGB565
|
|
3118
|
-
*
|
|
3127
|
+
*target = blendTextRgb565(*target, alpha);
|
|
3119
3128
|
#else
|
|
3120
|
-
*
|
|
3129
|
+
*target = gea::framework::graphics::pixel::blendNative(textColorNative, *target, alpha);
|
|
3121
3130
|
#endif
|
|
3122
3131
|
|
|
3123
3132
|
if (xi < dirtyX0)
|
package/ui/text.cpp
CHANGED
|
@@ -1998,6 +1998,9 @@ void GEA_TEXT_HOT_SRAM TextRenderer::record(const Node &node, uint8_t parentAlph
|
|
|
1998
1998
|
int y = n->layout.y;
|
|
1999
1999
|
int w = n->layout.width;
|
|
2000
2000
|
int h = n->layout.height;
|
|
2001
|
+
// Empty bounds are not a transform. Hidden-overflow text in an empty
|
|
2002
|
+
// content box has no paintable pixels and must not emit projected ink.
|
|
2003
|
+
if ((w <= 0 && overflowX(n->computedStyle())) || (h <= 0 && overflowY(n->computedStyle()))) return;
|
|
2001
2004
|
int tx = x + boxInset(n->computedStyle(), 3);
|
|
2002
2005
|
int ty = y + boxInset(n->computedStyle(), 0);
|
|
2003
2006
|
int tw = w - boxInset(n->computedStyle(), 1) - boxInset(n->computedStyle(), 3);
|
package/ui/tree_render.cpp
CHANGED
|
@@ -2214,6 +2214,16 @@ namespace gea::embedded::ui
|
|
|
2214
2214
|
}
|
|
2215
2215
|
#endif
|
|
2216
2216
|
}
|
|
2217
|
+
}
|
|
2218
|
+
// Allocation order is not tree order: component text can precede
|
|
2219
|
+
// its parent panel. Finish translating all retained commands before
|
|
2220
|
+
// recording any replacements at their final layout coordinates, or
|
|
2221
|
+
// a later parent translation moves freshly recorded text twice.
|
|
2222
|
+
for (int i = 0; can_keep_display_list && i < state.nodeCount; i++)
|
|
2223
|
+
{
|
|
2224
|
+
Node *n = &state.nodes[i];
|
|
2225
|
+
if (!n->render.dirty)
|
|
2226
|
+
continue;
|
|
2217
2227
|
if (layoutSizeChangeNeedsCommandRerecord(*n))
|
|
2218
2228
|
state.nodeCommandDirty[i] = 1;
|
|
2219
2229
|
if (state.nodeCommandDirty[i] && n->render.transform_dirty && n->first_child >= 0)
|