1 // 2 // Copyright 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 Context9; 17 class Renderer9; 18 19 class Query9 : public QueryImpl 20 { 21 public: 22 Query9(Renderer9 *renderer, gl::QueryType type); 23 ~Query9() override; 24 25 angle::Result begin(const gl::Context *context) override; 26 angle::Result end(const gl::Context *context) override; 27 angle::Result queryCounter(const gl::Context *context) override; 28 angle::Result getResult(const gl::Context *context, GLint *params) override; 29 angle::Result getResult(const gl::Context *context, GLuint *params) override; 30 angle::Result getResult(const gl::Context *context, GLint64 *params) override; 31 angle::Result getResult(const gl::Context *context, GLuint64 *params) override; 32 angle::Result isResultAvailable(const gl::Context *context, bool *available) override; 33 34 private: 35 angle::Result testQuery(Context9 *context9); 36 37 template <typename T> 38 angle::Result getResultBase(Context9 *context9, T *params); 39 40 unsigned int mGetDataAttemptCount; 41 GLuint64 mResult; 42 bool mQueryFinished; 43 44 Renderer9 *mRenderer; 45 IDirect3DQuery9 *mQuery; 46 }; 47 48 } // namespace rx 49 50 #endif // LIBANGLE_RENDERER_D3D_D3D9_QUERY9_H_ 51