[GTK] [AC] Generalize WindowContextGL
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Mar 2012 21:08:08 +0000 (21:08 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Mar 2012 21:08:08 +0000 (21:08 +0000)
commit34ff2f0ba972519c3f2e6353c5379eb08702add7
tree9653842bfbe57188f1c72cf837beeb8d2596ba99
parent8b85a61d06c2c66d4c2d1a67d765cab814898e6f
[GTK] [AC] Generalize WindowContextGL
https://bugs.webkit.org/show_bug.cgi?id=78969

Reviewed by Gustavo Noronha Silva.

Source/WebCore:

No new tests. This should not change functionality.

* GNUmakefile.list.am: Added new files to source list.
* platform/graphics/cairo/GLContext.h: Added. An abstraction for all GL contexts.
* platform/graphics/glx/GLContextGLX.cpp: Added. This file is composed of very little
new code, as the logic for instantiating offscreen GL contexts is copied from
GraphicsContext3DPrivate. The code duplication will be removed in a followup patch.
(WebCore::GLContext::platformContext):
* platform/graphics/gtk/GLContextGtk.cpp: Added. This includes some helper factories
for creating and caching GL contexts for GTK+ widgets.

Source/WebKit/gtk:

Use GLContext instead of WindowContextGL. Remove a few unnecessary
namespace specifiers in the implementation of AcceleratedCompositingContext.

* WebCoreSupport/AcceleratedCompositingContext.h: Now we find the GLContext
of our widget, which is cached in WebCore. Remove m_initialized as it isn't needed.
(AcceleratedCompositingContext):
* WebCoreSupport/AcceleratedCompositingContextGL.cpp:
(WebKit::AcceleratedCompositingContext::AcceleratedCompositingContext): No longer initialize
m_initialized.
(WebKit::AcceleratedCompositingContext::glContext): Added.
(WebKit::AcceleratedCompositingContext::renderLayersToWindow): Use glContext() now.
(WebKit::AcceleratedCompositingContext::attachRootGraphicsLayer): Ditto.
(WebKit::AcceleratedCompositingContext::notifyAnimationStarted): Remove unnecessary namespace specifier.
(WebKit::AcceleratedCompositingContext::notifySyncRequired): Ditto.
(WebKit::AcceleratedCompositingContext::paintContents): Ditto.
(WebKit::AcceleratedCompositingContext::showDebugBorders): Ditto.
(WebKit::AcceleratedCompositingContext::showRepaintCounter): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/platform/graphics/cairo/GLContext.h [new file with mode: 0644]
Source/WebCore/platform/graphics/glx/GLContextGLX.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/gtk/GLContextGtk.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/gtk/WindowGLContext.h [deleted file]
Source/WebCore/platform/graphics/gtk/WindowGLContextGLX.cpp [deleted file]
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContext.h
Source/WebKit/gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp