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 #include "gpu/command_buffer/common/mailbox.h" | 5 #include "gpu/command_buffer/common/mailbox.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 void Mailbox::SetZero() { | 25 void Mailbox::SetZero() { |
26 memset(name, 0, sizeof(name)); | 26 memset(name, 0, sizeof(name)); |
27 } | 27 } |
28 | 28 |
29 void Mailbox::SetName(const int8* n) { | 29 void Mailbox::SetName(const int8* n) { |
30 DCHECK(IsZero() || !memcmp(name, n, sizeof(name))); | 30 DCHECK(IsZero() || !memcmp(name, n, sizeof(name))); |
31 memcpy(name, n, sizeof(name)); | 31 memcpy(name, n, sizeof(name)); |
32 } | 32 } |
33 | 33 |
| 34 MailboxHolder::MailboxHolder() : texture_target(0), sync_point(0) {} |
| 35 |
| 36 MailboxHolder::MailboxHolder(const Mailbox& mailbox, |
| 37 uint32 texture_target, |
| 38 uint32 sync_point) |
| 39 : mailbox(mailbox), |
| 40 texture_target(texture_target), |
| 41 sync_point(sync_point) {} |
| 42 |
34 } // namespace gpu | 43 } // namespace gpu |
OLD | NEW |