From df41e253e6918cd035c36936761734f2ac694466 Mon Sep 17 00:00:00 2001 From: "sheu@chromium.org" Date: Mon, 3 Feb 2014 23:39:50 +0000 Subject: Add gpu::MailboxHolder to hold state for a gpu::Mailbox gpu::Mailbox by itself can hold only a texture id, but in common usage it comes with texture target and syncpoint information for cross-context sharing. To reduce repetition of this pattern, gpu::MailboxHolder holds: * a gpu::Mailbox * a GL texture target * a syncpoint index Refactor other classes to use a gpu::MailboxHolder instead of separate gpu::Mailbox and associated state. Syncpoints are created with uint32 indices; make sure all uses of syncpoints use the appropriate type. BUG=None TEST=local build, unittests on CrOS snow, desktop Linux TBR=piman@chromium.org, enn@chromium.orge, cevans@chromium.org, scherkus@chromium.org Review URL: https://codereview.chromium.org/132233041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248612 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/resources/transferable_resource.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cc/resources/transferable_resource.cc') diff --git a/cc/resources/transferable_resource.cc b/cc/resources/transferable_resource.cc index 62f1bdb..e7e9e24 100644 --- a/cc/resources/transferable_resource.cc +++ b/cc/resources/transferable_resource.cc @@ -10,9 +10,7 @@ namespace cc { TransferableResource::TransferableResource() : id(0), - sync_point(0), format(RGBA_8888), - target(0), filter(0), is_software(false) {} @@ -22,7 +20,7 @@ TransferableResource::~TransferableResource() { ReturnedResource TransferableResource::ToReturnedResource() const { ReturnedResource returned; returned.id = id; - returned.sync_point = sync_point; + returned.sync_point = mailbox_holder.sync_point; returned.count = 1; return returned; } -- cgit v1.1