Define shared buffer handle type in GLDefs. 05/3805/1
authorKondapally Kalyan <kalyan.kondapally@intel.com>
Tue, 4 Jun 2013 09:23:35 +0000 (12:23 +0300)
committerKondapally Kalyan <kalyan.kondapally@intel.com>
Tue, 4 Jun 2013 09:23:35 +0000 (12:23 +0300)
Currently, shared buffer handle is used in many places. This
patch defines the type of the shared buffer handle in GLDefs
and uses it in all the appropriate places.

29 files changed:
Source/WebCore/platform/graphics/efl/tizen/Canvas2DLayerTizen.cpp
Source/WebCore/platform/graphics/efl/tizen/Canvas2DLayerTizen.h
Source/WebCore/platform/graphics/efl/tizen/GraphicsContext3DOffscreen.cpp
Source/WebCore/platform/graphics/efl/tizen/GraphicsContext3DOffscreen.h
Source/WebCore/platform/graphics/gstreamer/tizen/VideoLayerTizen.cpp
Source/WebCore/platform/graphics/gstreamer/tizen/VideoLayerTizen.h
Source/WebCore/platform/graphics/opengl/GLDefs.h
Source/WebCore/platform/graphics/surfaces/GraphicsSurface.cpp
Source/WebCore/platform/graphics/surfaces/GraphicsSurface.h
Source/WebCore/platform/graphics/surfaces/tizen/GraphicsSurfaceTizen.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.h
Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h
Source/WebKit2/PlatformTizen.cmake
Source/WebKit2/Shared/ShareableSurface.h
Source/WebKit2/UIProcess/LayerTreeCoordinatorProxy.cpp
Source/WebKit2/UIProcess/LayerTreeCoordinatorProxy.h
Source/WebKit2/UIProcess/LayerTreeCoordinatorProxy.messages.in
Source/WebKit2/UIProcess/WebLayerTreeRenderer.cpp
Source/WebKit2/UIProcess/WebLayerTreeRenderer.h
Source/WebKit2/UIProcess/tizen/WebLayerTreeRendererTizen.cpp
Source/WebKit2/UIProcess/tizen/WebLayerTreeRendererTizen.h
Source/WebKit2/WebProcess/Plugins/Plugin.h
Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp
Source/WebKit2/WebProcess/Plugins/PluginProxy.h
Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.cpp
Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/LayerTreeCoordinator.h
Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.cpp
Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.h

index 80ac2a6..b26ae3b 100644 (file)
@@ -98,7 +98,7 @@ void Canvas2DLayerTizen::removePlatformSurface(int id)
 }
 
 #if ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-uint32_t Canvas2DLayerTizen::copyToGraphicsSurface()
+PlatformBufferHandle Canvas2DLayerTizen::copyToGraphicsSurface()
 {
 #if ENABLE(TIZEN_CANVAS_CAIRO_GLES_RENDERING) || ENABLE(TIZEN_CANVAS_SURFACE_LOCKING)
     if (m_renderingContext && m_renderingContext->canvas() && m_renderingContext->canvas()->buffer()) {
@@ -113,7 +113,7 @@ uint32_t Canvas2DLayerTizen::copyToGraphicsSurface()
     return m_platformSurfaceID;
 }
 
-uint64_t Canvas2DLayerTizen::graphicsSurfaceToken() const
+PlatformBufferHandle Canvas2DLayerTizen::graphicsSurfaceToken() const
 {
 #if ENABLE(TIZEN_CANVAS_CAIRO_GLES_RENDERING) || ENABLE(TIZEN_CANVAS_SURFACE_LOCKING)
     if (m_renderingContext && m_renderingContext->canvas() && m_renderingContext->canvas()->buffer())
index 97f2a24..e328073 100644 (file)
@@ -56,8 +56,8 @@ public:
     virtual int contentType() { return Canvas2DContentType; }
 
 #if ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-    virtual uint32_t copyToGraphicsSurface();
-    virtual uint64_t graphicsSurfaceToken() const;
+    virtual PlatformBufferHandle copyToGraphicsSurface();
+    virtual PlatformBufferHandle graphicsSurfaceToken() const;
     virtual int graphicsSurfaceFlags() const { return GraphicsSurface::Is2D | GraphicsSurface::Alpha | GraphicsSurface::UseLinearFilter; }
 #endif
 
index 18def8f..e4c25ff 100755 (executable)
@@ -531,7 +531,7 @@ void GraphicsContext3DOffscreen::removePlatformSurface(int id)
 #endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
 
 #if ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-uint32_t GraphicsContext3DOffscreen::copyToGraphicsSurface()
+PlatformBufferHandle GraphicsContext3DOffscreen::copyToGraphicsSurface()
 {
 #if !ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
     if (!m_graphicsSurface)
@@ -548,7 +548,7 @@ uint32_t GraphicsContext3DOffscreen::copyToGraphicsSurface()
 #endif
 }
 
-uint64_t GraphicsContext3DOffscreen::graphicsSurfaceToken() const
+PlatformBufferHandle GraphicsContext3DOffscreen::graphicsSurfaceToken() const
 {
     return m_graphicsSurface ? m_graphicsSurface->exportToken() : 0;
 }
index 97a9ed9..8c76d75 100755 (executable)
@@ -73,8 +73,8 @@ public:
     virtual void removePlatformSurface(int);
 #endif
 #if ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-    virtual uint32_t copyToGraphicsSurface();
-    virtual uint64_t graphicsSurfaceToken() const; // used to be platformSurfaceID()
+    virtual PlatformBufferHandle copyToGraphicsSurface();
+    virtual PlatformBufferHandle graphicsSurfaceToken() const; // used to be platformSurfaceID()
     virtual int graphicsSurfaceFlags() const;
     void createGraphicsSurfaces(const IntSize&);
 #endif
index 37a20de..fd0d16e 100644 (file)
@@ -236,7 +236,7 @@ void VideoLayerTizen::paintVideoLayer(IntSize videoSize)
 #endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
 
 #if USE(GRAPHICS_SURFACE) || ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-uint64_t VideoLayerTizen::graphicsSurfaceToken() const
+PlatformBufferHandle VideoLayerTizen::graphicsSurfaceToken() const
 {
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
     return (m_platformSurface ? m_platformSurface->id() : 0);
@@ -245,7 +245,7 @@ uint64_t VideoLayerTizen::graphicsSurfaceToken() const
 #endif
 }
 
-uint32_t VideoLayerTizen::copyToGraphicsSurface()
+PlatformBufferHandle VideoLayerTizen::copyToGraphicsSurface()
 {
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
     return (m_platformSurface ? m_platformSurface->id() : 0);
index 427ef8c..b782048 100644 (file)
@@ -74,8 +74,8 @@ public:
 #endif // ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
 
 #if USE(GRAPHICS_SURFACE) || ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-    virtual uint32_t copyToGraphicsSurface();
-    virtual uint64_t graphicsSurfaceToken() const;
+    virtual PlatformBufferHandle copyToGraphicsSurface();
+    virtual PlatformBufferHandle graphicsSurfaceToken() const;
     virtual int graphicsSurfaceFlags() const;
 #endif
 
index d36035a..948f8e8 100644 (file)
@@ -34,6 +34,8 @@
 #include <GL/glxext.h>
 #endif
 
+#include <stdint.h>
+
 namespace WebCore {
 
 typedef uint32_t PlatformBufferHandle;
index 86a54a2..053555c 100755 (executable)
@@ -25,7 +25,7 @@
 #if USE(GRAPHICS_SURFACE) || ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
 namespace WebCore {
 
-PassRefPtr<GraphicsSurface> GraphicsSurface::create(const IntSize& size, Flags flags, uint64_t token)
+PassRefPtr<GraphicsSurface> GraphicsSurface::create(const IntSize& size, Flags flags, PlatformBufferHandle token)
 {
     return platformImport(size, flags, token);
 }
@@ -36,18 +36,18 @@ PassRefPtr<GraphicsSurface> GraphicsSurface::create(const IntSize& size, Graphic
 }
 
 #if ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-PassRefPtr<GraphicsSurface> GraphicsSurface::create(uint32_t platformSurfaceID)
+PassRefPtr<GraphicsSurface> GraphicsSurface::create(PlatformBufferHandle platformSurfaceID)
 {
     return platformCreate(platformSurfaceID);
 }
 
-PassRefPtr<GraphicsSurface> GraphicsSurface::create(const IntSize& size, Flags flags, uint64_t token, Flags canvasFlags)
+PassRefPtr<GraphicsSurface> GraphicsSurface::create(const IntSize& size, Flags flags, PlatformBufferHandle token, Flags canvasFlags)
 {
     return platformImport(size, flags, token, canvasFlags);
 }
 #endif
 
-uint64_t GraphicsSurface::exportToken()
+PlatformBufferHandle GraphicsSurface::exportToken()
 {
     return platformExport();
 }
@@ -80,18 +80,18 @@ void GraphicsSurface::paintToTextureMapper(TextureMapper* textureMapper, const F
     platformPaintToTextureMapper(textureMapper, targetRect, transform, opacity);
 }
 
-uint32_t GraphicsSurface::frontBuffer()
+PlatformBufferHandle GraphicsSurface::frontBuffer()
 {
     return platformFrontBuffer();
 }
 
-uint32_t GraphicsSurface::swapBuffers()
+PlatformBufferHandle GraphicsSurface::swapBuffers()
 {
     return platformSwapBuffers();
 }
 
 #if ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-uint32_t GraphicsSurface::swapBuffers(uint32_t frontBuffer)
+PlatformBufferHandle GraphicsSurface::swapBuffers(PlatformBufferHandle frontBuffer)
 {
     return platformSwapBuffers(frontBuffer);
 }
index 78729e4..213067c 100755 (executable)
@@ -20,6 +20,7 @@
 #ifndef GraphicsSurface_h
 #define GraphicsSurface_h
 
+#include "GLDefs.h"
 #include "GraphicsContext.h"
 #include "IntRect.h"
 #include <wtf/OwnPtr.h>
@@ -76,24 +77,24 @@ public:
     typedef int LockOptions;
 
     Flags flags() const { return m_flags; }
-    PlatformGraphicsSurface platformSurface() const { return m_platformSurface; }
+    PlatformBufferHandle platformSurface() const { return m_platformSurface; }
     IntSize size() const { return m_size; }
 
     static PassRefPtr<GraphicsSurface> create(const IntSize&, Flags);
-    static PassRefPtr<GraphicsSurface> create(const IntSize&, Flags, uint64_t token);
+    static PassRefPtr<GraphicsSurface> create(const IntSize&, Flags, PlatformBufferHandle token);
 #if ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-    static PassRefPtr<GraphicsSurface> create(uint32_t);
-    static PassRefPtr<GraphicsSurface> create(const IntSize&, Flags, uint64_t token, Flags);
+    static PassRefPtr<GraphicsSurface> create(PlatformBufferHandle);
+    static PassRefPtr<GraphicsSurface> create(const IntSize&, Flags, PlatformBufferHandle token, Flags);
 #endif
     void copyToGLTexture(uint32_t target, uint32_t texture, const IntRect& targetRect, const IntPoint& sourceOffset);
     void copyFromFramebuffer(uint32_t fbo, const IntRect& sourceRect);
     void paintToTextureMapper(TextureMapper*, const FloatRect& targetRect, const TransformationMatrix&, float opacity);
-    uint32_t frontBuffer();
-    uint32_t swapBuffers();
+    PlatformBufferHandle frontBuffer();
+    PlatformBufferHandle swapBuffers();
 #if ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-    uint32_t swapBuffers(uint32_t);
+    PlatformBufferHandle swapBuffers(PlatformBufferHandle);
 #endif
-    uint64_t exportToken();
+    PlatformBufferHandle exportToken();
     uint32_t getTextureID();
     PassOwnPtr<GraphicsContext> beginPaint(const IntRect&, LockOptions);
     PassRefPtr<Image> createReadOnlyImage(const IntRect&);
@@ -101,12 +102,12 @@ public:
 
 protected:
     static PassRefPtr<GraphicsSurface> platformCreate(const IntSize&, Flags);
-    static PassRefPtr<GraphicsSurface> platformImport(const IntSize&, Flags, uint64_t);
+    static PassRefPtr<GraphicsSurface> platformImport(const IntSize&, Flags, PlatformBufferHandle);
 #if ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-    static PassRefPtr<GraphicsSurface> platformCreate(uint64_t);
-    static PassRefPtr<GraphicsSurface> platformImport(const IntSize&, Flags, uint64_t, Flags);
+    static PassRefPtr<GraphicsSurface> platformCreate(PlatformBufferHandle);
+    static PassRefPtr<GraphicsSurface> platformImport(const IntSize&, Flags, PlatformBufferHandle, Flags);
 #endif
-    uint64_t platformExport();
+    PlatformBufferHandle platformExport();
     void platformDestroy();
     uint32_t platformGetTextureID();
 
@@ -115,10 +116,10 @@ protected:
     void platformCopyToGLTexture(uint32_t target, uint32_t texture, const IntRect&, const IntPoint&);
     void platformCopyFromFramebuffer(uint32_t fbo, const IntRect& sourceRect);
     void platformPaintToTextureMapper(TextureMapper*, const FloatRect& targetRect, const TransformationMatrix&, float opacity);
-    uint32_t platformFrontBuffer() const;
-    uint32_t platformSwapBuffers();
+    PlatformBufferHandle platformFrontBuffer() const;
+    PlatformBufferHandle platformSwapBuffers();
 #if ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-    uint32_t platformSwapBuffers(uint32_t);
+    PlatformBufferHandle platformSwapBuffers(PlatformBufferHandle);
 #endif
 
     PassOwnPtr<GraphicsContext> platformBeginPaint(const IntSize&, char* bits, int stride);
@@ -139,7 +140,7 @@ private:
 
 private:
     IntSize m_size;
-    PlatformGraphicsSurface m_platformSurface;
+    PlatformBufferHandle m_platformSurface;
     uint32_t m_texture;
     uint32_t m_fbo;
     GraphicsSurfacePrivate* m_private;
index 1eef303..ccd683b 100644 (file)
 #include "PlatformSurfaceTextureGL.h"
 
 #include "NotImplemented.h"
-#include <EGL/egl.h>
-#include <GLES2/gl2.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
 
 namespace WebCore {
 
@@ -45,7 +41,7 @@ struct GraphicsSurfacePrivate {
     {
     }
 
-    void createImage(const IntSize& size, uint32_t platformSurfaceID)
+    void createImage(const IntSize& size, PlatformBufferHandle)
     {
         m_size = size;
     }
@@ -66,9 +62,9 @@ struct GraphicsSurfacePrivate {
 
     void setTextureMapper(TextureMapper* textureMapper) { m_textureMapper = textureMapper; }
 
-    void swapBuffers(uint32_t frontBuffer) { m_frontBuffer = frontBuffer; }
+    void swapBuffers(PlatformBufferHandle frontBuffer) { m_frontBuffer = frontBuffer; }
     void swapBuffers() { }
-    uint32_t frontBuffer() { return m_frontBuffer; }
+    PlatformBufferHandle frontBuffer() { return m_frontBuffer; }
 
     IntSize size() const { return m_size; }
     bool hasAlpha() const { return m_hasAlpha; }
@@ -76,13 +72,13 @@ private:
     IntSize m_size;
     bool m_textureIsYInverted;
     bool m_hasAlpha;
-    uint32_t m_frontBuffer;
+    PlatformBufferHandle m_frontBuffer;
     TextureMapper* m_textureMapper;
     typedef HashMap<uint32_t, RefPtr<PlatformSurfaceTexture> > PlatformSurfaceTextureMap;
     PlatformSurfaceTextureMap m_platformSurfaceTextures;
 };
 
-uint64_t GraphicsSurface::platformExport()
+PlatformBufferHandle GraphicsSurface::platformExport()
 {
     return m_platformSurface;
 }
@@ -110,7 +106,7 @@ PassRefPtr<GraphicsSurface> GraphicsSurface::platformCreate(const IntSize& size,
     return 0;
 }
 
-PassRefPtr<GraphicsSurface> GraphicsSurface::platformCreate(uint64_t platformSurfaceID)
+PassRefPtr<GraphicsSurface> GraphicsSurface::platformCreate(PlatformBufferHandle platformSurfaceID)
 {
     RefPtr<GraphicsSurface> surface = adoptRef(new GraphicsSurface(IntSize(), 0));
     surface->m_private = new GraphicsSurfacePrivate();
@@ -118,7 +114,7 @@ PassRefPtr<GraphicsSurface> GraphicsSurface::platformCreate(uint64_t platformSur
     return surface;
 }
 
-PassRefPtr<GraphicsSurface> GraphicsSurface::platformImport(const IntSize& size, Flags flags, uint64_t token, Flags canvasFlags)
+PassRefPtr<GraphicsSurface> GraphicsSurface::platformImport(const IntSize& size, Flags flags, PlatformBufferHandle token, Flags canvasFlags)
 {
     RefPtr<GraphicsSurface> surface = adoptRef(new GraphicsSurface(size, flags));
     surface->m_private = new GraphicsSurfacePrivate();
@@ -129,7 +125,7 @@ PassRefPtr<GraphicsSurface> GraphicsSurface::platformImport(const IntSize& size,
     return surface;
 }
 
-PassRefPtr<GraphicsSurface> GraphicsSurface::platformImport(const IntSize& size, Flags flags, uint64_t token)
+PassRefPtr<GraphicsSurface> GraphicsSurface::platformImport(const IntSize& size, Flags flags, PlatformBufferHandle token)
 {
     RefPtr<GraphicsSurface> surface = adoptRef(new GraphicsSurface(size, flags));
     surface->m_private = new GraphicsSurfacePrivate();
@@ -154,18 +150,18 @@ void GraphicsSurface::platformCopyFromFramebuffer(uint32_t originFbo, const IntR
 {
 }
 
-uint32_t GraphicsSurface::platformFrontBuffer() const
+PlatformBufferHandle GraphicsSurface::platformFrontBuffer() const
 {
     return m_private ? m_private->frontBuffer() : 0;
 }
 
-uint32_t GraphicsSurface::platformSwapBuffers()
+PlatformBufferHandle GraphicsSurface::platformSwapBuffers()
 {
     return 0;
 }
 
 #if ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-uint32_t GraphicsSurface::platformSwapBuffers(uint32_t frontBuffer)
+PlatformBufferHandle GraphicsSurface::platformSwapBuffers(PlatformBufferHandle frontBuffer)
 {
     m_private->swapBuffers(frontBuffer);
     return m_private->frontBuffer();
index b799d79..6ba852b 100755 (executable)
@@ -35,7 +35,7 @@ namespace WebCore {
 
 #if USE(GRAPHICS_SURFACE) || ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-void TextureMapperSurfaceBackingStore::setGraphicsSurface(uint64_t graphicsSurfaceToken, const IntSize& surfaceSize, uint32_t frontBuffer, int flags)
+void TextureMapperSurfaceBackingStore::setGraphicsSurface(PlatformBufferHandle graphicsSurfaceToken, const IntSize& surfaceSize, PlatformBufferHandle frontBuffer, int flags)
 #else
 void TextureMapperSurfaceBackingStore::setGraphicsSurface(uint64_t graphicsSurfaceToken, const IntSize& surfaceSize, uint32_t frontBuffer)
 #endif
index 81be291..b7640d0 100755 (executable)
@@ -55,8 +55,8 @@ class TextureMapperSurfaceBackingStore : public TextureMapperBackingStore {
 public:
     static PassRefPtr<TextureMapperSurfaceBackingStore> create() { return adoptRef(new TextureMapperSurfaceBackingStore); }
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-    void setGraphicsSurface(uint64_t graphicsSurfaceToken, const IntSize& surfaceSize, uint32_t frontBuffer, int flags = 0);
-    uint64_t graphicsSurfaceFrontBuffer() const { return m_graphicsSurface ? m_graphicsSurface->frontBuffer() : 0; }
+    void setGraphicsSurface(PlatformBufferHandle graphicsSurfaceToken, const IntSize& surfaceSize, PlatformBufferHandle frontBuffer, int flags = 0);
+    PlatformBufferHandle graphicsSurfaceFrontBuffer() const { return m_graphicsSurface ? m_graphicsSurface->frontBuffer() : 0; }
 #else
     void setGraphicsSurface(uint64_t graphicsSurfaceToken, const IntSize& surfaceSize, uint32_t frontBuffer);
 #endif
@@ -74,7 +74,7 @@ private:
        , m_graphicsSurfaceToken(0)
        { }
 
-    uint64_t m_graphicsSurfaceToken;
+    PlatformBufferHandle m_graphicsSurfaceToken;
     RefPtr<WebCore::GraphicsSurface> m_graphicsSurface;
     IntSize m_graphicsSurfaceSize;
 };
index 7047155..c8509c3 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef TextureMapperPlatformLayer_h
 #define TextureMapperPlatformLayer_h
 
+#include "GLDefs.h"
 #include "TransformationMatrix.h"
 
 namespace WebCore {
@@ -41,8 +42,8 @@ public:
     virtual void paintToTextureMapper(TextureMapper*, const FloatRect&, const TransformationMatrix& modelViewMatrix = TransformationMatrix(), float opacity = 1.0) = 0;
     virtual void swapBuffers() { }
 #if USE(GRAPHICS_SURFACE) || ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-    virtual uint32_t copyToGraphicsSurface() { return 0; }
-    virtual uint64_t graphicsSurfaceToken() const { return 0; }
+    virtual PlatformBufferHandle copyToGraphicsSurface() { return 0; }
+    virtual PlatformBufferHandle graphicsSurfaceToken() const { return 0; }
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
     virtual int graphicsSurfaceFlags() const { return 0; }
 #endif
index a595f0d..14b73ee 100755 (executable)
@@ -4,6 +4,7 @@ LIST(APPEND WebKit2StaticForDebug_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/platform/efl/tizen"
     "${WEBCORE_DIR}/platform/graphics/efl/tizen"
     "${WEBCORE_DIR}/platform/graphics/gstreamer"
+    "${WEBCORE_DIR}/platform/graphics/opengl"
     "${WEBCORE_DIR}/platform/graphics/surfaces"
     "${WEBCORE_DIR}/platform/graphics/texmap/tizen"
     "${WEBCORE_DIR}/platform/mediastream"
index 6cd7369..7567dc7 100644 (file)
@@ -55,14 +55,14 @@ public:
         static bool decode(CoreIPC::ArgumentDecoder*, Handle&);
 
 #if USE(GRAPHICS_SURFACE)
-        uint32_t graphicsSurfaceToken() const { return m_graphicsSurfaceToken; }
+        WebCore::PlatformBufferHandle graphicsSurfaceToken() const { return m_graphicsSurfaceToken; }
 #endif
 
     private:
         friend class ShareableSurface;
         mutable ShareableBitmap::Handle m_bitmapHandle;
 #if USE(GRAPHICS_SURFACE)
-        uint64_t m_graphicsSurfaceToken;
+        WebCore::PlatformBufferHandle m_graphicsSurfaceToken;
 #endif
         WebCore::IntSize m_size;
         ShareableBitmap::Flags m_flags;
index 4f7e705..b7e676a 100755 (executable)
@@ -132,9 +132,9 @@ void LayerTreeCoordinatorProxy::updateTileForLayer(int layerID, int tileID, cons
     if (!m_renderer->isUsingPlatformSurface()) {
 #endif
 #if USE(GRAPHICS_SURFACE)
-    int token = updateInfo.surfaceHandle.graphicsSurfaceToken();
+    WebCore::PlatformBufferHandle token = updateInfo.surfaceHandle.graphicsSurfaceToken();
     if (token) {
-        HashMap<uint32_t, RefPtr<ShareableSurface> >::iterator it = m_surfaces.find(token);
+        HashMap<WebCore::PlatformBufferHandle, RefPtr<ShareableSurface> >::iterator it = m_surfaces.find(token);
         if (it == m_surfaces.end()) {
             surface = ShareableSurface::create(updateInfo.surfaceHandle);
             m_surfaces.add(token, surface);
@@ -264,7 +264,7 @@ void LayerTreeCoordinatorProxy::didChangeScrollPosition(const IntPoint& position
 }
 
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-void LayerTreeCoordinatorProxy::syncCanvas(uint32_t id, const IntSize& canvasSize, uint64_t graphicsSurfaceToken, uint32_t frontBuffer, int flags)
+void LayerTreeCoordinatorProxy::syncCanvas(uint32_t id, const IntSize& canvasSize, WebCore::PlatformBufferHandle graphicsSurfaceToken, WebCore::PlatformBufferHandle frontBuffer, int flags)
 {
     dispatchUpdate(bind(&WebLayerTreeRenderer::syncCanvas, m_renderer.get(), id, canvasSize, graphicsSurfaceToken, frontBuffer, flags));
 }
index a38a789..cba6f73 100755 (executable)
@@ -28,6 +28,9 @@
 #include "Region.h"
 #include "SurfaceUpdateInfo.h"
 #include "WebLayerTreeInfo.h"
+#if ENABLE(TIZEN_WEBKIT2_TILED_AC)
+#include <WebCore/GLDefs.h>
+#endif
 #include <WebCore/GraphicsContext.h>
 #include <WebCore/GraphicsLayer.h>
 #include <WebCore/GraphicsLayerAnimation.h>
@@ -79,7 +82,7 @@ public:
     void renderNextFrame();
     void didChangeScrollPosition(const WebCore::IntPoint& position);
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-    void syncCanvas(uint32_t id, const WebCore::IntSize& canvasSize, uint64_t graphicsSurfaceToken, uint32_t frontBuffer, int flags);
+    void syncCanvas(uint32_t id, const WebCore::IntSize& canvasSize, WebCore::PlatformBufferHandle graphicsSurfaceToken, WebCore::PlatformBufferHandle frontBuffer, int flags);
 #else
     void syncCanvas(uint32_t id, const WebCore::IntSize& canvasSize, uint64_t graphicsSurfaceToken, uint32_t frontBuffer);
 #endif
@@ -110,7 +113,7 @@ protected:
     DrawingAreaProxy* m_drawingAreaProxy;
     RefPtr<WebLayerTreeRenderer> m_renderer;
 #if USE(GRAPHICS_SURFACE)
-    HashMap<uint32_t, RefPtr<ShareableSurface> > m_surfaces;
+    HashMap<WebCore::PlatformBufferHandle, RefPtr<ShareableSurface> > m_surfaces;
 #endif
 };
 
index cfc2264..7caa054 100644 (file)
@@ -36,7 +36,7 @@ messages -> LayerTreeCoordinatorProxy {
     SetLayerAnimations(uint32_t id, WebCore::GraphicsLayerAnimations animations)
     SetAnimationsLocked(bool locked)
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-    SyncCanvas(uint32_t id, WebCore::IntSize canvasSize, uint64_t graphicsSurfaceToken, uint32_t frontBuffer, int flags)
+    SyncCanvas(uint32_t id, WebCore::IntSize canvasSize, uint32_t graphicsSurfaceToken, uint32_t frontBuffer, int flags)
 #endif
 #if !ENABLE(TIZEN_WEBKIT2_TILED_AC)
     SyncCanvas(uint32_t id, WebCore::IntSize canvasSize, uint64_t graphicsSurfaceToken, uint32_t frontBuffer)
index 5583da4..111b0fe 100755 (executable)
@@ -438,7 +438,7 @@ void WebLayerTreeRenderer::didChangeScrollPosition(const IntPoint& position)
 }
 
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-void WebLayerTreeRenderer::syncCanvas(WebLayerID id, const WebCore::IntSize& canvasSize, uint64_t graphicsSurfaceToken, uint32_t frontBuffer, int flags)
+void WebLayerTreeRenderer::syncCanvas(WebLayerID id, const WebCore::IntSize& canvasSize, PlatformBufferHandle graphicsSurfaceToken, PlatformBufferHandle frontBuffer, int flags)
 #else
 void WebLayerTreeRenderer::syncCanvas(WebLayerID id, const WebCore::IntSize& canvasSize, uint64_t graphicsSurfaceToken, uint32_t frontBuffer)
 #endif
index 365b371..d83b895 100755 (executable)
@@ -95,7 +95,7 @@ public:
     void didChangeScrollPosition(const WebCore::IntPoint& position);
 
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-    TIZEN_VIRTUAL void syncCanvas(uint32_t id, const WebCore::IntSize& canvasSize, uint64_t graphicsSurfaceToken, uint32_t frontBuffer, int flags);
+    TIZEN_VIRTUAL void syncCanvas(uint32_t id, const WebCore::IntSize& canvasSize, WebCore::PlatformBufferHandle graphicsSurfaceToken, WebCore::PlatformBufferHandle frontBuffer, int flags);
 #else
     void syncCanvas(uint32_t id, const WebCore::IntSize& canvasSize, uint64_t graphicsSurfaceToken, uint32_t frontBuffer);
 #endif
index 4c8091a..258e6de 100644 (file)
@@ -67,7 +67,7 @@ void WebLayerTreeRendererTizen::purgeGLResources()
     callOnMainThread(bind(&WebLayerTreeRendererTizen::purgeBackingStores, this));
 }
 
-void WebLayerTreeRendererTizen::syncCanvas(WebLayerID id, const WebCore::IntSize& canvasSize, uint64_t graphicsSurfaceToken, uint32_t frontBuffer, int flags)
+void WebLayerTreeRendererTizen::syncCanvas(WebLayerID id, const WebCore::IntSize& canvasSize, WebCore::PlatformBufferHandle graphicsSurfaceToken, WebCore::PlatformBufferHandle frontBuffer, int flags)
 {
     if (canvasSize.isEmpty() || !m_textureMapper)
         return;
index 45c63ab..35d709b 100644 (file)
@@ -43,7 +43,7 @@ public:
     virtual void purgeGLResources();
 
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-    TIZEN_VIRTUAL void syncCanvas(uint32_t id, const WebCore::IntSize& canvasSize, uint64_t graphicsSurfaceToken, uint32_t frontBuffer, int flags);
+    TIZEN_VIRTUAL void syncCanvas(uint32_t id, const WebCore::IntSize& canvasSize, WebCore::PlatformBufferHandle graphicsSurfaceToken, WebCore::PlatformBufferHandle frontBuffer, int flags);
 #endif
 
     virtual void detach();
@@ -75,12 +75,12 @@ private:
     virtual void purgeBackingStores();
 
     struct FreePlatformSurfaceData {
-        unsigned int platformSurfaceId;
+        WebCore::PlatformBufferHandle platformSurfaceId;
         WebLayerID layerID;
     };
     Vector<FreePlatformSurfaceData> m_freePlatformSurfaces;
 
-    typedef HashMap<unsigned int, WebLayerID > PlatformLayerPlatformSurfaceMap;
+    typedef HashMap<WebCore::PlatformBufferHandle, WebLayerID > PlatformLayerPlatformSurfaceMap;
     PlatformLayerPlatformSurfaceMap m_platformLayerPlatformSurfaces;
 };
 
index 540d7f8..fd3caf9 100644 (file)
@@ -142,8 +142,8 @@ public:
     virtual bool swapPlatformSurfaces() { return true; }
     virtual void updateContentBuffers(const WebCore::IntRect&) { }
 #if USE(GRAPHICS_SURFACE) || ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-    virtual uint32_t copyToGraphicsSurface() { return 0; }
-    virtual uint64_t graphicsSurfaceToken() const { return 0; }
+    virtual WebCore::PlatformBufferHandle copyToGraphicsSurface() { return 0; }
+    virtual WebCore::PlatformBufferHandle graphicsSurfaceToken() const { return 0; }
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
     virtual int graphicsSurfaceFlags() const { return 0; }
 #endif
index e458236..4bee47a 100644 (file)
@@ -607,12 +607,12 @@ void PluginProxy::setPlatformSurfaceID(int platformSurfaceId)
 }
 
 #if USE(GRAPHICS_SURFACE) || ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-uint32_t PluginProxy::copyToGraphicsSurface()
+WebCore::PlatformBufferHandle PluginProxy::copyToGraphicsSurface()
 {
     return m_platformSurfaceId;
 }
 
-uint64_t PluginProxy::graphicsSurfaceToken() const
+WebCore::PlatformBufferHandle PluginProxy::graphicsSurfaceToken() const
 {
     return m_platformSurfaceId;
 }
index 621f673..809f390 100644 (file)
@@ -69,8 +69,8 @@ public:
     virtual void setPlatformSurfaceID(int);
     virtual void updateContentBuffers(const WebCore::IntRect&);
 #if USE(GRAPHICS_SURFACE) || ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-    virtual uint32_t copyToGraphicsSurface();
-    virtual uint64_t graphicsSurfaceToken() const;
+    virtual WebCore::PlatformBufferHandle copyToGraphicsSurface();
+    virtual WebCore::PlatformBufferHandle graphicsSurfaceToken() const;
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
     virtual int graphicsSurfaceFlags() const { return WebCore::GraphicsSurface::Is2D | WebCore::GraphicsSurface::Alpha; }
 #endif
index 954fd4d..95e7a37 100644 (file)
@@ -347,7 +347,7 @@ void LayerTreeCoordinator::syncLayerChildren(WebLayerID id, const Vector<WebLaye
 }
 
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-void LayerTreeCoordinator::syncCanvas(WebLayerID id, const IntSize& canvasSize, uint64_t graphicsSurfaceToken, uint32_t frontBuffer, int flags)
+void LayerTreeCoordinator::syncCanvas(WebLayerID id, const IntSize& canvasSize, WebCore::PlatformBufferHandle graphicsSurfaceToken, WebCore::PlatformBufferHandle frontBuffer, int flags)
 #else
 void LayerTreeCoordinator::syncCanvas(WebLayerID id, const IntSize& canvasSize, uint64_t graphicsSurfaceToken, uint32_t frontBuffer)
 #endif
index ce8de42..fd13da9 100644 (file)
@@ -87,7 +87,7 @@ public:
     virtual void syncLayerFilters(WebLayerID, const WebCore::FilterOperations&);
 #endif
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-    virtual void syncCanvas(WebLayerID, const WebCore::IntSize& canvasSize, uint64_t graphicsSurfaceToken, uint32_t frontBuffer, int flags) OVERRIDE;
+    virtual void syncCanvas(WebLayerID, const WebCore::IntSize& canvasSize, WebCore::PlatformBufferHandle graphicsSurfaceToken, WebCore::PlatformBufferHandle frontBuffer, int flags) OVERRIDE;
 #else
     virtual void syncCanvas(WebLayerID, const WebCore::IntSize& canvasSize, uint64_t graphicsSurfaceToken, uint32_t frontBuffer) OVERRIDE;
 #endif
index f5d1791..32b016e 100755 (executable)
@@ -18,9 +18,9 @@
  */
 
 #include "config.h"
+#include "WebGraphicsLayer.h"
 
 #if USE(UI_SIDE_COMPOSITING)
-#include "WebGraphicsLayer.h"
 
 #include "BackingStore.h"
 #include "FloatQuad.h"
@@ -607,10 +607,10 @@ void WebGraphicsLayer::syncCanvas()
         return;
 
 #if USE(GRAPHICS_SURFACE) || ENABLE(TIZEN_CANVAS_GRAPHICS_SURFACE)
-    uint64_t token = m_canvasPlatformLayer->graphicsSurfaceToken();
+    WebCore::PlatformBufferHandle token = m_canvasPlatformLayer->graphicsSurfaceToken();
     if (!token)
         return;
-    uint32_t frontBuffer = m_canvasPlatformLayer->copyToGraphicsSurface();
+    WebCore::PlatformBufferHandle frontBuffer = m_canvasPlatformLayer->copyToGraphicsSurface();
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
     int flags = m_canvasPlatformLayer->graphicsSurfaceFlags();
     if (m_webGraphicsLayerClient)
index 172529b..55b679e 100755 (executable)
@@ -44,6 +44,7 @@
 
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC_SHARED_PLATFORM_SURFACE)
 #include "efl/tizen/TiledBackingStoreRemoteTileTizen.h"
+#include <WebCore/GLDefs.h>
 #endif
 
 #if USE(UI_SIDE_COMPOSITING)
@@ -75,7 +76,7 @@ public:
 #endif
 #if PLATFORM(QT) || PLATFORM(EFL)
 #if ENABLE(TIZEN_WEBKIT2_TILED_AC)
-    virtual void syncCanvas(WebLayerID, const WebCore::IntSize& canvasSize, uint64_t graphicsSurfaceToken, uint32_t frontBuffer, int flags) = 0;
+    virtual void syncCanvas(WebLayerID, const WebCore::IntSize& canvasSize, WebCore::PlatformBufferHandle graphicsSurfaceToken, WebCore::PlatformBufferHandle frontBuffer, int flags) = 0;
 #else
     virtual void syncCanvas(WebLayerID, const WebCore::IntSize& canvasSize, uint64_t graphicsSurfaceToken, uint32_t frontBuffer) = 0;
 #endif