Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: Source/platform/graphics/gpu/Extensions3DUtil.cpp

Issue 359903002: Call WTFString::split(UChar, Vector&) when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update tests as well Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/platform/ContentType.cpp ('k') | Source/web/tests/ActivityLoggerTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « Source/platform/ContentType.cpp ('k') | Source/web/tests/ActivityLoggerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698