summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/common/buffer.h
blob: 730053a96d14327aece7fdf8abfc984dfe3e665c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef GPU_COMMAND_BUFFER_COMMON_BUFFER_H_
#define GPU_COMMAND_BUFFER_COMMON_BUFFER_H_

#include "../common/types.h"

namespace base {
  class SharedMemory;
}

namespace gpu {

// Address and size of a buffer and optionally a shared memory object. This
// type has value semantics.
struct Buffer {
  Buffer() : ptr(NULL), size(0), shared_memory(NULL) {
  }

  void* ptr;
  size_t size;

  // Null if the buffer is not shared memory or if it is not exposed as such.
  base::SharedMemory* shared_memory;
};

}  // namespace gpu

#endif  // GPU_COMMAND_BUFFER_COMMON_BUFFER_H_