Implement android_webview url intercepting.
[chromium-blink-merge.git] / cc / geometry_binding.h
blob0c36a15f208ee5c9bebe599772880900ce6b8ad4
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 GeometryBinding_h
6 #define GeometryBinding_h
8 #include "FloatRect.h"
10 namespace WebKit {
11 class WebGraphicsContext3D;
14 namespace cc {
16 class GeometryBinding {
17 public:
18 GeometryBinding(WebKit::WebGraphicsContext3D*, const FloatRect& quadVertexRect);
19 ~GeometryBinding();
21 bool initialized() const { return m_initialized; }
23 WebKit::WebGraphicsContext3D* context() const { return m_context; }
24 unsigned quadVerticesVbo() const { return m_quadVerticesVbo; }
25 unsigned quadElementsVbo() const { return m_quadElementsVbo; }
27 void prepareForDraw();
29 // All layer shaders share the same attribute locations for the vertex
30 // positions and texture coordinates. This allows switching shaders without
31 // rebinding attribute arrays.
32 static int positionAttribLocation() { return 0; }
33 static int texCoordAttribLocation() { return 1; }
35 private:
36 WebKit::WebGraphicsContext3D* m_context;
37 unsigned m_quadVerticesVbo;
38 unsigned m_quadElementsVbo;
39 bool m_initialized;
42 } // namespace cc
44 #endif