gfx/angle/src/libGLESv2/Buffer.h

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 //
     2 // Copyright (c) 2002-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 //
     7 // Buffer.h: Defines the gl::Buffer class, representing storage of vertex and/or
     8 // index data. Implements GL buffer objects and related functionality.
     9 // [OpenGL ES 2.0.24] section 2.9 page 21.
    11 #ifndef LIBGLESV2_BUFFER_H_
    12 #define LIBGLESV2_BUFFER_H_
    14 #include "common/angleutils.h"
    15 #include "common/RefCountObject.h"
    16 #include "libGLESv2/renderer/IndexRangeCache.h"
    18 namespace rx
    19 {
    20 class Renderer;
    21 class BufferStorage;
    22 class StaticIndexBufferInterface;
    23 class StaticVertexBufferInterface;
    24 };
    26 namespace gl
    27 {
    29 class Buffer : public RefCountObject
    30 {
    31   public:
    32     Buffer(rx::Renderer *renderer, GLuint id);
    34     virtual ~Buffer();
    36     void bufferData(const void *data, GLsizeiptr size, GLenum usage);
    37     void bufferSubData(const void *data, GLsizeiptr size, GLintptr offset);
    39     GLenum usage() const;
    41     rx::BufferStorage *getStorage() const;
    42     unsigned int size();
    44     rx::StaticVertexBufferInterface *getStaticVertexBuffer();
    45     rx::StaticIndexBufferInterface *getStaticIndexBuffer();
    46     void invalidateStaticData();
    47     void promoteStaticUsage(int dataSize);
    49     rx::IndexRangeCache *getIndexRangeCache();
    51   private:
    52     DISALLOW_COPY_AND_ASSIGN(Buffer);
    54     rx::Renderer *mRenderer;
    55     GLenum mUsage;
    57     rx::BufferStorage *mBufferStorage;
    59     rx::IndexRangeCache mIndexRangeCache;
    61     rx::StaticVertexBufferInterface *mStaticVertexBuffer;
    62     rx::StaticIndexBufferInterface *mStaticIndexBuffer;
    63     unsigned int mUnmodifiedDataUse;
    64 };
    66 }
    68 #endif   // LIBGLESV2_BUFFER_H_

mercurial