Telemetry: adding memory tests & solving problems on the go.
[chromium-blink-merge.git] / gpu / command_buffer / common / buffer.h
blob730053a96d14327aece7fdf8abfc984dfe3e665c
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef GPU_COMMAND_BUFFER_COMMON_BUFFER_H_
6 #define GPU_COMMAND_BUFFER_COMMON_BUFFER_H_
8 #include "../common/types.h"
10 namespace base {
11 class SharedMemory;
14 namespace gpu {
16 // Address and size of a buffer and optionally a shared memory object. This
17 // type has value semantics.
18 struct Buffer {
19 Buffer() : ptr(NULL), size(0), shared_memory(NULL) {
22 void* ptr;
23 size_t size;
25 // Null if the buffer is not shared memory or if it is not exposed as such.
26 base::SharedMemory* shared_memory;
29 } // namespace gpu
31 #endif // GPU_COMMAND_BUFFER_COMMON_BUFFER_H_