Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / angle / src / libGLESv2 / Query.h
1 //
2 // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6
7 // Query.h: Defines the gl::Query class
8
9 #ifndef LIBGLESV2_QUERY_H_
10 #define LIBGLESV2_QUERY_H_
11
12 #include "angle_gl.h"
13
14 #include "common/angleutils.h"
15 #include "common/RefCountObject.h"
16
17 namespace rx
18 {
19 class Renderer;
20 class QueryImpl;
21 }
22
23 namespace gl
24 {
25
26 class Query : public RefCountObject
27 {
28   public:
29     Query(rx::Renderer *renderer, GLenum type, GLuint id);
30     virtual ~Query();
31
32     void begin();
33     void end();
34
35     GLuint getResult();
36     GLboolean isResultAvailable();
37
38     GLenum getType() const;
39     bool isStarted() const;
40
41   private:
42     DISALLOW_COPY_AND_ASSIGN(Query);
43
44     rx::QueryImpl *mQuery;
45 };
46
47 }
48
49 #endif   // LIBGLESV2_QUERY_H_