Index: gpu/command_buffer/service/mailbox_manager_sync.cc |
diff --git a/gpu/command_buffer/service/mailbox_manager_sync.cc b/gpu/command_buffer/service/mailbox_manager_sync.cc |
index 5a79a41c2ecb7d0ec4497e1132a35ab5bd15bde7..979700a19e38a321f608787bd54735a72b621501 100644 |
--- a/gpu/command_buffer/service/mailbox_manager_sync.cc |
+++ b/gpu/command_buffer/service/mailbox_manager_sync.cc |
@@ -218,9 +218,12 @@ Texture* MailboxManagerSync::ConsumeTexture(const Mailbox& mailbox) { |
} |
void MailboxManagerSync::ProduceTexture(const Mailbox& mailbox, |
- Texture* texture) { |
+ TextureBase* texture_base) { |
base::AutoLock lock(g_lock.Get()); |
+ Texture* texture = static_cast<Texture*>(texture_base); |
+ DCHECK(texture != nullptr); |
+ |
TextureToGroupMap::iterator tex_it = texture_to_group_.find(texture); |
TextureGroup* group_for_mailbox = TextureGroup::FromName(mailbox); |
TextureGroup* group_for_texture = NULL; |
@@ -262,8 +265,12 @@ void MailboxManagerSync::ProduceTexture(const Mailbox& mailbox, |
DCHECK(texture->mailbox_manager_ == this); |
} |
-void MailboxManagerSync::TextureDeleted(Texture* texture) { |
+void MailboxManagerSync::TextureDeleted(TextureBase* texture_base) { |
base::AutoLock lock(g_lock.Get()); |
+ |
+ Texture* texture = static_cast<Texture*>(texture_base); |
+ DCHECK(texture != nullptr); |
+ |
TextureToGroupMap::iterator tex_it = texture_to_group_.find(texture); |
DCHECK(tex_it != texture_to_group_.end()); |
TextureGroup* group_for_texture = tex_it->second.group.get(); |
@@ -272,11 +279,13 @@ void MailboxManagerSync::TextureDeleted(Texture* texture) { |
texture_to_group_.erase(tex_it); |
} |
-void MailboxManagerSync::UpdateDefinitionLocked( |
- Texture* texture, |
- TextureGroupRef* group_ref) { |
+void MailboxManagerSync::UpdateDefinitionLocked(TextureBase* texture_base, |
+ TextureGroupRef* group_ref) { |
g_lock.Get().AssertAcquired(); |
+ Texture* texture = static_cast<Texture*>(texture_base); |
+ DCHECK(texture != nullptr); |
+ |
if (SkipTextureWorkarounds(texture)) |
return; |