- add sources.
[platform/framework/web/crosswalk.git] / src / ozone / patches / 0002-EGL-specific-changes-for-Wayland.patch
1 From ec489ba365e077237ca5f8c2f0cfab7f710b6232 Mon Sep 17 00:00:00 2001
2 From: Kondapally Kalyan <kalyan.kondapally@intel.com>
3 Date: Thu, 5 Dec 2013 01:39:43 +0200
4 Subject: [PATCH] EGL specific changes for Wayland.
5
6 This patch adds following two snips, respectively giving support:
7 1)EGLNativeDisplayType adjustment and khronos header. More info:
8   https://code.google.com/p/chromium/issues/detail?id=266310
9 2)OffScreen-rendering support for use cases like WebGL and
10   Canvas2D. This should be enabled in upstream but needs some
11   cross platform support before it can be done.
12   More info: https://codereview.chromium.org/49533003/
13 ---
14  ui/gl/gl_surface_egl.cc |    5 ++---
15  1 file changed, 2 insertions(+), 3 deletions(-)
16
17 diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
18 index 3f8923a..7b1da0b8 100644
19 --- a/ui/gl/gl_surface_egl.cc
20 +++ b/ui/gl/gl_surface_egl.cc
21 @@ -118,8 +118,7 @@ bool GLSurfaceEGL::InitializeOneOff() {
22      LOG(ERROR) << "OZONE failed to initialize hardware";
23      return false;
24    }
25 -  g_native_display = reinterpret_cast<EGLNativeDisplayType>(
26 -      surface_factory->GetNativeDisplay());
27 +  g_native_display = surface_factory->GetNativeDisplay();
28  #else
29    g_native_display = EGL_DEFAULT_DISPLAY;
30  #endif
31 @@ -750,7 +749,7 @@ GLSurface::CreateOffscreenGLSurface(const gfx::Size& size) {
32      case kGLImplementationEGLGLES2: {
33        scoped_refptr<GLSurface> surface;
34        if (g_egl_surfaceless_context_supported &&
35 -         (size.width() == 0 && size.height() == 0)) {
36 +         (size.width() == 1 && size.height() == 1)) {
37          surface = new SurfacelessEGL(size);
38        } else
39          surface = new PbufferGLSurfaceEGL(size);
40 -- 
41 1.7.9.5
42