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 "third_party/khronos/GLES2/gl2.h" | 9 #include "third_party/khronos/GLES2/gl2.h" |
10 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 // Creates a new Extensions3DUtil. If the passed GLES2Interface has been spont
aneously lost, returns null. | 30 // Creates a new Extensions3DUtil. If the passed GLES2Interface has been spont
aneously lost, returns null. |
31 static std::unique_ptr<Extensions3DUtil> create(gpu::gles2::GLES2Interface*); | 31 static std::unique_ptr<Extensions3DUtil> create(gpu::gles2::GLES2Interface*); |
32 ~Extensions3DUtil(); | 32 ~Extensions3DUtil(); |
33 | 33 |
34 bool isValid() { return m_isValid; } | 34 bool isValid() { return m_isValid; } |
35 | 35 |
36 bool supportsExtension(const String& name); | 36 bool supportsExtension(const String& name); |
37 bool ensureExtensionEnabled(const String& name); | 37 bool ensureExtensionEnabled(const String& name); |
38 bool isExtensionEnabled(const String& name); | 38 bool isExtensionEnabled(const String& name); |
39 | 39 |
40 static bool canUseCopyTextureCHROMIUM(GLenum destTarget, | 40 bool canUseCopyTextureCHROMIUM(GLenum destTarget, |
41 GLenum destFormat, | 41 GLenum destFormat, |
42 GLenum destType, | 42 GLenum destType, |
43 GLint level); | 43 GLint level); |
44 | 44 |
45 private: | 45 private: |
46 Extensions3DUtil(gpu::gles2::GLES2Interface*); | 46 Extensions3DUtil(gpu::gles2::GLES2Interface*); |
47 void initializeExtensions(); | 47 void initializeExtensions(); |
48 | 48 |
49 gpu::gles2::GLES2Interface* m_gl; | 49 gpu::gles2::GLES2Interface* m_gl; |
50 HashSet<String> m_enabledExtensions; | 50 HashSet<String> m_enabledExtensions; |
51 HashSet<String> m_requestableExtensions; | 51 HashSet<String> m_requestableExtensions; |
52 bool m_isValid; | 52 bool m_isValid; |
53 }; | 53 }; |
54 | 54 |
55 } // namespace blink | 55 } // namespace blink |
56 | 56 |
57 #endif // Extensions3DUtil_h | 57 #endif // Extensions3DUtil_h |
OLD | NEW |