#include "hw/maru_device_ids.h"
#include "maru_brightness.h"
#include "debug_ch.h"
+#include "qt5_supplement.h"
MULTI_DEBUG_CHANNEL(tizen, brightness);
level_color.alpha = value << 8;
brightness_image = pixman_image_create_solid_fill(&level_color);
- graphic_hw_invalidate(NULL);
+#ifdef CONFIG_OPENGL
+ if (display_opengl)
+ qt5_gl_display_force_redraw();
+ else
+#endif
+ graphic_hw_invalidate(NULL);
}
static void brightness_reg_write(void *opaque,
qt5_gl_make_context_current_internal(con->ctx);
surface_gl_update_texture(con->gls, con->surface, x, y, w, h);
con->updated = true;
+
+ /* Note that, unlike non-GL, we do not call composite_brightness_image.
+ * In this case, brightness rendering is the responsibility of the display. */
}
static void qt5_gl_switch(DisplayChangeListener *dcl,
{
return QOpenGLContext::currentContext();
}
+
+void qt5_gl_display_force_redraw()
+{
+ if (mainwindow) {
+ ((DisplayGLWidget *)mainwindow->getDisplay())->update();
+ }
+}
#endif
void qt5_gl_destroy_context_internal(void *);
int qt5_gl_make_context_current_internal(void *_ctx);
void *qt5_gl_get_current_context_internal(void);
+void qt5_gl_display_force_redraw(void);
#endif
#ifdef __cplusplus