cc: Remove DrawQuad::IterateResoruces
[chromium-blink-merge.git] / cc / resources / transferable_resource.cc
blob558d6e8772896157875d04cf4b885c84d6736468
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"
8 namespace cc {
10 TransferableResource::TransferableResource()
11 : id(0),
12 format(RGBA_8888),
13 filter(0),
14 is_repeated(false),
15 is_software(false),
16 allow_overlay(false) {
19 TransferableResource::~TransferableResource() {
22 ReturnedResource TransferableResource::ToReturnedResource() const {
23 ReturnedResource returned;
24 returned.id = id;
25 returned.sync_point = mailbox_holder.sync_point;
26 returned.count = 1;
27 return returned;
30 // static
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());
39 } // namespace cc