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

Side by Side Diff: cc/program_binding.h

Issue 12314003: cc: Use highp precision for texture coordinates if available (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Use getShaderPrecisionFormat instead of GL_FRAGMENT_PRECISION_HIGH Created 7 years, 10 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
« no previous file with comments | « no previous file | cc/shader.h » ('j') | cc/shader.cc » ('J')
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 CC_PROGRAM_BINDING_H_ 5 #ifndef CC_PROGRAM_BINDING_H_
6 #define CC_PROGRAM_BINDING_H_ 6 #define CC_PROGRAM_BINDING_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 27 matching lines...) Expand all
38 unsigned m_vertexShaderId; 38 unsigned m_vertexShaderId;
39 unsigned m_fragmentShaderId; 39 unsigned m_fragmentShaderId;
40 bool m_initialized; 40 bool m_initialized;
41 }; 41 };
42 42
43 template<class VertexShader, class FragmentShader> 43 template<class VertexShader, class FragmentShader>
44 class ProgramBinding : public ProgramBindingBase { 44 class ProgramBinding : public ProgramBindingBase {
45 public: 45 public:
46 explicit ProgramBinding(WebKit::WebGraphicsContext3D* context) 46 explicit ProgramBinding(WebKit::WebGraphicsContext3D* context)
47 { 47 {
48 ProgramBindingBase::init(context, m_vertexShader.getShaderString(), m_fr agmentShader.getShaderString()); 48 ProgramBindingBase::init(context,
49 m_vertexShader.getShaderString(context),
50 m_fragmentShader.getShaderString(context));
49 } 51 }
50 52
51 void initialize(WebKit::WebGraphicsContext3D* context, bool usingBindUniform ) 53 void initialize(WebKit::WebGraphicsContext3D* context, bool usingBindUniform )
52 { 54 {
53 DCHECK(context); 55 DCHECK(context);
54 DCHECK(!m_initialized); 56 DCHECK(!m_initialized);
55 57
56 if (IsContextLost(context)) 58 if (IsContextLost(context))
57 return; 59 return;
58 60
(...skipping 17 matching lines...) Expand all
76 78
77 private: 79 private:
78 80
79 VertexShader m_vertexShader; 81 VertexShader m_vertexShader;
80 FragmentShader m_fragmentShader; 82 FragmentShader m_fragmentShader;
81 }; 83 };
82 84
83 } // namespace cc 85 } // namespace cc
84 86
85 #endif // CC_PROGRAM_BINDING_H_ 87 #endif // CC_PROGRAM_BINDING_H_
OLDNEW
« no previous file with comments | « no previous file | cc/shader.h » ('j') | cc/shader.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698