Skip to content

Commit 3fe0686

Browse files
committed
[window] Replace PNG watermark with copyright flag and vector logo rendering
1 parent 33dd8e6 commit 3fe0686

4 files changed

Lines changed: 107 additions & 818 deletions

File tree

documents/docs/subsys/window/window.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ struct window_t {
1515
struct dirtylist_t * dirtylist; /* 脏矩形列表 */
1616
struct fifo_t * event; /* 事件 FIFO 队列 */
1717
struct hmap_t * map; /* 输入设备映射表 */
18-
struct {
19-
struct surface_t * s; /* 水印 Surface */
20-
struct region_t r; /* 水印区域 */
21-
} watermark;
18+
int copyright; /* 版权标志 */
2219
int gmflag; /* 全局矩阵更新标志 */
2320
int dpi; /* 屏幕 DPI */
2421
};
@@ -98,7 +95,6 @@ int px = window_dp_to_px(w, 16); /* 16dp 转换为像素 */
9895
| `window_dp_to_px(w, dp)` | dp 转像素(内联函数) |
9996
| `window_set_backlight(w, brightness)` | 设置背光亮度(内联函数) |
10097
| `window_get_backlight(w)` | 获取背光亮度(内联函数) |
101-
| `window_set_watermark(w, buf, len)` | 设置水印图片(PNG 数据) |
10298
| `window_set_matrix(w, m)` | 设置本地变换矩阵 |
10399

104100
### 脏矩形与呈现
@@ -167,5 +163,4 @@ int bl = window_get_backlight(w);
167163
- 渲染 Surface 的像素格式为 32 位预乘 ARGB
168164
- 脏矩形机制避免全屏刷新,提高渲染效率
169165
- `window_present_commit()` 内部通过 G2D 硬件加速(若可用)执行 Surface 合成
170-
- 水印在 `window_alloc()` 时自动设置默认 XSTAR 水印,可通过 `window_set_watermark()` 自定义
171166
- `window_pump_event()` 为非阻塞接口,无事件时立即返回 0

documents/i18n/en/docusaurus-plugin-content-docs/current/subsys/window/window.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ struct window_t {
1515
struct dirtylist_t * dirtylist; /* Dirty rectangle list */
1616
struct fifo_t * event; /* Event FIFO queue */
1717
struct hmap_t * map; /* Input device mapping */
18-
struct {
19-
struct surface_t * s; /* Watermark Surface */
20-
struct region_t r; /* Watermark region */
21-
} watermark;
18+
int copyright; /* Copyright flag */
2219
int gmflag; /* Global matrix update flag */
2320
int dpi; /* Screen DPI */
2421
};
@@ -98,7 +95,6 @@ Conversion formula: `px = max(dpi * dp / 160, 1)`
9895
| `window_dp_to_px(w, dp)` | Convert dp to pixels (inline) |
9996
| `window_set_backlight(w, brightness)` | Set backlight brightness (inline) |
10097
| `window_get_backlight(w)` | Get backlight brightness (inline) |
101-
| `window_set_watermark(w, buf, len)` | Set watermark image (PNG data) |
10298
| `window_set_matrix(w, m)` | Set the local transform matrix |
10399

104100
### Dirty Rectangle and Presentation
@@ -167,5 +163,4 @@ int bl = window_get_backlight(w);
167163
- The rendering Surface pixel format is 32-bit premultiplied ARGB
168164
- The dirty rectangle mechanism avoids full-screen refresh, improving rendering efficiency
169165
- `window_present_commit()` uses G2D hardware acceleration (if available) for Surface compositing
170-
- A default XSTAR watermark is set during `window_alloc()`; it can be customized via `window_set_watermark()`
171166
- `window_pump_event()` is non-blocking; returns 0 immediately when no events are available

0 commit comments

Comments
 (0)