Title: [149546] trunk/Source/WebCore
- Revision
- 149546
- Author
- [email protected]
- Date
- 2013-05-03 17:03:05 -0700 (Fri, 03 May 2013)
Log Message
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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (149545 => 149546)
--- trunk/Source/WebCore/ChangeLog 2013-05-03 23:50:02 UTC (rev 149545)
+++ trunk/Source/WebCore/ChangeLog 2013-05-04 00:03:05 UTC (rev 149546)
@@ -1,3 +1,20 @@
+2013-05-03 Martin Robinson <[email protected]>
+
+ 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 <[email protected]>
[Qt] Build with --video-track fails because String(AtomicString) is ambiguous
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3D.cpp (149545 => 149546)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext3D.cpp 2013-05-03 23:50:02 UTC (rev 149545)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3D.cpp 2013-05-04 00:03:05 UTC (rev 149546)
@@ -1471,6 +1471,25 @@
}
}
+#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)
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h (149545 => 149546)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h 2013-05-03 23:50:02 UTC (rev 149545)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h 2013-05-04 00:03:05 UTC (rev 149546)
@@ -488,37 +488,14 @@
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)
Modified: trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp (149545 => 149546)
--- trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp 2013-05-03 23:50:02 UTC (rev 149545)
+++ trunk/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp 2013-05-04 00:03:05 UTC (rev 149546)
@@ -265,11 +265,17 @@
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)
Modified: trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp (149545 => 149546)
--- trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp 2013-05-03 23:50:02 UTC (rev 149545)
+++ trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp 2013-05-04 00:03:05 UTC (rev 149546)
@@ -170,6 +170,11 @@
return m_private->platformGraphicsContext3D();
}
+Platform3DObject GraphicsContext3D::platformTexture() const
+{
+ return m_texture;
+}
+
#if USE(ACCELERATED_COMPOSITING)
PlatformLayer* GraphicsContext3D::platformLayer() const
{
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes