OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef Extensions3DUtil_h | 5 #ifndef Extensions3DUtil_h |
6 #define Extensions3DUtil_h | 6 #define Extensions3DUtil_h |
7 | 7 |
8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 #include "platform/graphics/GraphicsTypes3D.h" | 9 #include "platform/graphics/GraphicsTypes3D.h" |
10 #include "third_party/khronos/GLES2/gl2.h" | 10 #include "third_party/khronos/GLES2/gl2.h" |
11 #include "third_party/khronos/GLES2/gl2ext.h" | 11 #include "third_party/khronos/GLES2/gl2ext.h" |
12 #include "wtf/HashSet.h" | 12 #include "wtf/HashSet.h" |
13 #include "wtf/text/WTFString.h" | 13 #include "wtf/text/WTFString.h" |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
| 16 |
16 class WebGraphicsContext3D; | 17 class WebGraphicsContext3D; |
17 } | |
18 | |
19 namespace blink { | |
20 | 18 |
21 class PLATFORM_EXPORT Extensions3DUtil { | 19 class PLATFORM_EXPORT Extensions3DUtil { |
22 public: | 20 public: |
23 // Creates a new Extensions3DUtil. If the passed WebGraphicsContext3D has be
en spontaneously lost, returns null. | 21 // Creates a new Extensions3DUtil. If the passed WebGraphicsContext3D has be
en spontaneously lost, returns null. |
24 static PassOwnPtr<Extensions3DUtil> create(blink::WebGraphicsContext3D*); | 22 static PassOwnPtr<Extensions3DUtil> create(WebGraphicsContext3D*); |
25 ~Extensions3DUtil(); | 23 ~Extensions3DUtil(); |
26 | 24 |
27 bool supportsExtension(const String& name); | 25 bool supportsExtension(const String& name); |
28 bool ensureExtensionEnabled(const String& name); | 26 bool ensureExtensionEnabled(const String& name); |
29 bool isExtensionEnabled(const String& name); | 27 bool isExtensionEnabled(const String& name); |
30 | 28 |
31 static bool canUseCopyTextureCHROMIUM(GLenum destFormat, GLenum destType, GL
int level); | 29 static bool canUseCopyTextureCHROMIUM(GLenum destFormat, GLenum destType, GL
int level); |
32 | 30 |
33 private: | 31 private: |
34 Extensions3DUtil(blink::WebGraphicsContext3D*); | 32 Extensions3DUtil(WebGraphicsContext3D*); |
35 bool initializeExtensions(); | 33 bool initializeExtensions(); |
36 | 34 |
37 blink::WebGraphicsContext3D* m_context; | 35 WebGraphicsContext3D* m_context; |
38 HashSet<String> m_enabledExtensions; | 36 HashSet<String> m_enabledExtensions; |
39 HashSet<String> m_requestableExtensions; | 37 HashSet<String> m_requestableExtensions; |
40 }; | 38 }; |
41 | 39 |
42 } // namespace blink | 40 } // namespace blink |
43 | 41 |
44 #endif // Extensions3DUtil_h | 42 #endif // Extensions3DUtil_h |
OLD | NEW |