Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / angle / src / libGLESv2 / Query.cpp
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.cpp: Implements the gl::Query class
8
9 #include "libGLESv2/Query.h"
10 #include "libGLESv2/renderer/QueryImpl.h"
11
12 namespace gl
13 {
14 Query::Query(rx::QueryImpl *impl, GLuint id)
15     : RefCountObject(id),
16       mQuery(impl)
17 {
18 }
19
20 Query::~Query()
21 {
22     SafeDelete(mQuery);
23 }
24
25 Error Query::begin()
26 {
27     return mQuery->begin();
28 }
29
30 Error Query::end()
31 {
32     return mQuery->end();
33 }
34
35 Error Query::getResult(GLuint *params)
36 {
37     return mQuery->getResult(params);
38 }
39
40 Error Query::isResultAvailable(GLuint *available)
41 {
42     return mQuery->isResultAvailable(available);
43 }
44
45 GLenum Query::getType() const
46 {
47     return mQuery->getType();
48 }
49
50 }