Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / gpu / command_buffer / common / mailbox_holder.h
blob51c377dba4c2e794cf54172d37f759de941f194d
1 // Copyright 2014 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_MAILBOX_HOLDER_H_
6 #define GPU_COMMAND_BUFFER_MAILBOX_HOLDER_H_
8 #include <stdint.h>
9 #include <string.h>
11 #include "gpu/command_buffer/common/mailbox.h"
12 #include "gpu/gpu_export.h"
14 namespace gpu {
16 // A MailboxHolder is a mechanism by which texture image data produced by one
17 // context can be consumed by another. The |sync_point| is used to allow one
18 // context to wait until another has finished using the texture before it begins
19 // using the texture. When the mailbox is backed by a GPU texture, the
20 // |texture_target| is that texture's type.
21 // See here for OpenGL texture types:
22 // https://www.opengl.org/wiki/Texture#Texture_Objects
23 struct GPU_EXPORT MailboxHolder {
24 MailboxHolder();
25 MailboxHolder(const gpu::Mailbox& mailbox,
26 uint32_t texture_target,
27 uint32_t sync_point);
28 gpu::Mailbox mailbox;
29 uint32_t texture_target;
30 uint32_t sync_point;
33 } // namespace gpu
35 #endif // GPU_COMMAND_BUFFER_MAILBOX_HOLDER_H_