| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef GPU_COMMAND_BUFFER_MAILBOX_H_ | 5 #ifndef GPU_COMMAND_BUFFER_MAILBOX_H_ |
| 6 #define GPU_COMMAND_BUFFER_MAILBOX_H_ | 6 #define GPU_COMMAND_BUFFER_MAILBOX_H_ |
| 7 | 7 |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 10 #include "gpu/command_buffer/common/types.h" | 12 #include "gpu/command_buffer/common/types.h" |
| 11 #include "gpu/gpu_export.h" | 13 #include "gpu/gpu_export.h" |
| 12 | 14 |
| 13 namespace gpu { | 15 namespace gpu { |
| 14 | 16 |
| 15 struct GPU_EXPORT Mailbox { | 17 struct GPU_EXPORT Mailbox { |
| 16 Mailbox(); | 18 Mailbox(); |
| 17 bool IsZero() const; | 19 bool IsZero() const; |
| 18 void SetZero(); | 20 void SetZero(); |
| 19 void SetName(const int8* name); | 21 void SetName(const int8* name); |
| 20 int8 name[64]; | 22 int8 name[64]; |
| 21 bool operator<(const Mailbox& other) const { | 23 bool operator<(const Mailbox& other) const { |
| 22 return memcmp(this, &other, sizeof other) < 0; | 24 return memcmp(this, &other, sizeof other) < 0; |
| 23 } | 25 } |
| 24 }; | 26 }; |
| 25 | 27 |
| 28 struct GPU_EXPORT MailboxHolder { |
| 29 typedef base::Callback<void(scoped_ptr<MailboxHolder>)> ReleaseCallback; |
| 30 |
| 31 MailboxHolder(); |
| 32 MailboxHolder(const gpu::Mailbox& mailbox, |
| 33 uint32 texture_target, |
| 34 uint32 sync_point); |
| 35 gpu::Mailbox mailbox; |
| 36 uint32 texture_target; |
| 37 uint32 sync_point; |
| 38 }; |
| 39 |
| 26 } // namespace gpu | 40 } // namespace gpu |
| 27 | 41 |
| 28 #endif // GPU_COMMAND_BUFFER_MAILBOX_H_ | 42 #endif // GPU_COMMAND_BUFFER_MAILBOX_H_ |
| 29 | 43 |
| OLD | NEW |