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

Unified Diff: cc/layers/texture_layer_impl_unittest.cc

Issue 1968363002: SurfaceAggregator should check whether output is secure when drawin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months 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/layers/texture_layer_impl.cc ('k') | cc/layers/ui_resource_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/texture_layer_impl_unittest.cc
diff --git a/cc/layers/texture_layer_impl_unittest.cc b/cc/layers/texture_layer_impl_unittest.cc
index 4b8082e018b066b9efbf59671da91e9aab36643b..4665691931f9ebebcd7f9ef66e7f74a042b0171b 100644
--- a/cc/layers/texture_layer_impl_unittest.cc
+++ b/cc/layers/texture_layer_impl_unittest.cc
@@ -9,6 +9,7 @@
#include "cc/output/context_provider.h"
#include "cc/output/output_surface.h"
#include "cc/quads/draw_quad.h"
+#include "cc/quads/texture_draw_quad.h"
#include "cc/test/layer_test_common.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -133,29 +134,11 @@ TEST(TextureLayerImplTest, OutputIsSecure) {
impl.AppendQuadsWithOcclusion(texture_layer_impl, occluded);
EXPECT_EQ(1u, impl.quad_list().size());
- EXPECT_EQ(DrawQuad::Material::SOLID_COLOR,
- impl.quad_list().front()->material);
- }
-
- {
- impl.SetOutputIsSecure(true);
- gfx::Rect occluded;
- impl.AppendQuadsWithOcclusion(texture_layer_impl, occluded);
-
- EXPECT_EQ(1u, impl.quad_list().size());
- EXPECT_NE(DrawQuad::Material::SOLID_COLOR,
- impl.quad_list().front()->material);
- }
-
- {
- impl.SetOutputIsSecure(false);
- impl.RequestCopyOfOutput();
- gfx::Rect occluded;
- impl.AppendQuadsWithOcclusion(texture_layer_impl, occluded);
-
- EXPECT_EQ(1u, impl.quad_list().size());
- EXPECT_EQ(DrawQuad::Material::SOLID_COLOR,
+ ASSERT_EQ(DrawQuad::Material::TEXTURE_CONTENT,
impl.quad_list().front()->material);
+ const TextureDrawQuad* quad =
+ TextureDrawQuad::MaterialCast(impl.quad_list().front());
+ EXPECT_TRUE(quad->secure_output_only);
}
}
« no previous file with comments | « cc/layers/texture_layer_impl.cc ('k') | cc/layers/ui_resource_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698