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 20 matching lines...) Expand all Loading... |
31 // spontaneously lost, returns null. | 31 // spontaneously lost, returns null. |
32 static std::unique_ptr<Extensions3DUtil> create(gpu::gles2::GLES2Interface*); | 32 static std::unique_ptr<Extensions3DUtil> create(gpu::gles2::GLES2Interface*); |
33 ~Extensions3DUtil(); | 33 ~Extensions3DUtil(); |
34 | 34 |
35 bool isValid() { return m_isValid; } | 35 bool isValid() { return m_isValid; } |
36 | 36 |
37 bool supportsExtension(const String& name); | 37 bool supportsExtension(const String& name); |
38 bool ensureExtensionEnabled(const String& name); | 38 bool ensureExtensionEnabled(const String& name); |
39 bool isExtensionEnabled(const String& name); | 39 bool isExtensionEnabled(const String& name); |
40 | 40 |
41 static bool canUseCopyTextureCHROMIUM(GLenum destTarget, | 41 bool canUseCopyTextureCHROMIUM(GLenum destTarget, |
42 GLenum destFormat, | 42 GLenum destFormat, |
43 GLenum destType, | 43 GLenum destType, |
44 GLint level); | 44 GLint level); |
45 | 45 |
46 private: | 46 private: |
47 Extensions3DUtil(gpu::gles2::GLES2Interface*); | 47 Extensions3DUtil(gpu::gles2::GLES2Interface*); |
48 void initializeExtensions(); | 48 void initializeExtensions(); |
49 | 49 |
50 gpu::gles2::GLES2Interface* m_gl; | 50 gpu::gles2::GLES2Interface* m_gl; |
51 HashSet<String> m_enabledExtensions; | 51 HashSet<String> m_enabledExtensions; |
52 HashSet<String> m_requestableExtensions; | 52 HashSet<String> m_requestableExtensions; |
53 bool m_isValid; | 53 bool m_isValid; |
54 }; | 54 }; |
55 | 55 |
56 } // namespace blink | 56 } // namespace blink |
57 | 57 |
58 #endif // Extensions3DUtil_h | 58 #endif // Extensions3DUtil_h |
OLD | NEW |