gfx/angle/src/libGLESv2/renderer/BufferStorage.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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 //
     7 // BufferStorage.h Defines the abstract BufferStorage class.
     9 #ifndef LIBGLESV2_RENDERER_BUFFERSTORAGE_H_
    10 #define LIBGLESV2_RENDERER_BUFFERSTORAGE_H_
    12 #include "common/angleutils.h"
    14 namespace rx
    15 {
    17 class BufferStorage
    18 {
    19   public:
    20     BufferStorage();
    21     virtual ~BufferStorage();
    23     // The data returned is only guaranteed valid until next non-const method.
    24     virtual void *getData() = 0;
    25     virtual void setData(const void* data, unsigned int size, unsigned int offset) = 0;
    26     virtual void clear() = 0;
    27     virtual unsigned int getSize() const = 0;
    28     virtual bool supportsDirectBinding() const = 0;
    29     virtual void markBufferUsage();
    30     unsigned int getSerial() const;
    32   protected:
    33     void updateSerial();
    35   private:
    36     DISALLOW_COPY_AND_ASSIGN(BufferStorage);
    38     unsigned int mSerial;
    39     static unsigned int mNextSerial;
    40 };
    42 }
    44 #endif // LIBGLESV2_RENDERER_BUFFERSTORAGE_H_

mercurial