| 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 class WebGraphicsContext3D; | 16 class WebGraphicsContext3D; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace WebCore { | 19 namespace WebCore { |
| 20 | 20 |
| 21 class PLATFORM_EXPORT Extensions3DUtil { | 21 class PLATFORM_EXPORT Extensions3DUtil { |
| 22 public: | 22 public: |
| 23 Extensions3DUtil(blink::WebGraphicsContext3D*); | 23 // Creates a new Extensions3DUtil. If the passed WebGraphicsContext3D has be
en spontaneously lost, returns null. |
| 24 static PassOwnPtr<Extensions3DUtil> create(blink::WebGraphicsContext3D*); |
| 24 ~Extensions3DUtil(); | 25 ~Extensions3DUtil(); |
| 25 | 26 |
| 26 bool supportsExtension(const String& name); | 27 bool supportsExtension(const String& name); |
| 27 bool ensureExtensionEnabled(const String& name); | 28 bool ensureExtensionEnabled(const String& name); |
| 28 bool isExtensionEnabled(const String& name); | 29 bool isExtensionEnabled(const String& name); |
| 29 | 30 |
| 30 static bool canUseCopyTextureCHROMIUM(GLenum destFormat, GLenum destType, GL
int level); | 31 static bool canUseCopyTextureCHROMIUM(GLenum destFormat, GLenum destType, GL
int level); |
| 31 | 32 |
| 32 private: | 33 private: |
| 33 void initializeExtensions(); | 34 Extensions3DUtil(blink::WebGraphicsContext3D*); |
| 35 bool initializeExtensions(); |
| 34 | 36 |
| 35 blink::WebGraphicsContext3D* m_context; | 37 blink::WebGraphicsContext3D* m_context; |
| 36 HashSet<String> m_enabledExtensions; | 38 HashSet<String> m_enabledExtensions; |
| 37 HashSet<String> m_requestableExtensions; | 39 HashSet<String> m_requestableExtensions; |
| 38 }; | 40 }; |
| 39 | 41 |
| 40 } // namespace WebCore | 42 } // namespace WebCore |
| 41 | 43 |
| 42 #endif // Extensions3DUtil_h | 44 #endif // Extensions3DUtil_h |
| OLD | NEW |