gfx/angle/src/libGLESv2/Query.cpp

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 #include "precompiled.h"
     2 //
     3 // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
     4 // Use of this source code is governed by a BSD-style license that can be
     5 // found in the LICENSE file.
     6 //
     8 // Query.cpp: Implements the gl::Query class
    10 #include "libGLESv2/Query.h"
    11 #include "libGLESv2/renderer/QueryImpl.h"
    12 #include "libGLESv2/renderer/Renderer.h"
    14 namespace gl
    15 {
    17 Query::Query(rx::Renderer *renderer, GLenum type, GLuint id) : RefCountObject(id)
    18 { 
    19     mQuery = renderer->createQuery(type);
    20 }
    22 Query::~Query()
    23 {
    24     delete mQuery;
    25 }
    27 void Query::begin()
    28 {
    29     mQuery->begin();
    30 }
    32 void Query::end()
    33 {
    34     mQuery->end();
    35 }
    37 GLuint Query::getResult()
    38 {
    39     return mQuery->getResult();
    40 }
    42 GLboolean Query::isResultAvailable()
    43 {
    44     return mQuery->isResultAvailable();
    45 }
    47 GLenum Query::getType() const
    48 {
    49     return mQuery->getType();
    50 }
    52 }

mercurial