graphic_hw_update(NULL);
/* Usually, continuously updated.
- When the LCD is turned off,
+ When the display is turned off,
ten more updates the screen for a black screen. */
if (brightness_off) {
if (++sdl_skip_count > 10) {
static int shm_skip_update;
static int shm_skip_count;
+static int blank_cnt;
+#define MAX_BLANK_FRAME_CNT 100
+
extern pthread_mutex_t mutex_draw_display;
extern int draw_display_state;
if (draw_display_state == 0) {
draw_display_state = 1;
+
pthread_mutex_unlock(&mutex_draw_display);
maru_do_pixman_dpy_surface(dpy_surface->image);
memcpy(shared_memory,
surface_data(dpy_surface),
surface_stride(dpy_surface) *
surface_height(dpy_surface));
+
#ifdef INFO_FRAME_DROP_RATE
draw_frame++;
#endif
#endif
pthread_mutex_unlock(&mutex_draw_display);
}
+
#ifdef INFO_FRAME_DROP_RATE
INFO("! frame drop rate = (%d/%d)\n",
drop_frame, draw_frame + drop_frame);
/* If the display is turned off,
the screen does not update until the it is turned on */
if (shm_skip_update && brightness_off) {
+ if (blank_cnt > MAX_BLANK_FRAME_CNT) {
+ /* do nothing */
+ return;
+ } else if (blank_cnt == MAX_BLANK_FRAME_CNT) {
+ /* draw guide image */
+ INFO("draw a blank guide image\n");
+
+ notify_draw_blank_guide();
+ } else if (blank_cnt == 0) {
+ INFO("skipping of the display updating is started\n");
+ }
+
+ blank_cnt++;
+
return;
+ } else {
+ if (blank_cnt != 0) {
+ INFO("skipping of the display updating is ended\n");
+ blank_cnt = 0;
+ }
}
graphic_hw_update(NULL);
SEND_SENSOR_DAEMON_START = 800,
SEND_SDB_DAEMON_START = 801,
SEND_DRAW_FRAME = 900,
+ SEND_DRAW_BLANK_GUIDE = 901,
SEND_SHUTDOWN = 999,
};
}
}
+void notify_draw_blank_guide(void)
+{
+ INFO("notify_draw_blank_guide\n");
+
+ if (client_sock) {
+ if (0 > send_skin_header_only(
+ client_sock, SEND_DRAW_BLANK_GUIDE, 1)) {
+
+ ERR("fail to send SEND_DRAW_BLANK_GUIDE to skin.\n");
+ }
+ } else {
+ INFO("skin client socket is not connected yet\n");
+ }
+}
+
void notify_sdb_daemon_start(void)
{
INFO("notify_sdb_daemon_start\n");
void shutdown_skin_server(void);
void notify_draw_frame(void);
+void notify_draw_blank_guide(void);
void notify_sensor_daemon_start(void);
void notify_sdb_daemon_start(void);
void notify_ramdump_completed(void);