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()
14 read_lock_fences_enabled(false),
17 allow_overlay(false) {
20 TransferableResource::~TransferableResource() {
23 ReturnedResource
TransferableResource::ToReturnedResource() const {
24 ReturnedResource returned
;
26 returned
.sync_point
= mailbox_holder
.sync_point
;
32 void TransferableResource::ReturnResources(
33 const TransferableResourceArray
& input
,
34 ReturnedResourceArray
* output
) {
35 for (TransferableResourceArray::const_iterator it
= input
.begin();
36 it
!= input
.end(); ++it
)
37 output
->push_back(it
->ToReturnedResource());