OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright (C) 2010 Apple Inc. All rights reserved. | |
3 * Copyright (C) 2010 Google Inc. All rights reserved. | |
4 * Copyright (C) 2011 Igalia S.L. | |
5 * Copyright (C) 2012 Collabora Ltd. | |
6 * | |
7 * Redistribution and use in source and binary forms, with or without | |
8 * modification, are permitted provided that the following conditions | |
9 * are met: | |
10 * 1. Redistributions of source code must retain the above copyright | |
11 * notice, this list of conditions and the following disclaimer. | |
12 * 2. Redistributions in binary form must reproduce the above copyright | |
13 * notice, this list of conditions and the following disclaimer in the | |
14 * documentation and/or other materials provided with the distribution. | |
15 * | |
16 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY | |
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR | |
20 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | |
21 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | |
22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
23 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | |
24 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
27 */ | |
28 | |
29 #include "config.h" | |
30 #include "GraphicsContext3D.h" | |
31 | |
32 #if USE(3D_GRAPHICS) | |
33 | |
34 #include "Extensions3DOpenGL.h" | |
35 #include "GraphicsContext3DPrivate.h" | |
36 #include "NotImplemented.h" | |
37 #include <wtf/NotFound.h> | |
38 #include <wtf/OwnPtr.h> | |
39 #include <wtf/PassOwnPtr.h> | |
40 | |
41 namespace WebCore { | |
42 | |
43 PassRefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attri
butes attributes, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderS
tyle) | |
44 { | |
45 RefPtr<GraphicsContext3D> context = adoptRef(new GraphicsContext3D(attribute
s, hostWindow, renderStyle)); | |
46 return context.release(); | |
47 } | |
48 | |
49 GraphicsContext3D::GraphicsContext3D(GraphicsContext3D::Attributes attributes, H
ostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle) | |
50 { | |
51 notImplemented(); | |
52 } | |
53 | |
54 GraphicsContext3D::~GraphicsContext3D() | |
55 { | |
56 notImplemented(); | |
57 } | |
58 | |
59 GraphicsContext3D::ImageExtractor::~ImageExtractor() | |
60 { | |
61 } | |
62 | |
63 bool GraphicsContext3D::ImageExtractor::extractImage(bool premultiplyAlpha, bool
ignoreGammaAndColorProfile) | |
64 { | |
65 notImplemented(); | |
66 return false; | |
67 } | |
68 | |
69 void GraphicsContext3D::paintToCanvas(const unsigned char* imagePixels, int imag
eWidth, int imageHeight, int canvasWidth, int canvasHeight, PlatformContextCairo
* context) | |
70 { | |
71 notImplemented(); | |
72 } | |
73 | |
74 void GraphicsContext3D::setContextLostCallback(PassOwnPtr<ContextLostCallback>) | |
75 { | |
76 } | |
77 | |
78 void GraphicsContext3D::setErrorMessageCallback(PassOwnPtr<ErrorMessageCallback>
) | |
79 { | |
80 } | |
81 | |
82 bool GraphicsContext3D::makeContextCurrent() | |
83 { | |
84 if (!m_private) | |
85 return false; | |
86 return m_private->makeContextCurrent(); | |
87 } | |
88 PlatformGraphicsContext3D GraphicsContext3D::platformGraphicsContext3D() | |
89 { | |
90 return m_private->platformContext(); | |
91 } | |
92 | |
93 bool GraphicsContext3D::isGLES2Compliant() const | |
94 { | |
95 return false; | |
96 } | |
97 | |
98 #if USE(ACCELERATED_COMPOSITING) | |
99 PlatformLayer* GraphicsContext3D::platformLayer() const | |
100 { | |
101 return m_private->platformLayer(); | |
102 } | |
103 #endif | |
104 | |
105 } // namespace WebCore | |
106 | |
107 #endif // USE(3D_GRAPHICS) | |
OLD | NEW |