Add tests for TranslateLanguageList
[chromium-blink-merge.git] / cc / resources / transferable_resource.cc
blob89771a781466b6e68a4bb2bd4f0e00ba63eea0ba
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 read_lock_fences_enabled(false),
15 is_repeated(false),
16 is_software(false),
17 allow_overlay(false) {
20 TransferableResource::~TransferableResource() {
23 ReturnedResource TransferableResource::ToReturnedResource() const {
24 ReturnedResource returned;
25 returned.id = id;
26 returned.sync_point = mailbox_holder.sync_point;
27 returned.count = 1;
28 return returned;
31 // static
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());
40 } // namespace cc