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

Unified Diff: cc/ProgramBinding.h

Issue 11122003: [cc] Rename all cc/ filenames to Chromium style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/PlatformColor.h ('k') | cc/ProgramBinding.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/ProgramBinding.h
diff --git a/cc/ProgramBinding.h b/cc/ProgramBinding.h
index 9f0d0673c2a384156914d704b3cdaf0c07f25bc5..f44ed1831c90565909efa1add3bd1cdc0ac31a29 100644
--- a/cc/ProgramBinding.h
+++ b/cc/ProgramBinding.h
@@ -1,84 +1,6 @@
-// Copyright 2011 The Chromium Authors. All rights reserved.
+// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ProgramBinding_h
-#define ProgramBinding_h
-
-#if USE(ACCELERATED_COMPOSITING)
-
-#include <string>
-
-namespace WebKit {
-class WebGraphicsContext3D;
-}
-
-namespace cc {
-
-class ProgramBindingBase {
-public:
- ProgramBindingBase();
- ~ProgramBindingBase();
-
- void init(WebKit::WebGraphicsContext3D*, const std::string& vertexShader, const std::string& fragmentShader);
- void link(WebKit::WebGraphicsContext3D*);
- void cleanup(WebKit::WebGraphicsContext3D*);
-
- unsigned program() const { ASSERT(m_initialized); return m_program; }
- bool initialized() const { return m_initialized; }
-
-protected:
-
- unsigned loadShader(WebKit::WebGraphicsContext3D*, unsigned type, const std::string& shaderSource);
- unsigned createShaderProgram(WebKit::WebGraphicsContext3D*, unsigned vertexShader, unsigned fragmentShader);
- void cleanupShaders(WebKit::WebGraphicsContext3D*);
-
- unsigned m_program;
- unsigned m_vertexShaderId;
- unsigned m_fragmentShaderId;
- bool m_initialized;
-};
-
-template<class VertexShader, class FragmentShader>
-class ProgramBinding : public ProgramBindingBase {
-public:
- explicit ProgramBinding(WebKit::WebGraphicsContext3D* context)
- {
- ProgramBindingBase::init(context, m_vertexShader.getShaderString(), m_fragmentShader.getShaderString());
- }
-
- void initialize(WebKit::WebGraphicsContext3D* context, bool usingBindUniform)
- {
- ASSERT(context);
- ASSERT(m_program);
- ASSERT(!m_initialized);
-
- // Need to bind uniforms before linking
- if (!usingBindUniform)
- link(context);
-
- int baseUniformIndex = 0;
- m_vertexShader.init(context, m_program, usingBindUniform, &baseUniformIndex);
- m_fragmentShader.init(context, m_program, usingBindUniform, &baseUniformIndex);
-
- // Link after binding uniforms
- if (usingBindUniform)
- link(context);
-
- m_initialized = true;
- }
-
- const VertexShader& vertexShader() const { return m_vertexShader; }
- const FragmentShader& fragmentShader() const { return m_fragmentShader; }
-
-private:
-
- VertexShader m_vertexShader;
- FragmentShader m_fragmentShader;
-};
-
-} // namespace cc
-
-#endif // USE(ACCELERATED_COMPOSITING)
-
-#endif
+// Temporary forwarding header
+#include "cc/program_binding.h"
« no previous file with comments | « cc/PlatformColor.h ('k') | cc/ProgramBinding.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698