Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: cc/resources/transferable_resource.cc

Issue 1531403002: Revert "Delete CC." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/transferable_resource.h ('k') | cc/scheduler/begin_frame_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/transferable_resource.cc
diff --git a/cc/resources/transferable_resource.cc b/cc/resources/transferable_resource.cc
new file mode 100644
index 0000000000000000000000000000000000000000..558d6e8772896157875d04cf4b885c84d6736468
--- /dev/null
+++ b/cc/resources/transferable_resource.cc
@@ -0,0 +1,39 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/resources/returned_resource.h"
+#include "cc/resources/transferable_resource.h"
+
+namespace cc {
+
+TransferableResource::TransferableResource()
+ : id(0),
+ format(RGBA_8888),
+ filter(0),
+ is_repeated(false),
+ is_software(false),
+ allow_overlay(false) {
+}
+
+TransferableResource::~TransferableResource() {
+}
+
+ReturnedResource TransferableResource::ToReturnedResource() const {
+ ReturnedResource returned;
+ returned.id = id;
+ returned.sync_point = mailbox_holder.sync_point;
+ returned.count = 1;
+ return returned;
+}
+
+// static
+void TransferableResource::ReturnResources(
+ const TransferableResourceArray& input,
+ ReturnedResourceArray* output) {
+ for (TransferableResourceArray::const_iterator it = input.begin();
+ it != input.end(); ++it)
+ output->push_back(it->ToReturnedResource());
+}
+
+} // namespace cc
« no previous file with comments | « cc/resources/transferable_resource.h ('k') | cc/scheduler/begin_frame_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698