+* 1.4.60
+- Fixed a problem about displayed useless line on screenshot
+== Sungmin Ha <sungmin82.ha@samsung.com> 2013-01-16
* 1.4.59
- removed setFocus on mac
== GiWoong Kim <giwoong.kim@samsung.com> 2013-01-16
-Version: 1.4.59
+Version: 1.4.60
Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
Source: emulator
#include "maru_vga_int.h"
#include "maru_brightness.h"
#include "maru_overlay.h"
+#include "maru_display.h"
#include "emul_state.h"
#include "debug_ch.h"
+#include <pthread.h>
#ifdef USE_SHM
#include "emulator.h"
MULTI_DEBUG_CHANNEL(qemu, maru_vga);
+extern pthread_mutex_t mutex_screenshot;
+extern pthread_cond_t cond_screenshot;
//#define DEBUG_VGA
//#define DEBUG_VGA_MEM
addr1 = 0;
d += linesize;
}
+
+ /* for screenshot */
+ pthread_mutex_lock(&mutex_screenshot);
+ MaruScreenshot* maru_screenshot = get_maru_screenshot();
+ if ( !maru_screenshot ) {
+ ERR( "maru screenshot is NULL.\n" );
+ } else {
+ if (maru_screenshot->request_screenshot == 1) {
+ memcpy(maru_screenshot->pixel_data, s->ds->surface->data,
+ s->ds->surface->linesize * s->ds->surface->height);
+ maru_screenshot->request_screenshot = 0;
+ pthread_cond_signal(&cond_screenshot);
+ }
+ }
+ pthread_mutex_unlock(&mutex_screenshot);
+
if (y_start >= 0) {
/* flush to display */
dpy_update(s->ds, 0, y_start,
MULTI_DEBUG_CHANNEL(tizen, display);
+MaruScreenshot* maru_screenshot = NULL;
//TODO: interface
void maru_display_init(DisplayState *ds)
#endif
register_displaychangelistener(ds, dcl);
+
+ maru_screenshot = g_malloc0(sizeof(MaruScreenshot));
+ maru_screenshot->pixel_data = NULL;
+ maru_screenshot->request_screenshot = 0;
}
void maru_display_fini(void)
{
INFO("fini qemu display\n");
-
+ g_free(maru_screenshot);
#ifndef USE_SHM
maruskin_sdl_quit();
#else
return NULL;
}
+MaruScreenshot* get_maru_screenshot(void) {
+#ifndef USE_SHM
+ return maru_screenshot;
+#else
+ //TODO:
+#endif
+
+ return NULL;
+}
+
#include "console.h"
+typedef struct MaruScreenshot {
+ unsigned char *pixel_data;
+ int request_screenshot;
+} MaruScreenshot;
void maru_display_init(DisplayState *ds);
void maru_display_fini(void);
void maruskin_init(uint64 swt_handle, int lcd_size_width, int lcd_size_height, bool is_resize);
DisplaySurface* get_qemu_display_surface(void);
+MaruScreenshot* get_maru_screenshot(void);
#endif /* MARU_DISPLAY_H_ */
MULTI_DEBUG_CHANNEL(qemu, skin_operation);
-
#define RESUME_KEY_SEND_INTERVAL 500 // milli-seconds
#define CLOSE_POWER_KEY_INTERVAL 1200 // milli-seconds
#define DATA_DELIMITER "#" // in detail info data
static int pressing_x = -1, pressing_y = -1;
static int pressing_origin_x = -1, pressing_origin_y = -1;
+extern pthread_mutex_t mutex_screenshot;
+extern pthread_cond_t cond_screenshot;
static void* run_timed_shutdown_thread(void* args);
static void send_to_emuld(const char* request_type, int request_size, const char* send_buf, int buf_size);
return NULL;
}
- memcpy( info->pixel_data, qemu_display_surface->data, length );
+ pthread_mutex_lock(&mutex_screenshot);
+ MaruScreenshot* maru_screenshot = get_maru_screenshot();
+ if ( !maru_screenshot ) {
+ ERR( "maru screenshot is NULL.\n" );
+ return NULL;
+ }
+ maru_screenshot->pixel_data = info->pixel_data;
+ maru_screenshot->request_screenshot = 1;
+ pthread_cond_wait(&cond_screenshot, &mutex_screenshot);
+ pthread_mutex_unlock(&mutex_screenshot);
+
info->pixel_data_length = length;
return info;
-
}
void free_screenshot_info(QemuSurfaceInfo* info)
MULTI_DEBUG_CHANNEL(qemu, skin_server);
-
#define MAX_REQ_ID 0x7fffffff
#define RECV_BUF_SIZE 32
#define RECV_HEADER_SIZE 12
SEND_SHUTDOWN = 999,
};
+pthread_mutex_t mutex_screenshot = PTHREAD_MUTEX_INITIALIZER;
+pthread_cond_t cond_screenshot = PTHREAD_COND_INITIALIZER;
+
static int seq_req_id = 0;
static uint16_t svr_port = 0;
}
}
+ pthread_cond_destroy(&cond_screenshot);
+ pthread_mutex_destroy(&mutex_screenshot);
+
stop_server = 1;
is_force_close_client = 1;