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

Unified Diff: cc/layers/surface_layer_impl_unittest.cc

Issue 2803913004: cc: Introduce embedded_surfaces in metadata for surface Ids in draw quads (Closed)
Patch Set: Addressed Dana's comments Created 3 years, 8 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/surface_layer_impl.cc ('k') | cc/output/compositor_frame_metadata.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/surface_layer_impl_unittest.cc
diff --git a/cc/layers/surface_layer_impl_unittest.cc b/cc/layers/surface_layer_impl_unittest.cc
index 1b41a538677141d1a48e4f3d53a1d184a682fb57..a526a516e9cd7eaabdb9eddaa209cb1197446092 100644
--- a/cc/layers/surface_layer_impl_unittest.cc
+++ b/cc/layers/surface_layer_impl_unittest.cc
@@ -9,8 +9,11 @@
#include "cc/layers/append_quads_data.h"
#include "cc/test/layer_test_common.h"
#include "cc/trees/layer_tree_host_common.h"
+#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+using testing::UnorderedElementsAre;
+
namespace cc {
namespace {
@@ -168,6 +171,7 @@ TEST(SurfaceLayerImplTest, SurfaceStretchedToLayerBounds) {
std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
AppendQuadsData data;
surface_layer_impl->AppendQuads(render_pass.get(), &data);
+ EXPECT_THAT(data.embedded_surfaces, UnorderedElementsAre(surface_id));
const QuadList& quads = render_pass->quad_list;
ASSERT_EQ(1u, quads.size());
@@ -236,6 +240,8 @@ TEST(SurfaceLayerImplTest, SurfaceLayerImplEmitsTwoDrawQuadsIfUniqueFallback) {
std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
AppendQuadsData data;
surface_layer_impl->AppendQuads(render_pass.get(), &data);
+ EXPECT_THAT(data.embedded_surfaces,
+ UnorderedElementsAre(surface_id1, surface_id2));
ASSERT_EQ(2u, render_pass->quad_list.size());
const SurfaceDrawQuad* surface_draw_quad1 =
@@ -286,6 +292,7 @@ TEST(SurfaceLayerImplTest,
std::unique_ptr<RenderPass> render_pass = RenderPass::Create();
AppendQuadsData data;
surface_layer_impl->AppendQuads(render_pass.get(), &data);
+ EXPECT_THAT(data.embedded_surfaces, UnorderedElementsAre(surface_id1));
ASSERT_EQ(1u, render_pass->quad_list.size());
const SurfaceDrawQuad* surface_draw_quad1 =
« no previous file with comments | « cc/layers/surface_layer_impl.cc ('k') | cc/output/compositor_frame_metadata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698