gfx/angle/src/libGLESv2/Query.cpp

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     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