Commit 1cc115d3 authored by mrobinson@webkit.org's avatar mrobinson@webkit.org

Simplify the #ifdefs in GraphicsContext3D.h

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

Reviewed by Daniel Bates.

* platform/graphics/GraphicsContext3D.h:
(GraphicsContext3D): Combine #ifdefs paths that have a common
implementation. This reduces the #ifdef paths from many to just three.
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::platformTexture): Move the implementation
here to simplify the header.
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::platformTexture): Ditto.
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent bee0a95a
2013-05-03 Martin Robinson <mrobinson@igalia.com>
Simplify the #ifdefs in GraphicsContext3D.h
https://bugs.webkit.org/show_bug.cgi?id=115568
Reviewed by Daniel Bates.
* platform/graphics/GraphicsContext3D.h:
(GraphicsContext3D): Combine #ifdefs paths that have a common
implementation. This reduces the #ifdef paths from many to just three.
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::platformTexture): Move the implementation
here to simplify the header.
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::platformTexture): Ditto.
(WebCore):
2013-05-03 Brendan Long <b.long@cablelabs.com>
[Qt] Build with --video-track fails because String(AtomicString) is ambiguous
......
......@@ -1471,6 +1471,25 @@ unsigned GraphicsContext3D::getChannelBitsByFormat(GC3Denum format)
}
}
#if !PLATFORM(BLACKBERRY) && !PLATFORM(QT) && !PLATFORM(GTK) && !PLATFORM(EFL) && !PLATFORM(MAC)
PlatformGraphicsContext3D GraphicsContext3D::platformGraphicsContext3D() const
{
return NullPlatformGraphicsContext3D;
}
Platform3DObject GraphicsContext3D::platformTexture() const
{
return NullPlatform3DObject;
}
#if USE(ACCELERATED_COMPOSITING)
PlatformLayer* GraphicsContext3D::platformLayer() const
{
return 0;
}
#endif
#endif
} // namespace WebCore
#endif // USE(3D_GRAPHICS)
......@@ -488,37 +488,14 @@ public:
PlatformGraphicsContext3D platformGraphicsContext3D() const { return m_contextObj; }
Platform3DObject platformTexture() const { return m_compositorTexture; }
CALayer* platformLayer() const { return reinterpret_cast<CALayer*>(m_webGLLayer.get()); }
#elif PLATFORM(BLACKBERRY)
PlatformGraphicsContext3D platformGraphicsContext3D() const;
Platform3DObject platformTexture() const;
#if USE(ACCELERATED_COMPOSITING)
PlatformLayer* platformLayer() const;
#endif
#elif PLATFORM(QT)
#else
PlatformGraphicsContext3D platformGraphicsContext3D();
Platform3DObject platformTexture() const;
#if USE(ACCELERATED_COMPOSITING)
#if USE(ACCELERATED_COMPOSITING)
PlatformLayer* platformLayer() const;
#endif
#elif PLATFORM(GTK)
PlatformGraphicsContext3D platformGraphicsContext3D();
Platform3DObject platformTexture() const { return m_texture; }
#if USE(ACCELERATED_COMPOSITING)
PlatformLayer* platformLayer() const;
#endif
#elif PLATFORM(EFL)
PlatformGraphicsContext3D platformGraphicsContext3D();
Platform3DObject platformTexture() const { return m_texture; }
#if USE(ACCELERATED_COMPOSITING)
PlatformLayer* platformLayer() const;
#endif
#else
PlatformGraphicsContext3D platformGraphicsContext3D() const { return NullPlatformGraphicsContext3D; }
Platform3DObject platformTexture() const { return NullPlatform3DObject; }
#if USE(ACCELERATED_COMPOSITING)
PlatformLayer* platformLayer() const { return 0; }
#endif
#endif
bool makeContextCurrent();
#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL) || PLATFORM(BLACKBERRY)
......
......@@ -265,11 +265,17 @@ bool GraphicsContext3D::makeContextCurrent()
return false;
return m_private->makeContextCurrent();
}
PlatformGraphicsContext3D GraphicsContext3D::platformGraphicsContext3D()
{
return m_private->platformContext();
}
Platform3DObject GraphicsContext3D::platformTexture() const
{
return m_texture;
}
bool GraphicsContext3D::isGLES2Compliant() const
{
#if USE(OPENGL_ES_2)
......
......@@ -170,6 +170,11 @@ PlatformGraphicsContext3D GraphicsContext3D::platformGraphicsContext3D()
return m_private->platformGraphicsContext3D();
}
Platform3DObject GraphicsContext3D::platformTexture() const
{
return m_texture;
}
#if USE(ACCELERATED_COMPOSITING)
PlatformLayer* GraphicsContext3D::platformLayer() const
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment