2
* Copyright (C) 2012 Igalia S.L.
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2 of the License, or (at your option) any later version.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library; if not, write to the Free
16
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
* Boston, MA 02110-1301 USA
23
#include "GraphicsContext3D.h"
25
#include <wtf/Noncopyable.h>
26
#include <wtf/PassOwnPtr.h>
29
typedef struct _XDisplay Display;
35
WTF_MAKE_NONCOPYABLE(GLContext);
37
static PassOwnPtr<GLContext> createContextForWindow(uint64_t windowHandle, GLContext* sharingContext);
38
static PassOwnPtr<GLContext> createOffscreenContext(GLContext* sharing = 0);
39
static GLContext* getCurrent();
40
static GLContext* sharingContext();
44
virtual bool makeContextCurrent();
45
virtual void swapBuffers() = 0;
46
virtual void waitNative() = 0;
47
virtual bool canRenderToDefaultFramebuffer() = 0;
48
virtual IntSize defaultFrameBufferSize() = 0;
51
static Display* sharedX11Display();
52
static void cleanupSharedX11Display();
55
static void addActiveContext(GLContext*);
56
static void removeActiveContext(GLContext*);
57
static void cleanupActiveContextsAtExit();
60
virtual PlatformGraphicsContext3D platformContext() = 0;
64
} // namespace WebCore