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

Unified Diff: cc/ipc/cc_param_traits_unittest.cc

Issue 2508203004: Add hints for potential overlay promotion on android. (Closed)
Patch Set: added CC_EXPORT 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
Index: cc/ipc/cc_param_traits_unittest.cc
diff --git a/cc/ipc/cc_param_traits_unittest.cc b/cc/ipc/cc_param_traits_unittest.cc
index 1b663fdc2912b6c4f1f232eee820954fb7535f98..ebd698ff235f75d94a65510d92162f37033b121e 100644
--- a/cc/ipc/cc_param_traits_unittest.cc
+++ b/cc/ipc/cc_param_traits_unittest.cc
@@ -208,6 +208,10 @@ class CCParamTraitsTest : public testing::Test {
EXPECT_EQ(a.mailbox_holder.texture_target, b.mailbox_holder.texture_target);
EXPECT_EQ(a.mailbox_holder.sync_token, b.mailbox_holder.sync_token);
EXPECT_EQ(a.is_overlay_candidate, b.is_overlay_candidate);
+#if defined(OS_ANDROID)
+ EXPECT_EQ(a.is_backed_by_surface_texture, b.is_backed_by_surface_texture);
+ EXPECT_EQ(a.wants_promotion_hint, b.wants_promotion_hint);
+#endif
}
};
@@ -571,6 +575,10 @@ TEST_F(CCParamTraitsTest, Resources) {
arbitrary_resource1.mailbox_holder.texture_target = GL_TEXTURE_2D;
arbitrary_resource1.mailbox_holder.sync_token = arbitrary_token1;
arbitrary_resource1.is_overlay_candidate = true;
+#if defined(OS_ANDROID)
+ arbitrary_resource1.is_backed_by_surface_texture = true;
+ arbitrary_resource1.wants_promotion_hint = true;
+#endif
TransferableResource arbitrary_resource2;
arbitrary_resource2.id = 789132;
@@ -581,6 +589,10 @@ TEST_F(CCParamTraitsTest, Resources) {
arbitrary_resource2.mailbox_holder.texture_target = GL_TEXTURE_EXTERNAL_OES;
arbitrary_resource2.mailbox_holder.sync_token = arbitrary_token2;
arbitrary_resource2.is_overlay_candidate = false;
+#if defined(OS_ANDROID)
+ arbitrary_resource2.is_backed_by_surface_texture = false;
+ arbitrary_resource2.wants_promotion_hint = false;
+#endif
std::unique_ptr<RenderPass> renderpass_in = RenderPass::Create();
renderpass_in->SetNew(RenderPassId(1, 1), gfx::Rect(), gfx::Rect(),

Powered by Google App Engine
This is Rietveld 408576698