In iossim, ignore harmless messages from launchd.
[chromium-blink-merge.git] / cc / geometry_binding.h
blob6a8bfde541e06eed4d4984cfc151edf51a735d3d
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
3 // found in the LICENSE file.
5 #ifndef CC_GEOMETRY_BINDING_H_
6 #define CC_GEOMETRY_BINDING_H_
8 namespace gfx {
9 class RectF;
12 namespace WebKit {
13 class WebGraphicsContext3D;
16 namespace cc {
18 class GeometryBinding {
19 public:
20 GeometryBinding(WebKit::WebGraphicsContext3D*, const gfx::RectF& quadVertexRect);
21 ~GeometryBinding();
23 bool initialized() const { return m_initialized; }
25 WebKit::WebGraphicsContext3D* context() const { return m_context; }
26 unsigned quadVerticesVbo() const { return m_quadVerticesVbo; }
27 unsigned quadElementsVbo() const { return m_quadElementsVbo; }
28 unsigned quadListVerticesVbo() const { return m_quadListVerticesVbo; }
30 void prepareForDraw();
32 // All layer shaders share the same attribute locations for the vertex
33 // positions and texture coordinates. This allows switching shaders without
34 // rebinding attribute arrays.
35 static int positionAttribLocation() { return 0; }
36 static int texCoordAttribLocation() { return 1; }
37 static int triangleIndexAttribLocation() { return 2; }
39 private:
40 WebKit::WebGraphicsContext3D* m_context;
41 bool m_initialized;
43 unsigned m_quadVerticesVbo;
44 unsigned m_quadElementsVbo;
45 unsigned m_quadListVerticesVbo;
48 } // namespace cc
50 #endif // CC_GEOMETRY_BINDING_H_