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
3 // found in the LICENSE file.
5 #include "base/logging.h"
6 #include "cc/resources/returned_resource.h"
7 #include "cc/resources/transferable_resource.h"
11 TransferableResource::TransferableResource()
17 TransferableResource::~TransferableResource() {
20 ReturnedResource
TransferableResource::ToReturnedResource() const {
21 ReturnedResource returned
;
23 returned
.sync_point
= mailbox_holder
.sync_point
;
29 void TransferableResource::ReturnResources(
30 const TransferableResourceArray
& input
,
31 ReturnedResourceArray
* output
) {
32 for (TransferableResourceArray::const_iterator it
= input
.begin();
33 it
!= input
.end(); ++it
)
34 output
->push_back(it
->ToReturnedResource());