summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-11-26 19:13:27 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-11-26 19:13:27 +0900
commitb1bd672f04c720aaa24c0cf6461154614b9937a4 (patch)
tree82b56cb1308e3627df64ebcbaacc2b5253b3f0fb
parent4b804ef94306fe237899aa9ebc5b031631aea2c7 (diff)
Try and enable MSAA. Does not always work.
-rw-r--r--glview.c3
-rw-r--r--main.c67
2 files changed, 68 insertions, 2 deletions
diff --git a/glview.c b/glview.c
index 2ea076a..2a4f08b 100644
--- a/glview.c
+++ b/glview.c
@@ -332,7 +332,8 @@ glview_init(AppData *ad)
332 ELM_GLVIEW_DEPTH | 332 ELM_GLVIEW_DEPTH |
333 ELM_GLVIEW_STENCIL | 333 ELM_GLVIEW_STENCIL |
334 (ad->direct ? ELM_GLVIEW_DIRECT : 0) | 334 (ad->direct ? ELM_GLVIEW_DIRECT : 0) |
335 (ad->client_side ? ELM_GLVIEW_CLIENT_SIDE_ROTATION : 0) 335 (ad->client_side ? ELM_GLVIEW_CLIENT_SIDE_ROTATION : 0) |
336 ELM_GLVIEW_MULTISAMPLE_HIGH
336 ); 337 );
337 elm_glview_resize_policy_set(o, ELM_GLVIEW_RESIZE_POLICY_RECREATE); 338 elm_glview_resize_policy_set(o, ELM_GLVIEW_RESIZE_POLICY_RECREATE);
338 elm_glview_render_policy_set(o, ELM_GLVIEW_RENDER_POLICY_ON_DEMAND); 339 elm_glview_render_policy_set(o, ELM_GLVIEW_RENDER_POLICY_ON_DEMAND);
diff --git a/main.c b/main.c
index a7d047b..62e6b74 100644
--- a/main.c
+++ b/main.c
@@ -223,7 +223,72 @@ _anim_cb(void *data)
223static void 223static void
224_ecore_x_error_cb(void *data EINA_UNUSED) 224_ecore_x_error_cb(void *data EINA_UNUSED)
225{ 225{
226 fprintf(stderr, "An Ecore X error happened.\n"); 226 struct { const char *name; int code; } name_map[] =
227 {
228 { "KeyPress", 2 },
229 { "KeyRelease", 3 },
230 { "ButtonPress", 4 },
231 { "ButtonRelease", 5 },
232 { "MotionNotify", 6 },
233 { "EnterNotify", 7 },
234 { "LeaveNotify", 8 },
235 { "FocusIn", 9 },
236 { "FocusOut", 10 },
237 { "KeymapNotify", 11 },
238 { "Expose", 12 },
239 { "GraphicsExpose", 13 },
240 { "NoExpose", 14 },
241 { "VisibilityNotify", 15 },
242 { "CreateNotify", 16 },
243 { "DestroyNotify", 17 },
244 { "UnmapNotify", 18 },
245 { "MapNotify", 19 },
246 { "MapRequest", 20 },
247 { "ReparentNotify", 21 },
248 { "ConfigureNotify", 22 },
249 { "ConfigureRequest", 23 },
250 { "GravityNotify", 24 },
251 { "ResizeRequest", 25 },
252 { "CirculateNotify", 26 },
253 { "CirculateRequest", 27 },
254 { "PropertyNotify", 28 },
255 { "SelectionClear", 29 },
256 { "SelectionRequest", 30 },
257 { "SelectionNotify", 31 },
258 { "ColormapNotify", 32 },
259 { "ClientMessage", 33 },
260 { "MappingNotify", 34 }
261 };
262
263 const char *errors[] = {
264 "Success",
265 "BadRequest",
266 "BadValue",
267 "BadWindow",
268 "BadPixmap",
269 "BadAtom",
270 "BadCursor",
271 "BadFont",
272 "BadMatch",
273 "BadDrawable",
274 "BadAccess",
275 "BadAlloc",
276 "BadColor",
277 "BadGC",
278 "BadIDChoice",
279 "BadName",
280 "BadLength",
281 "BadImplementation"
282 };
283
284 int code = ecore_x_error_request_get();
285 const char *name = (code >= 2 && code < 35) ? name_map[code - 2].name : "unknown";
286
287 int err = ecore_x_error_code_get();
288 const char *errname = (err >= 0 && err < 17) ? errors[err] : "unknown";
289
290 fprintf(stderr, "An Ecore X error happened: Request %s (%x) Error %s (%d)\n",
291 name, code, errname, err);
227} 292}
228 293
229EAPI int 294EAPI int