This source file includes following definitions.
- is_software
- ToReturnedResource
- ReturnResources
#include "base/logging.h"
#include "cc/resources/returned_resource.h"
#include "cc/resources/transferable_resource.h"
namespace cc {
TransferableResource::TransferableResource()
: id(0),
format(RGBA_8888),
filter(0),
is_software(false) {}
TransferableResource::~TransferableResource() {
}
ReturnedResource TransferableResource::ToReturnedResource() const {
ReturnedResource returned;
returned.id = id;
returned.sync_point = mailbox_holder.sync_point;
returned.count = 1;
return returned;
}
void TransferableResource::ReturnResources(
const TransferableResourceArray& input,
ReturnedResourceArray* output) {
for (TransferableResourceArray::const_iterator it = input.begin();
it != input.end(); ++it)
output->push_back(it->ToReturnedResource());
}
}