| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "cc/transferable_resource.h" | 6 #include "cc/transferable_resource.h" |
| 7 | 7 |
| 8 namespace cc { | 8 namespace cc { |
| 9 | 9 |
| 10 Mailbox::Mailbox() { | 10 Mailbox::Mailbox() { |
| 11 memset(name, 0, sizeof(name)); | 11 memset(name, 0, sizeof(name)); |
| 12 } | 12 } |
| 13 | 13 |
| 14 Mailbox::~Mailbox() { |
| 15 } |
| 16 |
| 14 bool Mailbox::isZero() const { | 17 bool Mailbox::isZero() const { |
| 15 for (int i = 0; i < arraysize(name); ++i) { | 18 for (int i = 0; i < arraysize(name); ++i) { |
| 16 if (name[i]) | 19 if (name[i]) |
| 17 return false; | 20 return false; |
| 18 } | 21 } |
| 19 return true; | 22 return true; |
| 20 } | 23 } |
| 21 | 24 |
| 22 void Mailbox::setName(const int8* n) { | 25 void Mailbox::setName(const int8* n) { |
| 23 DCHECK(isZero() || !memcmp(name, n, sizeof(name))); | 26 DCHECK(isZero() || !memcmp(name, n, sizeof(name))); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 34 } | 37 } |
| 35 | 38 |
| 36 TransferableResourceList::TransferableResourceList() | 39 TransferableResourceList::TransferableResourceList() |
| 37 : sync_point(0) { | 40 : sync_point(0) { |
| 38 } | 41 } |
| 39 | 42 |
| 40 TransferableResourceList::~TransferableResourceList() { | 43 TransferableResourceList::~TransferableResourceList() { |
| 41 } | 44 } |
| 42 | 45 |
| 43 } // namespace cc | 46 } // namespace cc |
| OLD | NEW |