Don't consider a Bluetooth adapter present until it has an address.
[chromium-blink-merge.git] / cc / GeometryBinding.h
blobc018ff7c2412c0a72b29e4f87f5d2fa86fb958cf
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 #if USE(ACCELERATED_COMPOSITING)
12 namespace WebKit {
13 class WebGraphicsContext3D;
16 namespace WebCore {
18 class GeometryBinding {
19 public:
20 GeometryBinding(WebKit::WebGraphicsContext3D*, const FloatRect& 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; }
29 void prepareForDraw();
31 // All layer shaders share the same attribute locations for the vertex
32 // positions and texture coordinates. This allows switching shaders without
33 // rebinding attribute arrays.
34 static int positionAttribLocation() { return 0; }
35 static int texCoordAttribLocation() { return 1; }
37 private:
38 WebKit::WebGraphicsContext3D* m_context;
39 unsigned m_quadVerticesVbo;
40 unsigned m_quadElementsVbo;
41 bool m_initialized;
44 } // namespace WebCore
46 #endif // USE(ACCELERATED_COMPOSITING)
48 #endif