| 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 #include "modules/webgl/EXTsRGB.h" | 5 #include "modules/webgl/EXTsRGB.h" |
| 6 | 6 |
| 7 #include "modules/webgl/WebGLRenderingContextBase.h" | 7 #include "modules/webgl/WebGLRenderingContextBase.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| 11 EXTsRGB::EXTsRGB(WebGLRenderingContextBase* context) : WebGLExtension(context) { | 11 EXTsRGB::EXTsRGB(WebGLRenderingContextBase* context) : WebGLExtension(context) { |
| 12 context->extensionsUtil()->ensureExtensionEnabled("GL_EXT_sRGB"); | 12 context->extensionsUtil()->ensureExtensionEnabled("GL_EXT_sRGB"); |
| 13 } | 13 } |
| 14 | 14 |
| 15 EXTsRGB::~EXTsRGB() {} | |
| 16 | |
| 17 WebGLExtensionName EXTsRGB::name() const { | 15 WebGLExtensionName EXTsRGB::name() const { |
| 18 return EXTsRGBName; | 16 return EXTsRGBName; |
| 19 } | 17 } |
| 20 | 18 |
| 21 EXTsRGB* EXTsRGB::create(WebGLRenderingContextBase* context) { | 19 EXTsRGB* EXTsRGB::create(WebGLRenderingContextBase* context) { |
| 22 return new EXTsRGB(context); | 20 return new EXTsRGB(context); |
| 23 } | 21 } |
| 24 | 22 |
| 25 bool EXTsRGB::supported(WebGLRenderingContextBase* context) { | 23 bool EXTsRGB::supported(WebGLRenderingContextBase* context) { |
| 26 Extensions3DUtil* extensionsUtil = context->extensionsUtil(); | 24 Extensions3DUtil* extensionsUtil = context->extensionsUtil(); |
| 27 return extensionsUtil->supportsExtension("GL_EXT_sRGB"); | 25 return extensionsUtil->supportsExtension("GL_EXT_sRGB"); |
| 28 } | 26 } |
| 29 | 27 |
| 30 const char* EXTsRGB::extensionName() { | 28 const char* EXTsRGB::extensionName() { |
| 31 return "EXT_sRGB"; | 29 return "EXT_sRGB"; |
| 32 } | 30 } |
| 33 | 31 |
| 34 } // namespace blink | 32 } // namespace blink |
| OLD | NEW |