diff --git a/src/base/image_manager.c b/src/base/image_manager.c index 5f72000b1..a1edd1bdb 100644 --- a/src/base/image_manager.c +++ b/src/base/image_manager.c @@ -151,7 +151,7 @@ ret_t image_manager_load(image_manager_t* imm, const char* name, bitmap_t* image image->name = res->name; image->data = header->data; -#if defined(WITH_NANOVG_GL) || defined(WITH_NANOVG_SOFT) +#if defined(WITH_NANOVG_GPU) || defined(WITH_NANOVG_SOFT) image_manager_add(imm, name, image); #endif return RET_OK; diff --git a/src/base/window_animator.c b/src/base/window_animator.c index b17784741..4170619f8 100755 --- a/src/base/window_animator.c +++ b/src/base/window_animator.c @@ -67,7 +67,7 @@ ret_t window_animator_destroy(window_animator_t* wa) { } ret_t window_animator_begin_frame(window_animator_t* wa) { -#ifdef WITH_NANOVG_GL +#ifdef WITH_NANOVG_GPU (void)wa; #else rect_t r; @@ -80,7 +80,7 @@ ret_t window_animator_begin_frame(window_animator_t* wa) { } ret_t window_animator_begin_frame_overlap(window_animator_t* wa) { -#ifdef WITH_NANOVG_GL +#ifdef WITH_NANOVG_GPU (void)wa; #else rect_t r; diff --git a/src/window_animators/bottom_to_top.inc b/src/window_animators/bottom_to_top.inc index 22f965ba0..b021ebd53 100755 --- a/src/window_animators/bottom_to_top.inc +++ b/src/window_animators/bottom_to_top.inc @@ -19,7 +19,7 @@ static ret_t window_animator_open_bottom_to_top_draw_prev(window_animator_t* wa) src = rect_init(win->x * ratio, win->y * ratio, win->w * ratio, win->h * ratio); dst = rect_init(win->x, win->y, win->w, win->h); -#ifndef WITH_NANOVG_GL +#ifndef WITH_NANOVG_GPU if (wa->percent > 0 && !lcd_is_swappable(c->lcd)) { wh_t h = (1 - wa->percent) * wa->curr_win->h; @@ -45,7 +45,7 @@ static ret_t window_animator_open_bottom_to_top_draw_curr(window_animator_t* wa) float_t percent = wa->percent; float_t alpha = percent; -#ifdef WITH_NANOVG_GL +#ifdef WITH_NANOVG_GPU float_t h = win->h * percent; float_t y = win->parent->h - h; vgcanvas_t* vg = lcd_get_vgcanvas(c->lcd); diff --git a/src/window_animators/center_scale.inc b/src/window_animators/center_scale.inc index c37a9a10c..ea407af4e 100644 --- a/src/window_animators/center_scale.inc +++ b/src/window_animators/center_scale.inc @@ -18,13 +18,13 @@ static ret_t window_animator_open_scale_draw_prev(window_animator_t* wa) { src = rect_init(win->x * ratio, win->y * ratio, win->w * ratio, win->h * ratio); dst = rect_init(win->x, win->y, win->w, win->h); -#ifndef WITH_NANOVG_GL +#ifndef WITH_NANOVG_GPU if (wa->percent > 0 && !lcd_is_swappable(c->lcd)) { win = wa->curr_win; src = rect_init(win->x * ratio, win->y * ratio, win->w * ratio, win->h * ratio); dst = rect_init(win->x, win->y, win->w, win->h); } -#endif /*WITH_NANOVG_GL*/ +#endif /*WITH_NANOVG_GPU*/ lcd_draw_image(c->lcd, &(wa->prev_img), &src, &dst); return RET_OK; @@ -40,7 +40,7 @@ static ret_t window_animator_open_scale_draw_curr(window_animator_t* wa) { float_t alpha = wa->open ? wa->time_percent : 1 - wa->time_percent; src = rect_init(win->x * ratio, win->y * ratio, win->w * ratio, win->h * ratio); -#ifdef WITH_NANOVG_GL +#ifdef WITH_NANOVG_GPU vgcanvas_t* vg = lcd_get_vgcanvas(c->lcd); dst = rect_init(0, 0, win->w, win->h); vgcanvas_save(vg); @@ -60,7 +60,7 @@ static ret_t window_animator_open_scale_draw_curr(window_animator_t* wa) { lcd_set_global_alpha(c->lcd, alpha * 0xff); lcd_draw_image(c->lcd, &(wa->curr_img), &src, &dst); } -#endif /*WITH_NANOVG_GL*/ +#endif /*WITH_NANOVG_GPU*/ return RET_OK; } diff --git a/src/window_animators/fade.inc b/src/window_animators/fade.inc index 84626ab75..42f21ef93 100644 --- a/src/window_animators/fade.inc +++ b/src/window_animators/fade.inc @@ -18,13 +18,13 @@ static ret_t window_animator_open_fade_draw_prev(window_animator_t* wa) { src = rect_init(win->x * ratio, win->y * ratio, win->w * ratio, win->h * ratio); dst = rect_init(win->x, win->y, win->w, win->h); -#ifndef WITH_NANOVG_GL +#ifndef WITH_NANOVG_GPU if (wa->percent > 0 && !lcd_is_swappable(c->lcd)) { win = wa->curr_win; src = rect_init(win->x * ratio, win->y * ratio, win->w * ratio, win->h * ratio); dst = rect_init(win->x, win->y, win->w, win->h); } -#endif /*WITH_NANOVG_GL*/ +#endif /*WITH_NANOVG_GPU*/ lcd_draw_image(c->lcd, &(wa->prev_img), &src, &dst); return RET_OK; @@ -41,7 +41,7 @@ static ret_t window_animator_open_fade_draw_curr(window_animator_t* wa) { dst = rect_init(win->x, win->y, win->w, win->h); src = rect_init(win->x * ratio, win->y * ratio, win->w * ratio, win->h * ratio); -#ifdef WITH_NANOVG_GL +#ifdef WITH_NANOVG_GPU vgcanvas_t* vg = lcd_get_vgcanvas(c->lcd); vgcanvas_save(vg); vgcanvas_set_global_alpha(vg, alpha); @@ -52,7 +52,7 @@ static ret_t window_animator_open_fade_draw_curr(window_animator_t* wa) { global_alpha = alpha * 0xff; lcd_set_global_alpha(c->lcd, global_alpha); lcd_draw_image(c->lcd, &(wa->curr_img), &src, &dst); -#endif /*WITH_NANOVG_GL*/ +#endif /*WITH_NANOVG_GPU*/ return RET_OK; } diff --git a/src/window_animators/htranslate.inc b/src/window_animators/htranslate.inc index c95286109..684da904e 100755 --- a/src/window_animators/htranslate.inc +++ b/src/window_animators/htranslate.inc @@ -18,7 +18,7 @@ static ret_t window_animator_open_htranslate_draw_prev(window_animator_t* wa) { float_t x = win->w * percent; float_t w = win->w * (1 - percent); -#ifdef WITH_NANOVG_GL +#ifdef WITH_NANOVG_GPU vgcanvas_t* vg = lcd_get_vgcanvas(c->lcd); vgcanvas_draw_image(vg, &(wa->prev_img), x * ratio, win->y * ratio, w * ratio, win->h * ratio, 0, win->y, w, win->h); @@ -41,7 +41,7 @@ static ret_t window_animator_open_htranslate_draw_curr(window_animator_t* wa) { float_t x = win->w * (1 - percent); float_t w = win->w * percent; -#ifdef WITH_NANOVG_GL +#ifdef WITH_NANOVG_GPU vgcanvas_t* vg = lcd_get_vgcanvas(c->lcd); vgcanvas_draw_image(vg, &(wa->curr_img), 0, win->y * ratio, w * ratio, win->h * ratio, x, win->y, w, win->h); diff --git a/src/window_animators/top_to_bottom.inc b/src/window_animators/top_to_bottom.inc index 97eb7f22f..80ddd36bb 100755 --- a/src/window_animators/top_to_bottom.inc +++ b/src/window_animators/top_to_bottom.inc @@ -18,7 +18,7 @@ static ret_t window_animator_open_top_to_bottom_draw_prev(window_animator_t* wa) src = rect_init(win->x * ratio, win->y * ratio, win->w * ratio, win->h * ratio); dst = rect_init(win->x, win->y, win->w, win->h); -#ifndef WITH_NANOVG_GL +#ifndef WITH_NANOVG_GPU if (wa->percent > 0 && !lcd_is_swappable(c->lcd)) { wh_t y = wa->percent * wa->curr_win->h; wh_t h = wa->curr_win->h - y; @@ -45,7 +45,7 @@ static ret_t window_animator_open_top_to_bottom_draw_curr(window_animator_t* wa) float_t percent = wa->percent; float_t alpha = percent; -#ifdef WITH_NANOVG_GL +#ifdef WITH_NANOVG_GPU float_t h = win->h * percent; float_t y = win->h - h; vgcanvas_t* vg = lcd_get_vgcanvas(c->lcd); diff --git a/src/window_animators/vtranslate.inc b/src/window_animators/vtranslate.inc index 6f5af085d..61c1bc774 100755 --- a/src/window_animators/vtranslate.inc +++ b/src/window_animators/vtranslate.inc @@ -18,7 +18,7 @@ static ret_t window_animator_open_vtranslate_draw_prev(window_animator_t* wa) { float_t y = curr_win->h * percent; float_t h = win->h - y; -#ifdef WITH_NANOVG_GL +#ifdef WITH_NANOVG_GPU float_t ratio = wa->ratio; vgcanvas_t* vg = lcd_get_vgcanvas(c->lcd); vgcanvas_draw_image(vg, &(wa->prev_img), win->x * ratio, y * ratio, win->w * ratio, h * ratio, @@ -41,7 +41,7 @@ static ret_t window_animator_open_vtranslate_draw_curr(window_animator_t* wa) { float_t h = win->h * percent; float_t y = win->parent->h - h; -#ifdef WITH_NANOVG_GL +#ifdef WITH_NANOVG_GPU float_t ratio = wa->ratio; vgcanvas_t* vg = lcd_get_vgcanvas(c->lcd); vgcanvas_draw_image(vg, &(wa->curr_img), win->x * ratio, win->y * ratio, win->w * ratio,