OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "gpu/command_buffer/service/mailbox_manager.h" | 5 #include "gpu/command_buffer/service/mailbox_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "crypto/random.h" | 9 #include "crypto/random.h" |
10 #include "gpu/command_buffer/service/mailbox_synchronizer.h" | 10 #include "gpu/command_buffer/service/mailbox_synchronizer.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 size_t count = mailbox_to_textures_.erase(it->second); | 77 size_t count = mailbox_to_textures_.erase(it->second); |
78 DCHECK(count == 1); | 78 DCHECK(count == 1); |
79 } | 79 } |
80 textures_to_mailboxes_.erase(range.first, range.second); | 80 textures_to_mailboxes_.erase(range.first, range.second); |
81 DCHECK_EQ(mailbox_to_textures_.size(), textures_to_mailboxes_.size()); | 81 DCHECK_EQ(mailbox_to_textures_.size(), textures_to_mailboxes_.size()); |
82 | 82 |
83 if (sync_) | 83 if (sync_) |
84 sync_->TextureDeleted(texture); | 84 sync_->TextureDeleted(texture); |
85 } | 85 } |
86 | 86 |
87 void MailboxManager::PushTextureUpdates() { | 87 void MailboxManager::PushTextureUpdates(uint32 sync_point) { |
88 if (sync_) | 88 if (sync_) |
89 sync_->PushTextureUpdates(this); | 89 sync_->PushTextureUpdates(this, sync_point); |
90 } | 90 } |
91 | 91 |
92 void MailboxManager::PullTextureUpdates() { | 92 void MailboxManager::PullTextureUpdates(uint32 sync_point) { |
93 if (sync_) | 93 if (sync_) |
94 sync_->PullTextureUpdates(this); | 94 sync_->PullTextureUpdates(this, sync_point); |
95 } | 95 } |
96 | 96 |
97 MailboxManager::TargetName::TargetName(unsigned target, const Mailbox& mailbox) | 97 MailboxManager::TargetName::TargetName(unsigned target, const Mailbox& mailbox) |
98 : target(target), | 98 : target(target), |
99 mailbox(mailbox) { | 99 mailbox(mailbox) { |
100 } | 100 } |
101 | 101 |
102 bool MailboxManager::TargetNameLess(const MailboxManager::TargetName& lhs, | 102 bool MailboxManager::TargetNameLess(const MailboxManager::TargetName& lhs, |
103 const MailboxManager::TargetName& rhs) { | 103 const MailboxManager::TargetName& rhs) { |
104 if (lhs.target != rhs.target) | 104 if (lhs.target != rhs.target) |
105 return lhs.target < rhs.target; | 105 return lhs.target < rhs.target; |
106 return lhs.mailbox < rhs.mailbox; | 106 return lhs.mailbox < rhs.mailbox; |
107 } | 107 } |
108 | 108 |
109 } // namespace gles2 | 109 } // namespace gles2 |
110 } // namespace gpu | 110 } // namespace gpu |
OLD | NEW |