| 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 #include "platform/graphics/gpu/Extensions3DUtil.h" | 6 #include "platform/graphics/gpu/Extensions3DUtil.h" |
| 7 | 7 |
| 8 #include "public/platform/WebGraphicsContext3D.h" | 8 #include "public/platform/WebGraphicsContext3D.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" |
| 11 | 11 |
| 12 namespace WebCore { | 12 namespace WebCore { |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 void splitStringHelper(const String& str, HashSet<String>& set) | 16 void splitStringHelper(const String& str, HashSet<String>& set) |
| 17 { | 17 { |
| 18 Vector<String> substrings; | 18 Vector<String> substrings; |
| 19 str.split(" ", substrings); | 19 str.split(' ', substrings); |
| 20 for (size_t i = 0; i < substrings.size(); ++i) | 20 for (size_t i = 0; i < substrings.size(); ++i) |
| 21 set.add(substrings[i]); | 21 set.add(substrings[i]); |
| 22 } | 22 } |
| 23 | 23 |
| 24 } // anonymous namespace | 24 } // anonymous namespace |
| 25 | 25 |
| 26 PassOwnPtr<Extensions3DUtil> Extensions3DUtil::create(blink::WebGraphicsContext3
D* context) | 26 PassOwnPtr<Extensions3DUtil> Extensions3DUtil::create(blink::WebGraphicsContext3
D* context) |
| 27 { | 27 { |
| 28 OwnPtr<Extensions3DUtil> out = adoptPtr(new Extensions3DUtil(context)); | 28 OwnPtr<Extensions3DUtil> out = adoptPtr(new Extensions3DUtil(context)); |
| 29 if (!out->initializeExtensions()) | 29 if (!out->initializeExtensions()) |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // FIXME: restriction of (RGB || RGBA)/UNSIGNED_BYTE/(Level 0) should be lif
ted when | 92 // FIXME: restriction of (RGB || RGBA)/UNSIGNED_BYTE/(Level 0) should be lif
ted when |
| 93 // WebGraphicsContext3D::copyTextureCHROMIUM(...) are fully functional. | 93 // WebGraphicsContext3D::copyTextureCHROMIUM(...) are fully functional. |
| 94 if ((destFormat == GL_RGB || destFormat == GL_RGBA) | 94 if ((destFormat == GL_RGB || destFormat == GL_RGBA) |
| 95 && destType == GL_UNSIGNED_BYTE | 95 && destType == GL_UNSIGNED_BYTE |
| 96 && !level) | 96 && !level) |
| 97 return true; | 97 return true; |
| 98 return false; | 98 return false; |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace WebCore | 101 } // namespace WebCore |
| OLD | NEW |