Made EGL useable by non-cairo ports.
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Jul 2013 16:34:47 +0000 (16:34 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Jul 2013 16:34:47 +0000 (16:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=119177

Reviewed by Brent Fulgham.

* platform/graphics/cairo/GLContext.h:
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::GLContextEGL):
* platform/graphics/egl/GLContextEGL.h:
Protected Cairo-specific code with #if USE(CAIRO)

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153429 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/cairo/GLContext.h
Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
Source/WebCore/platform/graphics/egl/GLContextEGL.h

index 8d4813e..2801598 100644 (file)
@@ -1,3 +1,16 @@
+2013-07-29  Alex Christensen  <achristensen@apple.com>
+
+        Made EGL useable by non-cairo ports.
+        https://bugs.webkit.org/show_bug.cgi?id=119177
+
+        Reviewed by Brent Fulgham.
+
+        * platform/graphics/cairo/GLContext.h:
+        * platform/graphics/egl/GLContextEGL.cpp:
+        (WebCore::GLContextEGL::GLContextEGL):
+        * platform/graphics/egl/GLContextEGL.h:
+        Protected Cairo-specific code with #if USE(CAIRO)
+
 2013-07-29  Sergio Correia  <sergio.correia@openbossa.org>
 
         CoordinatedGraphics: Add API to get and set the active state of a WebView
index 38df7a6..ade0ad2 100644 (file)
@@ -25,7 +25,9 @@
 #include <wtf/Noncopyable.h>
 #include <wtf/PassOwnPtr.h>
 
+#if USE(CAIRO)
 typedef struct _cairo_device cairo_device_t;
+#endif
 
 #if PLATFORM(X11)
 typedef struct _XDisplay Display;
@@ -48,7 +50,10 @@ public:
     virtual void waitNative() = 0;
     virtual bool canRenderToDefaultFramebuffer() = 0;
     virtual IntSize defaultFrameBufferSize() = 0;
+
+#if USE(CAIRO)
     virtual cairo_device_t* cairoDevice() = 0;
+#endif
 
 #if PLATFORM(X11)
     static Display* sharedX11Display();
index 3d5be23..09a7ed8 100644 (file)
@@ -217,7 +217,9 @@ GLContextEGL::GLContextEGL(EGLContext context, EGLSurface surface, EGLSurfaceTyp
     : m_context(context)
     , m_surface(surface)
     , m_type(type)
+#if USE(CAIRO)
     , m_cairoDevice(0)
+#endif
 {
 }
 
@@ -279,6 +281,7 @@ void GLContextEGL::waitNative()
     eglWaitNative(EGL_CORE_NATIVE_ENGINE);
 }
 
+#if USE(CAIRO)
 cairo_device_t* GLContextEGL::cairoDevice()
 {
     if (m_cairoDevice)
@@ -290,6 +293,7 @@ cairo_device_t* GLContextEGL::cairoDevice()
 
     return m_cairoDevice;
 }
+#endif
 
 #if ENABLE(WEBGL)
 PlatformGraphicsContext3D GLContextEGL::platformContext()
index 7516c69..c887e0b 100644 (file)
@@ -41,7 +41,9 @@ public:
     virtual void waitNative();
     virtual bool canRenderToDefaultFramebuffer();
     virtual IntSize defaultFrameBufferSize();
+#if USE(CAIRO)
     virtual cairo_device_t* cairoDevice();
+#endif
 
 #if ENABLE(WEBGL)
     virtual PlatformGraphicsContext3D platformContext();
@@ -59,7 +61,9 @@ private:
     EGLContext m_context;
     EGLSurface m_surface;
     EGLSurfaceType m_type;
+#if USE(CAIRO)
     cairo_device_t* m_cairoDevice;
+#endif
 };
 
 } // namespace WebCore