Commit 3b579e36 by Brandon Jones

Minor cleanup to Query constructor to normalize it with other interfaces

Change-Id: I562245cf6323edc7a127480e8de6ac16c6f97c03 Reviewed-on: https://chromium-review.googlesource.com/211641Tested-by: 's avatarBrandon Jones <bajones@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org>
parent 20ba154c
...@@ -815,7 +815,7 @@ Query *Context::getQuery(unsigned int handle, bool create, GLenum type) ...@@ -815,7 +815,7 @@ Query *Context::getQuery(unsigned int handle, bool create, GLenum type)
{ {
if (!query->second && create) if (!query->second && create)
{ {
query->second = new Query(mRenderer, type, handle); query->second = new Query(mRenderer->createQuery(type), handle);
query->second->addRef(); query->second->addRef();
} }
return query->second; return query->second;
......
...@@ -9,14 +9,14 @@ ...@@ -9,14 +9,14 @@
#include "libGLESv2/Query.h" #include "libGLESv2/Query.h"
#include "libGLESv2/renderer/QueryImpl.h" #include "libGLESv2/renderer/QueryImpl.h"
#include "libGLESv2/renderer/Renderer.h"
namespace gl namespace gl
{ {
Query::Query(rx::Renderer *renderer, GLenum type, GLuint id) : RefCountObject(id) Query::Query(rx::QueryImpl *impl, GLuint id)
{ : RefCountObject(id),
mQuery = renderer->createQuery(type); mQuery(impl)
{
} }
Query::~Query() Query::~Query()
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
namespace rx namespace rx
{ {
class Renderer;
class QueryImpl; class QueryImpl;
} }
...@@ -26,7 +25,7 @@ namespace gl ...@@ -26,7 +25,7 @@ namespace gl
class Query : public RefCountObject class Query : public RefCountObject
{ {
public: public:
Query(rx::Renderer *renderer, GLenum type, GLuint id); Query(rx::QueryImpl *impl, GLuint id);
virtual ~Query(); virtual ~Query();
void begin(); void begin();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment