Index: cc/resources/resource_provider.cc |
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc |
index f5d365f1a9e22beac6f14418b29558b130450f2e..31a0644fcb9e4b9618c78ce3697700017f1397ba 100644 |
--- a/cc/resources/resource_provider.cc |
+++ b/cc/resources/resource_provider.cc |
@@ -549,7 +549,7 @@ void ResourceProvider::DeleteResourceInternal(ResourceMap::iterator it, |
GLC(context3d, context3d->deleteBuffer(resource->gl_pixel_buffer_id)); |
} |
if (resource->mailbox.IsValid() && resource->external) { |
- unsigned sync_point = resource->mailbox.sync_point(); |
+ uint32 sync_point = resource->mailbox.sync_point(); |
if (resource->mailbox.IsTexture()) { |
lost_resource |= lost_output_surface_; |
WebGraphicsContext3D* context3d = Context3d(); |
@@ -745,13 +745,13 @@ const ResourceProvider::Resource* ResourceProvider::LockForRead(ResourceId id) { |
if (resource->mailbox.sync_point()) { |
GLC(context3d, |
context3d->waitSyncPoint(resource->mailbox.sync_point())); |
- resource->mailbox.ResetSyncPoint(); |
+ resource->mailbox.set_sync_point(0); |
} |
resource->gl_id = texture_id_allocator_->NextId(); |
GLC(context3d, context3d->bindTexture(resource->target, resource->gl_id)); |
GLC(context3d, |
context3d->consumeTextureCHROMIUM(resource->target, |
- resource->mailbox.data())); |
+ resource->mailbox.mailbox().name)); |
} |
} |
@@ -1044,7 +1044,7 @@ void ResourceProvider::PrepareSendToParent(const ResourceIdArray& resources, |
list->push_back(resource); |
} |
if (need_sync_point) { |
- unsigned int sync_point = context3d->insertSyncPoint(); |
+ uint32 sync_point = context3d->insertSyncPoint(); |
for (TransferableResourceArray::iterator it = list->begin(); |
it != list->end(); |
++it) { |
@@ -1117,7 +1117,7 @@ void ResourceProvider::ReceiveFromChild( |
GL_CLAMP_TO_EDGE, |
TextureUsageAny, |
it->format); |
- resource.mailbox.SetName(it->mailbox); |
+ resource.mailbox = cc::TextureMailbox(it->mailbox, it->target, 0); |
} |
resource.child_id = child; |
// Don't allocate a texture for a child. |
@@ -1220,8 +1220,7 @@ void ResourceProvider::ReceiveReturnsFromParent( |
if (returned.sync_point) |
GLC(context3d, context3d->waitSyncPoint(returned.sync_point)); |
} else if (!resource->shared_bitmap) { |
- resource->mailbox = |
- TextureMailbox(resource->mailbox.name(), returned.sync_point); |
+ resource->mailbox.set_sync_point(returned.sync_point); |
} |
if (!resource->marked_for_deletion) |
@@ -1285,14 +1284,15 @@ void ResourceProvider::TransferResource(WebGraphicsContext3D* context, |
GLC(context, |
context->produceTextureCHROMIUM(resource->target, |
resource->mailbox.name)); |
- source->mailbox.SetName(resource->mailbox); |
+ source->mailbox = |
+ cc::TextureMailbox(resource->mailbox, resource->target, 0); |
} else { |
DCHECK(source->mailbox.IsTexture()); |
// This is either an external resource, or a compositor resource that we |
// already exported. Make sure to forward the sync point that we were given. |
- resource->mailbox = source->mailbox.name(); |
+ resource->mailbox = source->mailbox.mailbox(); |
resource->sync_point = source->mailbox.sync_point(); |
- source->mailbox.ResetSyncPoint(); |
+ source->mailbox.set_sync_point(0); |
} |
} |
@@ -1373,7 +1373,7 @@ void ResourceProvider::DeleteAndReturnUnusedResourcesToChild( |
} |
if (need_sync_point) { |
DCHECK(context3d); |
- unsigned int sync_point = context3d->insertSyncPoint(); |
+ uint32 sync_point = context3d->insertSyncPoint(); |
for (size_t i = 0; i < to_return.size(); ++i) { |
if (!to_return[i].sync_point) |
to_return[i].sync_point = sync_point; |