| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SKY_ENGINE_PLATFORM_GRAPHICS_GPU_EXTENSIONS3DUTIL_H_ | |
| 6 #define SKY_ENGINE_PLATFORM_GRAPHICS_GPU_EXTENSIONS3DUTIL_H_ | |
| 7 | |
| 8 #include "sky/engine/platform/PlatformExport.h" | |
| 9 #include "sky/engine/platform/graphics/GraphicsTypes3D.h" | |
| 10 #include "sky/engine/wtf/HashSet.h" | |
| 11 #include "sky/engine/wtf/text/WTFString.h" | |
| 12 #include "third_party/khronos/GLES2/gl2.h" | |
| 13 #include "third_party/khronos/GLES2/gl2ext.h" | |
| 14 | |
| 15 namespace blink { | |
| 16 | |
| 17 class WebGraphicsContext3D; | |
| 18 | |
| 19 class PLATFORM_EXPORT Extensions3DUtil { | |
| 20 public: | |
| 21 // Creates a new Extensions3DUtil. If the passed WebGraphicsContext3D has be
en spontaneously lost, returns null. | |
| 22 static PassOwnPtr<Extensions3DUtil> create(WebGraphicsContext3D*); | |
| 23 ~Extensions3DUtil(); | |
| 24 | |
| 25 bool supportsExtension(const String& name); | |
| 26 bool ensureExtensionEnabled(const String& name); | |
| 27 bool isExtensionEnabled(const String& name); | |
| 28 | |
| 29 static bool canUseCopyTextureCHROMIUM(GLenum destFormat, GLenum destType, GL
int level); | |
| 30 | |
| 31 private: | |
| 32 Extensions3DUtil(WebGraphicsContext3D*); | |
| 33 bool initializeExtensions(); | |
| 34 | |
| 35 WebGraphicsContext3D* m_context; | |
| 36 HashSet<String> m_enabledExtensions; | |
| 37 HashSet<String> m_requestableExtensions; | |
| 38 }; | |
| 39 | |
| 40 } // namespace blink | |
| 41 | |
| 42 #endif // SKY_ENGINE_PLATFORM_GRAPHICS_GPU_EXTENSIONS3DUTIL_H_ | |
| OLD | NEW |