shannon.woods@transgaming.com | bfbec45 | 2013-02-28 23:02:34 +0000 | [diff] [blame] | 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 | // QueryImpl.h: Defines the abstract rx::QueryImpl class. |
| 8 | |
Geoff Lang | 0a73dd8 | 2014-11-19 16:18:08 -0500 | [diff] [blame] | 9 | #ifndef LIBANGLE_RENDERER_QUERYIMPL_H_ |
| 10 | #define LIBANGLE_RENDERER_QUERYIMPL_H_ |
shannon.woods@transgaming.com | bfbec45 | 2013-02-28 23:02:34 +0000 | [diff] [blame] | 11 | |
Geoff Lang | 5aad967 | 2014-09-08 11:10:42 -0400 | [diff] [blame] | 12 | |
shannon.woods@transgaming.com | bfbec45 | 2013-02-28 23:02:34 +0000 | [diff] [blame] | 13 | #include "common/angleutils.h" |
Corentin Wallez | ad3ae90 | 2018-03-09 13:40:42 -0500 | [diff] [blame^] | 14 | #include "libANGLE/Error.h" |
| 15 | #include "libANGLE/PackedEnums.h" |
Geoff Lang | 0b7eef7 | 2014-06-12 14:10:47 -0400 | [diff] [blame] | 16 | |
shannon.woods@transgaming.com | bfbec45 | 2013-02-28 23:02:34 +0000 | [diff] [blame] | 17 | namespace rx |
| 18 | { |
| 19 | |
Jamie Madill | f0d10f8 | 2015-03-31 12:56:52 -0400 | [diff] [blame] | 20 | class QueryImpl : angle::NonCopyable |
shannon.woods@transgaming.com | bfbec45 | 2013-02-28 23:02:34 +0000 | [diff] [blame] | 21 | { |
| 22 | public: |
Corentin Wallez | ad3ae90 | 2018-03-09 13:40:42 -0500 | [diff] [blame^] | 23 | explicit QueryImpl(gl::QueryType type) { mType = type; } |
shannon.woods@transgaming.com | bfbec45 | 2013-02-28 23:02:34 +0000 | [diff] [blame] | 24 | virtual ~QueryImpl() { } |
| 25 | |
Geoff Lang | 5aad967 | 2014-09-08 11:10:42 -0400 | [diff] [blame] | 26 | virtual gl::Error begin() = 0; |
| 27 | virtual gl::Error end() = 0; |
Ian Ewell | 3ffd78b | 2016-01-22 16:09:42 -0500 | [diff] [blame] | 28 | virtual gl::Error queryCounter() = 0; |
| 29 | virtual gl::Error getResult(GLint *params) = 0; |
Geoff Lang | 5aad967 | 2014-09-08 11:10:42 -0400 | [diff] [blame] | 30 | virtual gl::Error getResult(GLuint *params) = 0; |
Ian Ewell | 3ffd78b | 2016-01-22 16:09:42 -0500 | [diff] [blame] | 31 | virtual gl::Error getResult(GLint64 *params) = 0; |
| 32 | virtual gl::Error getResult(GLuint64 *params) = 0; |
| 33 | virtual gl::Error isResultAvailable(bool *available) = 0; |
shannon.woods@transgaming.com | bfbec45 | 2013-02-28 23:02:34 +0000 | [diff] [blame] | 34 | |
Corentin Wallez | ad3ae90 | 2018-03-09 13:40:42 -0500 | [diff] [blame^] | 35 | gl::QueryType getType() const { return mType; } |
shannon.woods@transgaming.com | bfbec45 | 2013-02-28 23:02:34 +0000 | [diff] [blame] | 36 | |
| 37 | private: |
Corentin Wallez | ad3ae90 | 2018-03-09 13:40:42 -0500 | [diff] [blame^] | 38 | gl::QueryType mType; |
shannon.woods@transgaming.com | bfbec45 | 2013-02-28 23:02:34 +0000 | [diff] [blame] | 39 | }; |
| 40 | |
| 41 | } |
| 42 | |
Geoff Lang | 0a73dd8 | 2014-11-19 16:18:08 -0500 | [diff] [blame] | 43 | #endif // LIBANGLE_RENDERER_QUERYIMPL_H_ |