1 //
2 // Copyright (c) 2013 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 // Query9.h: Defines the rx::Query9 class which implements rx::QueryImpl.
8 
9 #ifndef LIBANGLE_RENDERER_D3D_D3D9_QUERY9_H_
10 #define LIBANGLE_RENDERER_D3D_D3D9_QUERY9_H_
11 
12 #include "libANGLE/renderer/QueryImpl.h"
13 
14 namespace rx
15 {
16 class Renderer9;
17 
18 class Query9 : public QueryImpl
19 {
20   public:
21     Query9(Renderer9 *renderer, GLenum type);
22     ~Query9() override;
23 
24     gl::Error begin() override;
25     gl::Error end() override;
26     gl::Error queryCounter() override;
27     gl::Error getResult(GLint *params) override;
28     gl::Error getResult(GLuint *params) override;
29     gl::Error getResult(GLint64 *params) override;
30     gl::Error getResult(GLuint64 *params) override;
31     gl::Error isResultAvailable(bool *available) override;
32 
33   private:
34     gl::Error testQuery();
35 
36     template <typename T>
37     gl::Error getResultBase(T *params);
38 
39     GLuint64 mResult;
40     bool mQueryFinished;
41 
42     Renderer9 *mRenderer;
43     IDirect3DQuery9 *mQuery;
44 };
45 
46 }
47 
48 #endif // LIBANGLE_RENDERER_D3D_D3D9_QUERY9_H_
49