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

Unified Diff: cc/ipc/transferable_resource_struct_traits.h

Issue 2508203004: Add hints for potential overlay promotion on android. (Closed)
Patch Set: rebased Created 4 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/ipc/transferable_resource.mojom ('k') | cc/ipc/transferable_resource_struct_traits.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/ipc/transferable_resource_struct_traits.h
diff --git a/cc/ipc/transferable_resource_struct_traits.h b/cc/ipc/transferable_resource_struct_traits.h
index 52aa93dac103611e9b619429963b7a514ffd1611..a85f054e5846588dd1a691c0971baaa9d7421bcb 100644
--- a/cc/ipc/transferable_resource_struct_traits.h
+++ b/cc/ipc/transferable_resource_struct_traits.h
@@ -48,6 +48,27 @@ struct StructTraits<cc::mojom::TransferableResourceDataView,
return resource.is_overlay_candidate;
}
+ static bool is_backed_by_surface_texture(
+ const cc::TransferableResource& resource) {
+#if defined(OS_ANDROID)
+ // TransferableResource has this in an #ifdef, but mojo doesn't let us.
+ // TODO(https://crbug.com/671901)
+ return resource.is_backed_by_surface_texture;
+#else
+ return false;
+#endif
+ }
+
+ static bool wants_promotion_hint(const cc::TransferableResource& resource) {
+#if defined(OS_ANDROID)
+ // TransferableResource has this in an #ifdef, but mojo doesn't let us.
+ // TODO(https://crbug.com/671901)
+ return resource.wants_promotion_hint;
+#else
+ return false;
+#endif
+ }
+
static bool Read(cc::mojom::TransferableResourceDataView data,
cc::TransferableResource* out);
};
« no previous file with comments | « cc/ipc/transferable_resource.mojom ('k') | cc/ipc/transferable_resource_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698