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