webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
MemoryBuffer.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2014 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 //
6 
7 #ifndef COMMON_MEMORYBUFFER_H_
8 #define COMMON_MEMORYBUFFER_H_
9 
10 #include "common/angleutils.h"
11 
12 #include <cstddef>
13 #include <stdint.h>
14 
15 namespace rx
16 {
17 
19 {
20  public:
21  MemoryBuffer();
22  ~MemoryBuffer();
23 
24  bool resize(size_t size);
25  size_t size() const;
26  bool empty() const { return mSize == 0; }
27 
28  const uint8_t *data() const;
29  uint8_t *data();
30 
31  private:
32  size_t mSize;
33  uint8_t *mData;
34 };
35 
36 }
37 
38 #endif // COMMON_MEMORYBUFFER_H_
EGLStreamKHR EGLint EGLint EGLint size
Definition: eglext.h:984
~MemoryBuffer()
Definition: MemoryBuffer.cpp:23
const uint8_t * data() const
Definition: MemoryBuffer.cpp:69
Definition: MemoryBuffer.h:18
bool empty() const
Definition: MemoryBuffer.h:26
Definition: mathutil.h:804
unsigned char uint8_t
Definition: ptypes.h:89
size_t size() const
Definition: MemoryBuffer.cpp:64
Definition: angleutils.h:26
bool resize(size_t size)
Definition: MemoryBuffer.cpp:29
MemoryBuffer()
Definition: MemoryBuffer.cpp:17