Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Motorola Mobility LLC. All rights reserved. | 2 * Copyright (C) 2013 Motorola Mobility LLC. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 | 27 |
| 28 #include "core/html/canvas/OESTextureHalfFloat.h" | 28 #include "core/html/canvas/OESTextureHalfFloat.h" |
| 29 #include "core/platform/graphics/Extensions3D.h" | 29 #include "core/platform/graphics/Extensions3D.h" |
| 30 | 30 |
| 31 namespace WebCore { | 31 namespace WebCore { |
| 32 | 32 |
| 33 OESTextureHalfFloat::OESTextureHalfFloat(WebGLRenderingContext* context) | 33 OESTextureHalfFloat::OESTextureHalfFloat(WebGLRenderingContext* context) |
| 34 : WebGLExtension(context) | 34 : WebGLExtension(context) |
| 35 { | 35 { |
| 36 ScriptWrappable::init(this); | 36 ScriptWrappable::init(this); |
|
Ken Russell (switch to Gerrit)
2013/06/05 00:46:38
Missing call to enable()?
| |
| 37 context->graphicsContext3D()->getExtensions()->ensureEnabled("GL_OES_texture _half_float"); | |
| 38 } | 37 } |
| 39 | 38 |
| 40 OESTextureHalfFloat::~OESTextureHalfFloat() | 39 OESTextureHalfFloat::~OESTextureHalfFloat() |
| 41 { | 40 { |
| 42 } | 41 } |
| 43 | 42 |
| 43 void OESTextureHalfFloat::enable() | |
| 44 { | |
| 45 m_context->graphicsContext3D()->getExtensions()->ensureEnabled("GL_OES_textu re_half_float"); | |
| 46 } | |
| 47 | |
| 44 WebGLExtension::ExtensionName OESTextureHalfFloat::getName() const | 48 WebGLExtension::ExtensionName OESTextureHalfFloat::getName() const |
| 45 { | 49 { |
| 46 return OESTextureHalfFloatName; | 50 return OESTextureHalfFloatName; |
| 47 } | 51 } |
| 48 | 52 |
| 49 PassOwnPtr<OESTextureHalfFloat> OESTextureHalfFloat::create(WebGLRenderingContex t* context) | 53 PassOwnPtr<OESTextureHalfFloat> OESTextureHalfFloat::create(WebGLRenderingContex t* context) |
| 50 { | 54 { |
| 51 return adoptPtr(new OESTextureHalfFloat(context)); | 55 return adoptPtr(new OESTextureHalfFloat(context)); |
| 52 } | 56 } |
| 53 | 57 |
| 54 bool OESTextureHalfFloat::supported(WebGLRenderingContext* context) | 58 bool OESTextureHalfFloat::supported(WebGLRenderingContext* context) |
| 55 { | 59 { |
| 56 Extensions3D* extensions = context->graphicsContext3D()->getExtensions(); | 60 Extensions3D* extensions = context->graphicsContext3D()->getExtensions(); |
| 57 return extensions->supports("GL_OES_texture_half_float"); | 61 return extensions->supports("GL_OES_texture_half_float"); |
| 58 } | 62 } |
| 59 | 63 |
| 60 const char* OESTextureHalfFloat::getExtensionName() | 64 const char* OESTextureHalfFloat::getExtensionName() |
| 61 { | 65 { |
| 62 return "OES_texture_half_float"; | 66 return "OES_texture_half_float"; |
| 63 } | 67 } |
| 64 | 68 |
| 65 } // namespace WebCore | 69 } // namespace WebCore |
| OLD | NEW |