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
12namespace gl
13{
14Query::Query(rx::QueryImpl *impl, GLuint id)
15    : RefCountObject(id),
16      mQuery(impl)
17{
18}
19
20Query::~Query()
21{
22    SafeDelete(mQuery);
23}
24
25Error Query::begin()
26{
27    return mQuery->begin();
28}
29
30Error Query::end()
31{
32    return mQuery->end();
33}
34
35Error Query::getResult(GLuint *params)
36{
37    return mQuery->getResult(params);
38}
39
40Error Query::isResultAvailable(GLuint *available)
41{
42    return mQuery->isResultAvailable(available);
43}
44
45GLenum Query::getType() const
46{
47    return mQuery->getType();
48}
49
50}
51