| 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 "platform/graphics/gpu/Extensions3DUtil.h" | 5 #include "platform/graphics/gpu/Extensions3DUtil.h" |
| 6 | 6 |
| 7 #include "gpu/command_buffer/client/gles2_interface.h" | 7 #include "gpu/command_buffer/client/gles2_interface.h" |
| 8 #include "wtf/PtrUtil.h" | 8 #include "wtf/PtrUtil.h" |
| 9 #include "wtf/text/CString.h" | 9 #include "wtf/text/CString.h" |
| 10 #include "wtf/text/StringHash.h" | 10 #include "wtf/text/StringHash.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 m_requestableExtensions.clear(); | 67 m_requestableExtensions.clear(); |
| 68 initializeExtensions(); | 68 initializeExtensions(); |
| 69 } | 69 } |
| 70 return m_enabledExtensions.contains(name); | 70 return m_enabledExtensions.contains(name); |
| 71 } | 71 } |
| 72 | 72 |
| 73 bool Extensions3DUtil::isExtensionEnabled(const String& name) { | 73 bool Extensions3DUtil::isExtensionEnabled(const String& name) { |
| 74 return m_enabledExtensions.contains(name); | 74 return m_enabledExtensions.contains(name); |
| 75 } | 75 } |
| 76 | 76 |
| 77 bool Extensions3DUtil::isExtensionRequestable(const String& name) { |
| 78 return m_requestableExtensions.contains(name); |
| 79 } |
| 80 |
| 77 bool Extensions3DUtil::canUseCopyTextureCHROMIUM(GLenum destTarget, | 81 bool Extensions3DUtil::canUseCopyTextureCHROMIUM(GLenum destTarget, |
| 78 GLenum destFormat, | 82 GLenum destFormat, |
| 79 GLenum destType, | 83 GLenum destType, |
| 80 GLint level) { | 84 GLint level) { |
| 81 // TODO(zmo): restriction of (RGB || RGBA)/UNSIGNED_BYTE/(Level 0) should be | 85 // TODO(zmo): restriction of (RGB || RGBA)/UNSIGNED_BYTE/(Level 0) should be |
| 82 // lifted when GLES2Interface::CopyTextureCHROMIUM(...) are fully functional. | 86 // lifted when GLES2Interface::CopyTextureCHROMIUM(...) are fully functional. |
| 83 if (destTarget == GL_TEXTURE_2D && | 87 if (destTarget == GL_TEXTURE_2D && |
| 84 (destFormat == GL_RGB || destFormat == GL_RGBA) && | 88 (destFormat == GL_RGB || destFormat == GL_RGBA) && |
| 85 destType == GL_UNSIGNED_BYTE && !level) | 89 destType == GL_UNSIGNED_BYTE && !level) |
| 86 return true; | 90 return true; |
| 87 return false; | 91 return false; |
| 88 } | 92 } |
| 89 | 93 |
| 90 } // namespace blink | 94 } // namespace blink |
| OLD | NEW |