Commit 30b49f1f authored by kov@webkit.org's avatar kov@webkit.org

[GTK] Remove unsupported AC backends

https://bugs.webkit.org/show_bug.cgi?id=117362

Patch by Gustavo Noronha Silva <gustavo.noronha@collabora.com> on 2013-07-01
Reviewed by Martin Robinson.

.:

* Source/autotools/FindDependencies.m4: remove checks related to acceleration backend,
turn them into a check for OpenGL being available, simply.
* Source/autotools/ReadCommandLineArguments.m4: remove command line option to select
accelerated backend, it's now auto-detected.
* Source/autotools/SetupAutoconfHeader.m4: no longer defines USE_CLUTTER and
USE_TEXTURE_MAPPER_CAIRO.
* Source/autotools/SetupAutomake.m4: remove checks related to acceleration backend,
turn them into a check for OpenGL being available, simply.
* Source/autotools/Versions.m4: no longer check for clutter/clutter-gtk.

Source/WebCore:

* GNUmakefile.am:
* GNUmakefile.list.am:
* Source/WebCore/platform/graphics/PlatformLayer.h: Removed mentions of clutter
and the texmap cairo backend.
* platform/graphics/clutter/DrawingBufferClutter.cpp: Removed.
* platform/graphics/clutter/GraphicsContext3DClutter.cpp: Removed.
* platform/graphics/clutter/GraphicsContext3DPrivate.cpp: Removed.
* platform/graphics/clutter/GraphicsContext3DPrivate.h: Removed.
* platform/graphics/clutter/GraphicsLayerActor.cpp: Removed.
* platform/graphics/clutter/GraphicsLayerActor.h: Removed.
* platform/graphics/clutter/GraphicsLayerClutter.cpp: Removed.
* platform/graphics/clutter/GraphicsLayerClutter.h: Removed.
* platform/graphics/clutter/PlatformClutterAnimation.cpp: Removed.
* platform/graphics/clutter/PlatformClutterAnimation.h: Removed.
* platform/graphics/clutter/PlatformClutterLayerClient.h: Removed.
* platform/graphics/clutter/TransformationMatrixClutter.cpp: Removed.
* Source/WebCore/platform/graphics/transforms/TransformationMatrix.h: Removed cogl
matrix type conversion.

Source/WebKit/gtk:

* GNUmakefile.am:
* WebCoreSupport/AcceleratedCompositingContext.h: removed clutter and cairo
additions.
* WebCoreSupport/AcceleratedCompositingContextCairo.cpp: Removed.
* WebCoreSupport/AcceleratedCompositingContextClutter.cpp: Removed.
* webkit/webkitglobals.cpp:
(webkitInit): removed clutter-gtk initialization.

Tools:

* gtk/jhbuild-optional.modules: no longer needs clutter-gtk, clutter
and cogl, so removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e11f0b57
2013-07-01 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
[GTK] Remove unsupported AC backends
https://bugs.webkit.org/show_bug.cgi?id=117362
Reviewed by Martin Robinson.
* Source/autotools/FindDependencies.m4: remove checks related to acceleration backend,
turn them into a check for OpenGL being available, simply.
* Source/autotools/ReadCommandLineArguments.m4: remove command line option to select
accelerated backend, it's now auto-detected.
* Source/autotools/SetupAutoconfHeader.m4: no longer defines USE_CLUTTER and
USE_TEXTURE_MAPPER_CAIRO.
* Source/autotools/SetupAutomake.m4: remove checks related to acceleration backend,
turn them into a check for OpenGL being available, simply.
* Source/autotools/Versions.m4: no longer check for clutter/clutter-gtk.
2013-07-01 Timothy Hatcher <timothy@apple.com>
Link to WebInspectorUI.framework at build time instead of soft linking.
......
......@@ -39,6 +39,7 @@ platform_webcore_cppflags += \
-I$(srcdir)/Source/WebCore/platform/graphics/gstreamer \
-I$(srcdir)/Source/WebCore/platform/graphics/gtk \
-I$(srcdir)/Source/WebCore/platform/graphics/harfbuzz \
-I$(srcdir)/Source/WebCore/platform/graphics/opengl \
-I$(srcdir)/Source/WebCore/platform/graphics/texmap \
-I$(srcdir)/Source/WebCore/platform/graphics/transforms \
-I$(srcdir)/Source/WebCore/platform/gtk \
......
2013-07-01 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
[GTK] Remove unsupported AC backends
https://bugs.webkit.org/show_bug.cgi?id=117362
Reviewed by Martin Robinson.
* GNUmakefile.am:
* GNUmakefile.list.am:
* Source/WebCore/platform/graphics/PlatformLayer.h: Removed mentions of clutter
and the texmap cairo backend.
* platform/graphics/clutter/DrawingBufferClutter.cpp: Removed.
* platform/graphics/clutter/GraphicsContext3DClutter.cpp: Removed.
* platform/graphics/clutter/GraphicsContext3DPrivate.cpp: Removed.
* platform/graphics/clutter/GraphicsContext3DPrivate.h: Removed.
* platform/graphics/clutter/GraphicsLayerActor.cpp: Removed.
* platform/graphics/clutter/GraphicsLayerActor.h: Removed.
* platform/graphics/clutter/GraphicsLayerClutter.cpp: Removed.
* platform/graphics/clutter/GraphicsLayerClutter.h: Removed.
* platform/graphics/clutter/PlatformClutterAnimation.cpp: Removed.
* platform/graphics/clutter/PlatformClutterAnimation.h: Removed.
* platform/graphics/clutter/PlatformClutterLayerClient.h: Removed.
* platform/graphics/clutter/TransformationMatrixClutter.cpp: Removed.
* Source/WebCore/platform/graphics/transforms/TransformationMatrix.h: Removed cogl
matrix type conversion.
2013-07-01 Alex Christensen <achristensen@apple.com>
DrawingBuffer constructor and destructor were not defined for Windows.
......@@ -202,22 +202,11 @@ DerivedSources/WebCore/XLinkNames.h: DerivedSources/WebCore/XLinkNames.cpp
DerivedSources/WebCore/XLinkNames.cpp : $(WebCore)/dom/make_names.pl $(WebCore)/bindings/scripts/Hasher.pm $(WebCore)/bindings/scripts/StaticString.pm $(WebCore)/svg/xlinkattrs.in
$(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $< --attrs $(WebCore)/svg/xlinkattrs.in --outputDir "$(GENSOURCES_WEBCORE)"
if USE_TEXTURE_MAPPER_CAIRO
webcore_cppflags += \
-I$(srcdir)/Source/WebCore/platform/graphics/texmap
endif # END USE_TEXTURE_MAPPER_CAIRO
if USE_TEXTURE_MAPPER_GL
webcore_cppflags += \
-I$(srcdir)/Source/WebCore/platform/graphics/texmap
endif # END USETEXTURE_MAPPER_GL
if USE_CLUTTER
webcore_cppflags += \
-I$(srcdir)/Source/WebCore/platform/clutter \
-I$(srcdir)/Source/WebCore/platform/graphics/clutter
endif # END USE_CLUTTER
if ENABLE_INDEXED_DATABASE
webcore_cppflags += \
-DWTF_USE_LEVELDB=1 \
......@@ -490,7 +479,6 @@ libWebCore_la_CPPFLAGS = \
$(javascriptcore_cppflags) \
-fno-strict-aliasing \
$(CAIRO_CFLAGS) \
$(CLUTTER_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(ENCHANT_CFLAGS) \
$(FREETYPE_CFLAGS) \
......@@ -537,7 +525,6 @@ libWebCorePlatform_la_CPPFLAGS = \
$(javascriptcore_cppflags) \
-fno-strict-aliasing \
$(CAIRO_CFLAGS) \
$(CLUTTER_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(ENCHANT_CFLAGS) \
$(FREETYPE_CFLAGS) \
......@@ -585,7 +572,6 @@ libWebCoreGtk_la_CPPFLAGS = \
$(javascriptcore_cppflags) \
-fno-strict-aliasing \
$(CAIRO_CFLAGS) \
$(CLUTTER_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(ENCHANT_CFLAGS) \
$(FREETYPE_CFLAGS) \
......
......@@ -5654,11 +5654,15 @@ platform_sources += \
Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp \
Source/WebCore/platform/graphics/cairo/CairoUtilities.h \
Source/WebCore/platform/graphics/cairo/DrawErrorUnderline.h \
Source/WebCore/platform/graphics/cairo/DrawingBufferCairo.cpp \
Source/WebCore/platform/graphics/cairo/FloatRectCairo.cpp \
Source/WebCore/platform/graphics/cairo/FontCairo.cpp \
Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp \
Source/WebCore/platform/graphics/cairo/FontCustomPlatformData.h \
Source/WebCore/platform/graphics/cairo/GradientCairo.cpp \
Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp \
Source/WebCore/platform/graphics/cairo/GraphicsContext3DPrivate.cpp \
Source/WebCore/platform/graphics/cairo/GraphicsContext3DPrivate.h \
Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp \
Source/WebCore/platform/graphics/cairo/ImageBufferDataCairo.h \
Source/WebCore/platform/graphics/cairo/ImageCairo.cpp \
......@@ -6352,66 +6356,10 @@ platform_sources += \
Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.h
endif
if USE_CLUTTER
webcore_sources += \
Source/WebCore/platform/graphics/clutter/DrawingBufferClutter.cpp \
Source/WebCore/platform/graphics/clutter/GraphicsContext3DClutter.cpp \
Source/WebCore/platform/graphics/clutter/GraphicsContext3DPrivate.cpp \
Source/WebCore/platform/graphics/clutter/GraphicsContext3DPrivate.h
else
webcore_sources += \
Source/WebCore/platform/graphics/cairo/DrawingBufferCairo.cpp \
Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp \
Source/WebCore/platform/graphics/cairo/GraphicsContext3DPrivate.cpp \
Source/WebCore/platform/graphics/cairo/GraphicsContext3DPrivate.h
endif # END USE_CLUTTER
# ---
# Accelerated compositing support
# ---
if USE_ACCELERATED_COMPOSITING
if USE_CLUTTER
webcore_sources += \
Source/WebCore/platform/graphics/clutter/GraphicsLayerActor.cpp \
Source/WebCore/platform/graphics/clutter/GraphicsLayerActor.h \
Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp \
Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.h \
Source/WebCore/platform/graphics/clutter/PlatformClutterAnimation.cpp \
Source/WebCore/platform/graphics/clutter/PlatformClutterAnimation.h \
Source/WebCore/platform/graphics/clutter/TransformationMatrixClutter.cpp
endif # END USE_CLUTTER
if USE_TEXTURE_MAPPER_CAIRO
webcore_sources += \
Source/WebCore//platform/graphics/filters/texmap/CustomFilterValidatedProgramTextureMapper.cpp \
Source/WebCore//platform/graphics/filters/texmap/TextureMapperPlatformCompiledProgram.h \
Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp \
Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.h \
Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp \
Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h \
Source/WebCore/platform/graphics/GraphicsLayerTransform.cpp \
Source/WebCore/platform/graphics/GraphicsLayerTransform.h \
Source/WebCore/platform/graphics/GraphicsLayerAnimation.cpp \
Source/WebCore/platform/graphics/GraphicsLayerAnimation.h \
Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp \
Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.h \
Source/WebCore/platform/graphics/texmap/TextureMapper.cpp \
Source/WebCore/platform/graphics/texmap/TextureMapper.h \
Source/WebCore/platform/graphics/texmap/TextureMapperFPSCounter.cpp \
Source/WebCore/platform/graphics/texmap/TextureMapperFPSCounter.h \
Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp \
Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h \
Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp \
Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h \
Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayer.h \
Source/WebCore/platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp \
Source/WebCore/platform/graphics/texmap/TextureMapperSurfaceBackingStore.h \
Source/WebCore/platform/graphics/texmap/TextureMapperTile.cpp \
Source/WebCore/platform/graphics/texmap/TextureMapperTile.h \
Source/WebCore/platform/graphics/texmap/TextureMapperTiledBackingStore.cpp \
Source/WebCore/platform/graphics/texmap/TextureMapperTiledBackingStore.h
endif # END USE_TEXTURE_MAPPER_CAIRO
if USE_TEXTURE_MAPPER_GL
webcore_sources += \
Source/WebCore/platform/graphics/filters/texmap/CustomFilterValidatedProgramTextureMapper.cpp \
......
......@@ -39,16 +39,11 @@ class TextureMapperPlatformLayer;
typedef TextureMapperPlatformLayer PlatformLayer;
};
#elif PLATFORM(GTK)
#if USE(TEXTURE_MAPPER_CAIRO) || USE(TEXTURE_MAPPER_GL)
#if USE(TEXTURE_MAPPER_GL)
namespace WebCore {
class TextureMapperPlatformLayer;
typedef TextureMapperPlatformLayer PlatformLayer;
};
#elif USE(CLUTTER)
typedef struct _ClutterActor ClutterActor;
namespace WebCore {
typedef ClutterActor PlatformLayer;
};
#endif
#elif PLATFORM(EFL)
#if USE(TEXTURE_MAPPER)
......
/*
* Copyright (c) 2010, Google Inc. All rights reserved.
* Copyright (c) 2012, Collabora Ltd.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#if ENABLE(ACCELERATED_2D_CANVAS) || USE(3D_GRAPHICS)
#include "DrawingBuffer.h"
#include "Extensions3D.h"
namespace WebCore {
DrawingBuffer::DrawingBuffer(GraphicsContext3D* context,
const IntSize& size,
bool multisampleExtensionSupported,
bool packedDepthStencilExtensionSupported,
PreserveDrawingBuffer preserveDrawingBuffer,
AlphaRequirement alpha)
: m_preserveDrawingBuffer(preserveDrawingBuffer)
, m_alpha(alpha)
, m_frontColorBuffer(0)
, m_separateFrontTexture(false)
{
}
DrawingBuffer::~DrawingBuffer()
{
}
#if USE(ACCELERATED_COMPOSITING)
unsigned DrawingBuffer::frontColorBuffer() const
{
return colorBuffer();
}
void DrawingBuffer::paintCompositedResultsToCanvas(ImageBuffer*)
{
}
#endif
}
#endif
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
* Copyright (C) 2010 Google Inc. All rights reserved.
* Copyright (C) 2011 Igalia S.L.
* Copyright (C) 2012 Collabora Ltd.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "GraphicsContext3D.h"
#if USE(3D_GRAPHICS)
#include "Extensions3DOpenGL.h"
#include "GraphicsContext3DPrivate.h"
#include "NotImplemented.h"
#include <wtf/NotFound.h>
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
namespace WebCore {
PassRefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attributes, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle)
{
RefPtr<GraphicsContext3D> context = adoptRef(new GraphicsContext3D(attributes, hostWindow, renderStyle));
return context.release();
}
GraphicsContext3D::GraphicsContext3D(GraphicsContext3D::Attributes attributes, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle)
{
notImplemented();
}
GraphicsContext3D::~GraphicsContext3D()
{
notImplemented();
}
GraphicsContext3D::ImageExtractor::~ImageExtractor()
{
}
bool GraphicsContext3D::ImageExtractor::extractImage(bool premultiplyAlpha, bool ignoreGammaAndColorProfile)
{
notImplemented();
return false;
}
void GraphicsContext3D::paintToCanvas(const unsigned char* imagePixels, int imageWidth, int imageHeight, int canvasWidth, int canvasHeight, PlatformContextCairo* context)
{
notImplemented();
}
void GraphicsContext3D::setContextLostCallback(PassOwnPtr<ContextLostCallback>)
{
}
void GraphicsContext3D::setErrorMessageCallback(PassOwnPtr<ErrorMessageCallback>)
{
}
bool GraphicsContext3D::makeContextCurrent()
{
if (!m_private)
return false;
return m_private->makeContextCurrent();
}
PlatformGraphicsContext3D GraphicsContext3D::platformGraphicsContext3D()
{
return m_private->platformContext();
}
bool GraphicsContext3D::isGLES2Compliant() const
{
return false;
}
#if USE(ACCELERATED_COMPOSITING)
PlatformLayer* GraphicsContext3D::platformLayer() const
{
return m_private->platformLayer();
}
#endif
} // namespace WebCore
#endif // USE(3D_GRAPHICS)
/*
* Copyright (C) 2011, 2012 Igalia S.L.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#include "config.h"
#include "GraphicsContext3DPrivate.h"
#if USE(3D_GRAPHICS)
#include "HostWindow.h"
#include "NotImplemented.h"
#include "TransformationMatrix.h"
namespace WebCore {
PassOwnPtr<GraphicsContext3DPrivate> GraphicsContext3DPrivate::create(GraphicsContext3D* context, HostWindow* window)
{
return adoptPtr(new GraphicsContext3DPrivate(context, window));
}
GraphicsContext3DPrivate::GraphicsContext3DPrivate(GraphicsContext3D* context, HostWindow* window)
: m_context(context)
, m_window(window)
{
}
GraphicsContext3DPrivate::~GraphicsContext3DPrivate()
{
}
bool GraphicsContext3DPrivate::makeContextCurrent()
{
return false;
}
PlatformGraphicsContext3D GraphicsContext3DPrivate::platformContext()
{
return 0;
}
#if USE(ACCELERATED_COMPOSITING) && USE(CLUTTER)
void GraphicsContext3DPrivate::paintToGraphicsLayerActor(ClutterActor*, const FloatRect& target, const TransformationMatrix& matrix, float opacity)
{
}
#endif // USE(ACCELERATED_COMPOSITING)
} // namespace WebCore
#endif // USE(3D_GRAPHICS)
/*
* Copyright (C) 2011 Igalia S.L.
* Copyright (C) 2012 Collabora Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#ifndef GraphicsContext3DPrivate_h
#define GraphicsContext3DPrivate_h
#include "GraphicsContext3D.h"
#include <wtf/PassOwnPtr.h>
#if USE(ACCELERATED_COMPOSITING) && USE(CLUTTER)
#include <clutter/clutter.h>
#endif
namespace WebCore {
class TransformationMatrix;
class GraphicsContext3DPrivate {
public:
static PassOwnPtr<GraphicsContext3DPrivate> create(GraphicsContext3D*, HostWindow*);
~GraphicsContext3DPrivate();
bool makeContextCurrent();
PlatformGraphicsContext3D platformContext();
ClutterActor* platformLayer() { return m_layer; }
#if USE(ACCELERATED_COMPOSITING) && USE(CLUTTER)
virtual void paintToGraphicsLayerActor(ClutterActor*, const FloatRect& target, const TransformationMatrix&, float opacity);
#endif
private:
GraphicsContext3DPrivate(GraphicsContext3D*, HostWindow*);
GraphicsContext3D* m_context;
HostWindow* m_window;
ClutterActor* m_layer;
};
}
#endif // GraphicsContext3DPrivate_h
/*
* Copyright 2011, 2012 Collabora Limited
* Copyright (C) 2012 Intel Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
* version 2.1, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
* more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
#ifndef GraphicsLayerActor_h
#define GraphicsLayerActor_h
#if USE(ACCELERATED_COMPOSITING)
#include "GraphicsLayerClutter.h"
#include <clutter/clutter.h>
#include <cogl/cogl.h>
#include <glib-object.h>
G_BEGIN_DECLS
#define GRAPHICS_LAYER_TYPE_ACTOR graphics_layer_actor_get_type()
#define GRAPHICS_LAYER_ACTOR(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
GRAPHICS_LAYER_TYPE_ACTOR, GraphicsLayerActor))
#define GRAPHICS_LAYER_ACTOR_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), \
GRAPHICS_LAYER_TYPE_ACTOR, GraphicsLayerActorClass))
#define GRAPHICS_LAYER_IS_ACTOR(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), \
GRAPHICS_LAYER_TYPE_ACTOR))
#define GRAPHICS_LAYER_IS_ACTOR_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), \
GRAPHICS_LAYER_TYPE_ACTOR))
#define GRAPHICS_LAYER_ACTOR_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), \
GRAPHICS_LAYER_TYPE_ACTOR, GraphicsLayerActorClass))
typedef struct _GraphicsLayerActor GraphicsLayerActor;
typedef struct _GraphicsLayerActorClass GraphicsLayerActorClass;
typedef struct _GraphicsLayerActorPrivate GraphicsLayerActorPrivate;
/**
* GraphicsLayerActor:
*
* The contents of this structure are private and should only be accessed
* through the public API.
*/
struct _GraphicsLayerActor {
ClutterRectangle parent;
GraphicsLayerActorPrivate *priv;
};
struct _GraphicsLayerActorClass {
ClutterRectangleClass parent_class;
};
GType graphics_layer_actor_get_type(void) G_GNUC_CONST;
GraphicsLayerActor* graphicsLayerActorNewWithClient(WebCore::GraphicsLayerClutter::LayerType, WebCore::PlatformClutterLayerClient*);
WebCore::GraphicsLayerClutter::LayerType graphicsLayerActorGetLayerType(GraphicsLayerActor*);
void graphicsLayerActorSetLayerType(GraphicsLayerActor*, WebCore::GraphicsLayerClutter::LayerType);
WebCore::PlatformClutterLayerClient* graphicsLayerActorGetClient(GraphicsLayerActor*);
void graphicsLayerActorSetClient(GraphicsLayerActor*, WebCore::PlatformClutterLayerClient*);
void graphicsLayerActorInvalidateRectangle(GraphicsLayerActor*, const WebCore::FloatRect&);
void graphicsLayerActorSetScrollPosition(GraphicsLayerActor*, float, float);
void graphicsLayerActorSetTranslateX(GraphicsLayerActor*, float);
float graphicsLayerActorGetTranslateX(GraphicsLayerActor*);
void graphicsLayerActorSetTranslateY(GraphicsLayerActor*, float);
float graphicsLayerActorGetTranslateY(GraphicsLayerActor*);
void graphicsLayerActorRemoveFromSuperLayer(GraphicsLayerActor*);
void graphicsLayerActorSetAnchorPoint(GraphicsLayerActor*, float, float, float);
void graphicsLayerActorSetDrawsContent(GraphicsLayerActor*, bool drawsContent);
void graphicsLayerActorSetFlatten(GraphicsLayerActor*, bool flatten);
void graphicsLayerActorSetMasksToBounds(GraphicsLayerActor*, bool masksToBounds);
void graphicsLayerActorSetSublayers(GraphicsLayerActor*, WebCore::GraphicsLayerActorList&);
void graphicsLayerActorSetSurface(GraphicsLayerActor*, cairo_surface_t*);
WebCore::PlatformClutterAnimation* graphicsLayerActorGetAnimationForKey(GraphicsLayerActor*, const String);
G_END_DECLS
#endif // USE(ACCELERATED_COMPOSITING)
#endif /* GraphicsLayerActor_h */
/*
* Copyright (C) 2010 Apple Inc. All rights reserved.
* Copyright (C) 2013 Collabora Ltd.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef PlatformClutterAnimation_h
#define PlatformClutterAnimation_h
#if USE(ACCELERATED_COMPOSITING)
#include "Color.h"
#include "FilterOperation.h"
#include "FloatPoint3D.h"
#include "TransformationMatrix.h"
#include <glib-object.h>
#include <glib.h>
#include <wtf/RefCounted.h>
#include <wtf/RetainPtr.h>