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

Side by Side Diff: cc/ProgramBinding.h

Issue 10900021: Use std::string instead of WTF::String / TextStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | « cc/LayerChromium.cpp ('k') | cc/ProgramBinding.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 #ifndef ProgramBinding_h 5 #ifndef ProgramBinding_h
6 #define ProgramBinding_h 6 #define ProgramBinding_h
7 7
8 #if USE(ACCELERATED_COMPOSITING) 8 #if USE(ACCELERATED_COMPOSITING)
9 9
10 #include <wtf/text/WTFString.h> 10 #include <string>
11 11
12 namespace WebKit { 12 namespace WebKit {
13 class WebGraphicsContext3D; 13 class WebGraphicsContext3D;
14 } 14 }
15 15
16 namespace WebCore { 16 namespace WebCore {
17 17
18 class ProgramBindingBase { 18 class ProgramBindingBase {
19 public: 19 public:
20 ProgramBindingBase(); 20 ProgramBindingBase();
21 ~ProgramBindingBase(); 21 ~ProgramBindingBase();
22 22
23 void init(WebKit::WebGraphicsContext3D*, const String& vertexShader, const S tring& fragmentShader); 23 void init(WebKit::WebGraphicsContext3D*, const std::string& vertexShader, co nst std::string& fragmentShader);
24 void link(WebKit::WebGraphicsContext3D*); 24 void link(WebKit::WebGraphicsContext3D*);
25 void cleanup(WebKit::WebGraphicsContext3D*); 25 void cleanup(WebKit::WebGraphicsContext3D*);
26 26
27 unsigned program() const { ASSERT(m_initialized); return m_program; } 27 unsigned program() const { ASSERT(m_initialized); return m_program; }
28 bool initialized() const { return m_initialized; } 28 bool initialized() const { return m_initialized; }
29 29
30 protected: 30 protected:
31 31
32 unsigned loadShader(WebKit::WebGraphicsContext3D*, unsigned type, const Stri ng& shaderSource); 32 unsigned loadShader(WebKit::WebGraphicsContext3D*, unsigned type, const std: :string& shaderSource);
33 unsigned createShaderProgram(WebKit::WebGraphicsContext3D*, unsigned vertexS hader, unsigned fragmentShader); 33 unsigned createShaderProgram(WebKit::WebGraphicsContext3D*, unsigned vertexS hader, unsigned fragmentShader);
34 void cleanupShaders(WebKit::WebGraphicsContext3D*); 34 void cleanupShaders(WebKit::WebGraphicsContext3D*);
35 35
36 unsigned m_program; 36 unsigned m_program;
37 unsigned m_vertexShaderId; 37 unsigned m_vertexShaderId;
38 unsigned m_fragmentShaderId; 38 unsigned m_fragmentShaderId;
39 bool m_initialized; 39 bool m_initialized;
40 }; 40 };
41 41
42 template<class VertexShader, class FragmentShader> 42 template<class VertexShader, class FragmentShader>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 VertexShader m_vertexShader; 76 VertexShader m_vertexShader;
77 FragmentShader m_fragmentShader; 77 FragmentShader m_fragmentShader;
78 }; 78 };
79 79
80 } // namespace WebCore 80 } // namespace WebCore
81 81
82 #endif // USE(ACCELERATED_COMPOSITING) 82 #endif // USE(ACCELERATED_COMPOSITING)
83 83
84 #endif 84 #endif
OLDNEW
« no previous file with comments | « cc/LayerChromium.cpp ('k') | cc/ProgramBinding.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698