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

Side by Side Diff: cc/geometry_binding.h

Issue 11415161: Texture Draw Calls Coalescing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved { to line above Created 8 years 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/direct_renderer.cc ('k') | cc/geometry_binding.cc » ('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 CC_GEOMETRY_BINDING_H_ 5 #ifndef CC_GEOMETRY_BINDING_H_
6 #define CC_GEOMETRY_BINDING_H_ 6 #define CC_GEOMETRY_BINDING_H_
7 7
8 namespace gfx { 8 namespace gfx {
9 class RectF; 9 class RectF;
10 } 10 }
11 11
12 namespace WebKit { 12 namespace WebKit {
13 class WebGraphicsContext3D; 13 class WebGraphicsContext3D;
14 } 14 }
15 15
16 namespace cc { 16 namespace cc {
17 17
18 class GeometryBinding { 18 class GeometryBinding {
19 public: 19 public:
20 GeometryBinding(WebKit::WebGraphicsContext3D*, const gfx::RectF& quadVertexR ect); 20 GeometryBinding(WebKit::WebGraphicsContext3D*, const gfx::RectF& quadVertexR ect);
21 ~GeometryBinding(); 21 ~GeometryBinding();
22 22
23 bool initialized() const { return m_initialized; } 23 bool initialized() const { return m_initialized; }
24 24
25 WebKit::WebGraphicsContext3D* context() const { return m_context; } 25 WebKit::WebGraphicsContext3D* context() const { return m_context; }
26 unsigned quadVerticesVbo() const { return m_quadVerticesVbo; } 26 unsigned quadVerticesVbo() const { return m_quadVerticesVbo; }
27 unsigned quadElementsVbo() const { return m_quadElementsVbo; } 27 unsigned quadElementsVbo() const { return m_quadElementsVbo; }
28 unsigned quadListVerticesVbo() const { return m_quadListVerticesVbo; }
28 29
29 void prepareForDraw(); 30 void prepareForDraw();
30 31
31 // All layer shaders share the same attribute locations for the vertex 32 // All layer shaders share the same attribute locations for the vertex
32 // positions and texture coordinates. This allows switching shaders without 33 // positions and texture coordinates. This allows switching shaders without
33 // rebinding attribute arrays. 34 // rebinding attribute arrays.
34 static int positionAttribLocation() { return 0; } 35 static int positionAttribLocation() { return 0; }
35 static int texCoordAttribLocation() { return 1; } 36 static int texCoordAttribLocation() { return 1; }
37 static int triangleIndexAttribLocation() { return 2; }
36 38
37 private: 39 private:
38 WebKit::WebGraphicsContext3D* m_context; 40 WebKit::WebGraphicsContext3D* m_context;
41 bool m_initialized;
42
39 unsigned m_quadVerticesVbo; 43 unsigned m_quadVerticesVbo;
40 unsigned m_quadElementsVbo; 44 unsigned m_quadElementsVbo;
41 bool m_initialized; 45 unsigned m_quadListVerticesVbo;
42 }; 46 };
43 47
44 } // namespace cc 48 } // namespace cc
45 49
46 #endif // CC_GEOMETRY_BINDING_H_ 50 #endif // CC_GEOMETRY_BINDING_H_
51
OLDNEW
« no previous file with comments | « cc/direct_renderer.cc ('k') | cc/geometry_binding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698