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
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
flow3r
flow3r firmware
Commits
bff400f1
Commit
bff400f1
authored
1 year ago
by
pippin
Committed by
pippin
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
ctx: sync with upstream to get public ctx_set_frameclock
parent
b4edc49c
No related branches found
No related tags found
1 merge request
!110
ctx,st3m: increment the frame-clock of the texture cache context
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
components/ctx/ctx.h
+14
-10
14 additions, 10 deletions
components/ctx/ctx.h
components/st3m/st3m_gfx.c
+4
-0
4 additions, 0 deletions
components/st3m/st3m_gfx.c
python_payload/apps/clouds/__init__.py
+2
-3
2 additions, 3 deletions
python_payload/apps/clouds/__init__.py
with
20 additions
and
13 deletions
components/ctx/ctx.h
+
14
−
10
View file @
bff400f1
/* ctx git commit:
4349079e
*/
/* ctx git commit:
aeaa8b2b
*/
/*
/*
* ctx.h is free software; you can redistribute it and/or
* ctx.h is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* modify it under the terms of the GNU Lesser General Public
...
@@ -2509,6 +2509,10 @@ void ctx_vt_write (Ctx *ctx, uint8_t byte);
...
@@ -2509,6 +2509,10 @@ void ctx_vt_write (Ctx *ctx, uint8_t byte);
int ctx_vt_has_data (Ctx *ctx);
int ctx_vt_has_data (Ctx *ctx);
int ctx_vt_read (Ctx *ctx);
int ctx_vt_read (Ctx *ctx);
void ctx_set_textureclock (Ctx *ctx, int frame);
int ctx_textureclock (Ctx *ctx);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
@@ -6121,8 +6125,7 @@ void ctx_buffer_set_data (CtxBuffer *buffer,
...
@@ -6121,8 +6125,7 @@ void ctx_buffer_set_data (CtxBuffer *buffer,
void (*freefunc) (void *pixels, void *user_data),
void (*freefunc) (void *pixels, void *user_data),
void *user_data);
void *user_data);
int _ctx_set_frame (Ctx *ctx, int frame);
int ctx_textureclock (Ctx *ctx);
int _ctx_frame (Ctx *ctx);
void ctx_exit (Ctx *ctx);
void ctx_exit (Ctx *ctx);
...
@@ -53372,14 +53375,15 @@ void ctx_texture (Ctx *ctx, const char *eid, float x, float y)
...
@@ -53372,14 +53375,15 @@ void ctx_texture (Ctx *ctx, const char *eid, float x, float y)
//fclose (f);
//fclose (f);
}
}
int
int
_
ctx_
frame
(Ctx *ctx)
ctx_
textureclock
(Ctx *ctx)
{
{
return ctx->frame;
return ctx->frame;
}
}
int
_ctx_set_frame (Ctx *ctx, int frame)
void
ctx_set_textureclock (Ctx *ctx, int textureclock)
{
{
return
ctx->frame =
frame
;
ctx->frame =
textureclock
;
}
}
void ctx_define_texture (Ctx *ctx,
void ctx_define_texture (Ctx *ctx,
...
@@ -60980,8 +60984,8 @@ static void vt_ctx_exit (void *data)
...
@@ -60980,8 +60984,8 @@ static void vt_ctx_exit (void *data)
vt->current_line->ctx = vt->current_line->ctx_copy;
vt->current_line->ctx = vt->current_line->ctx_copy;
vt->current_line->ctx_copy = tmp;
vt->current_line->ctx_copy = tmp;
_
ctx_set_
frame
(vt->current_line->ctx,
_
ctx_
frame
(vt->current_line->ctx) + 1);
ctx_set_
textureclock
(vt->current_line->ctx, ctx_
textureclock
(vt->current_line->ctx) + 1);
_
ctx_set_
frame
(vt->current_line->ctx_copy,
_
ctx_
frame
(vt->current_line->ctx));
ctx_set_
textureclock
(vt->current_line->ctx_copy, ctx_
textureclock
(vt->current_line->ctx));
#if 1
#if 1
if (vt->ctxp) // XXX: ugly hack to aid double buffering
if (vt->ctxp) // XXX: ugly hack to aid double buffering
((void**)vt->ctxp)[0]= vt->current_line->ctx;
((void**)vt->ctxp)[0]= vt->current_line->ctx;
...
@@ -67126,7 +67130,7 @@ void vt_draw (VT *vt, Ctx *ctx, double x0, double y0)
...
@@ -67126,7 +67130,7 @@ void vt_draw (VT *vt, Ctx *ctx, double x0, double y0)
if (line->ctx_copy)
if (line->ctx_copy)
{
{
//fprintf (stderr, " [%i]\n",
_
ctx_
frame
(ctx));
//fprintf (stderr, " [%i]\n", ctx_
textureclock
(ctx));
//ctx_render_stream (line->ctx_copy, stderr, 1);
//ctx_render_stream (line->ctx_copy, stderr, 1);
ctx_begin_path (ctx);
ctx_begin_path (ctx);
This diff is collapsed.
Click to expand it.
components/st3m/st3m_gfx.c
+
4
−
0
View file @
bff400f1
...
@@ -110,6 +110,8 @@ static void st3m_gfx_crtc_task(void *_arg) {
...
@@ -110,6 +110,8 @@ static void st3m_gfx_crtc_task(void *_arg) {
}
}
}
}
void
st3m_ctx_increment_frame
(
Ctx
*
ctx
);
static
void
st3m_gfx_rast_task
(
void
*
_arg
)
{
static
void
st3m_gfx_rast_task
(
void
*
_arg
)
{
(
void
)
_arg
;
(
void
)
_arg
;
...
@@ -129,6 +131,8 @@ static void st3m_gfx_rast_task(void *_arg) {
...
@@ -129,6 +131,8 @@ static void st3m_gfx_rast_task(void *_arg) {
end
=
esp_timer_get_time
();
end
=
esp_timer_get_time
();
st3m_counter_timer_sample
(
&
rast_read_dctx_time
,
end
-
start
);
st3m_counter_timer_sample
(
&
rast_read_dctx_time
,
end
-
start
);
st3m_ctx_increment_frame
(
framebuffer_descs
[
0
].
ctx
);
// Render drawctx into fbctx.
// Render drawctx into fbctx.
start
=
esp_timer_get_time
();
start
=
esp_timer_get_time
();
ctx_render_ctx
(
draw
->
ctx
,
fb
->
ctx
);
ctx_render_ctx
(
draw
->
ctx
,
fb
->
ctx
);
...
...
This diff is collapsed.
Click to expand it.
python_payload/apps/clouds/__init__.py
+
2
−
3
View file @
bff400f1
...
@@ -59,6 +59,5 @@ class Clouds(Application):
...
@@ -59,6 +59,5 @@ class Clouds(Application):
c
.
draw
(
ctx
)
c
.
draw
(
ctx
)
if
__name__
==
"
__main__
"
:
# uncomment to make runnable via mpremote
# Continue to make runnable via mpremote run.
# st3m.run.run_view(Clouds(ApplicationContext()))
st3m
.
run
.
run_view
(
Clouds
(
ApplicationContext
()))
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