Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
flow3r firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dos
flow3r firmware
Commits
a5327887
Verified
Commit
a5327887
authored
1 year ago
by
dos
Browse files
Options
Downloads
Patches
Plain Diff
drop frame
parent
7bb69c24
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
components/micropython/usermodule/mp_sys_display.c
+12
-0
12 additions, 0 deletions
components/micropython/usermodule/mp_sys_display.c
components/st3m/st3m_gfx.c
+14
-2
14 additions, 2 deletions
components/st3m/st3m_gfx.c
components/st3m/st3m_gfx.h
+3
-0
3 additions, 0 deletions
components/st3m/st3m_gfx.h
with
29 additions
and
2 deletions
components/micropython/usermodule/mp_sys_display.c
+
12
−
0
View file @
a5327887
...
...
@@ -105,6 +105,17 @@ STATIC mp_obj_t mp_update(mp_obj_t ctx_in) {
}
STATIC
MP_DEFINE_CONST_FUN_OBJ_1
(
mp_update_obj
,
mp_update
);
STATIC
mp_obj_t
mp_drop
(
mp_obj_t
ctx_in
)
{
mp_ctx_obj_t
*
self
=
MP_OBJ_TO_PTR
(
ctx_in
);
if
(
self
->
base
.
type
!=
&
mp_ctx_type
)
{
mp_raise_ValueError
(
"not a ctx"
);
return
mp_const_none
;
}
st3m_gfx_drop_frame
(
self
->
ctx
);
return
mp_const_none
;
}
STATIC
MP_DEFINE_CONST_FUN_OBJ_1
(
mp_drop_obj
,
mp_drop
);
STATIC
mp_obj_t
mp_pipe_full
(
void
)
{
if
(
st3m_gfx_pipe_full
())
{
return
mp_const_true
;
...
...
@@ -133,6 +144,7 @@ STATIC const mp_rom_map_elem_t mp_module_sys_display_globals_table[] = {
{
MP_ROM_QSTR
(
MP_QSTR_pipe_available
),
MP_ROM_PTR
(
&
mp_pipe_available_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_pipe_flush
),
MP_ROM_PTR
(
&
mp_pipe_flush_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_update
),
MP_ROM_PTR
(
&
mp_update_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_drop
),
MP_ROM_PTR
(
&
mp_drop_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_fb
),
MP_ROM_PTR
(
&
mp_fb_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_ctx
),
MP_ROM_PTR
(
&
mp_ctx_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_fps
),
MP_ROM_PTR
(
&
mp_fps_obj
)
},
...
...
This diff is collapsed.
Click to expand it.
components/st3m/st3m_gfx.c
+
14
−
2
View file @
a5327887
...
...
@@ -1026,21 +1026,33 @@ static void st3m_gfx_pipe_put(void) {
}
static
Ctx
*
st3m_gfx_ctx_int
(
st3m_gfx_mode
mode
);
void
st3m_gfx_end_frame
(
Ctx
*
ctx
)
{
static
int
end_frame
(
Ctx
*
ctx
)
{
ctx_restore
(
ctx
);
#if CONFIG_FLOW3R_CTX_FLAVOUR_FULL
if
(
ctx
==
st3m_gfx_ctx_int
(
st3m_gfx_osd
))
{
xSemaphoreGive
(
st3m_osd_lock
);
return
;
return
1
;
}
#endif
st3m_gfx_mode
set_mode
=
_st3m_gfx_mode
?
_st3m_gfx_mode
:
default_mode
;
if
((
set_mode
&
st3m_gfx_smart_redraw
)
&&
(
set_mode
&
st3m_gfx_direct_ctx
))
ctx_end_frame
(
ctx
);
return
0
;
}
void
st3m_gfx_end_frame
(
Ctx
*
ctx
)
{
if
(
end_frame
(
ctx
))
return
;
st3m_gfx_pipe_put
();
}
void
st3m_gfx_drop_frame
(
Ctx
*
ctx
)
{
if
(
end_frame
(
ctx
))
return
;
st3m_gfx_drawlist
*
drawlist
=
&
drawlists
[
last_descno
];
ctx_drawlist_clear
(
drawlist
->
user_ctx
);
xQueueSend
(
user_ctx_freeq
,
&
last_descno
,
portMAX_DELAY
);
}
uint8_t
st3m_gfx_pipe_available
(
void
)
{
st3m_gfx_mode
set_mode
=
_st3m_gfx_mode
?
_st3m_gfx_mode
:
default_mode
;
if
((
set_mode
&
st3m_gfx_EXPERIMENTAL_think_per_draw
)
&&
...
...
This diff is collapsed.
Click to expand it.
components/st3m/st3m_gfx.h
+
3
−
0
View file @
a5327887
...
...
@@ -101,6 +101,9 @@ float st3m_gfx_fps(void);
// with ctx_end_frame()
void
st3m_gfx_end_frame
(
Ctx
*
ctx
);
// drop the current frame without submitting it for displaying
void
st3m_gfx_drop_frame
(
Ctx
*
ctx
);
// Initialize the gfx subsystem of st3m, includng the rasterization and
// crtx/blitter pipeline.
void
st3m_gfx_init
(
void
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment