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 "cc/resources/returned_resource.h"
6 #include "cc/resources/transferable_resource.h"
10 TransferableResource::TransferableResource()
16 allow_overlay(false) {
19 TransferableResource::~TransferableResource() {
22 ReturnedResource
TransferableResource::ToReturnedResource() const {
23 ReturnedResource returned
;
25 returned
.sync_point
= mailbox_holder
.sync_point
;
31 void TransferableResource::ReturnResources(
32 const TransferableResourceArray
& input
,
33 ReturnedResourceArray
* output
) {
34 for (TransferableResourceArray::const_iterator it
= input
.begin();
35 it
!= input
.end(); ++it
)
36 output
->push_back(it
->ToReturnedResource());