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

Unified Diff: cc/surfaces/surface_hittest_unittest.cc

Issue 2098953003: Make cc::CompositorFrames movable [Part 2 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed exo unittests Created 4 years, 6 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/surfaces/surface_hittest.cc ('k') | cc/surfaces/surfaces_pixeltest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_hittest_unittest.cc
diff --git a/cc/surfaces/surface_hittest_unittest.cc b/cc/surfaces/surface_hittest_unittest.cc
index 59adb8fa7513a58ff1ccf1d818155223163c814a..6f0637f41a485048040e4338c47a78215daafe4d 100644
--- a/cc/surfaces/surface_hittest_unittest.cc
+++ b/cc/surfaces/surface_hittest_unittest.cc
@@ -81,9 +81,7 @@ TEST(SurfaceHittestTest, Hittest_BadCompositorFrameDoesNotCrash) {
SurfaceIdAllocator root_allocator(2);
SurfaceId root_surface_id = root_allocator.GenerateId();
factory.Create(root_surface_id);
- std::unique_ptr<CompositorFrame> root_frame_copy(new CompositorFrame);
- *root_frame_copy = std::move(root_frame);
- factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame_copy),
+ factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
SurfaceFactory::DrawCallback());
{
@@ -112,9 +110,7 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface) {
SurfaceIdAllocator root_allocator(2);
SurfaceId root_surface_id = root_allocator.GenerateId();
factory.Create(root_surface_id);
- std::unique_ptr<CompositorFrame> root_frame_copy(new CompositorFrame);
- *root_frame_copy = std::move(root_frame);
- factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame_copy),
+ factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
SurfaceFactory::DrawCallback());
TestCase tests[] = {
{
@@ -157,9 +153,7 @@ TEST(SurfaceHittestTest, Hittest_ChildSurface) {
SurfaceIdAllocator root_allocator(2);
SurfaceId root_surface_id = root_allocator.GenerateId();
factory.Create(root_surface_id);
- std::unique_ptr<CompositorFrame> root_frame_copy(new CompositorFrame);
- *root_frame_copy = std::move(root_frame);
- factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame_copy),
+ factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
SurfaceFactory::DrawCallback());
// Creates a child surface.
@@ -178,9 +172,7 @@ TEST(SurfaceHittestTest, Hittest_ChildSurface) {
// Submit the frame.
factory.Create(child_surface_id);
- std::unique_ptr<CompositorFrame> child_frame_copy(new CompositorFrame);
- *child_frame_copy = std::move(child_frame);
- factory.SubmitCompositorFrame(child_surface_id, std::move(child_frame_copy),
+ factory.SubmitCompositorFrame(child_surface_id, std::move(child_frame),
SurfaceFactory::DrawCallback());
TestCase tests[] = {
@@ -234,9 +226,7 @@ TEST(SurfaceHittestTest, Hittest_ChildSurface) {
root_rect,
child_rect,
child_surface_id);
- root_frame_copy.reset(new CompositorFrame);
- *root_frame_copy = std::move(root_frame);
- factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame_copy),
+ factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
SurfaceFactory::DrawCallback());
// Verify that point (100, 100) no longer falls on the child surface.
@@ -301,9 +291,7 @@ TEST(SurfaceHittestTest, Hittest_InvalidRenderPassDrawQuad) {
SurfaceIdAllocator root_allocator(2);
SurfaceId root_surface_id = root_allocator.GenerateId();
factory.Create(root_surface_id);
- std::unique_ptr<CompositorFrame> root_frame_copy(new CompositorFrame);
- *root_frame_copy = std::move(root_frame);
- factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame_copy),
+ factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
SurfaceFactory::DrawCallback());
// Creates a child surface.
@@ -322,9 +310,7 @@ TEST(SurfaceHittestTest, Hittest_InvalidRenderPassDrawQuad) {
// Submit the frame.
factory.Create(child_surface_id);
- std::unique_ptr<CompositorFrame> child_frame_copy(new CompositorFrame);
- *child_frame_copy = std::move(child_frame);
- factory.SubmitCompositorFrame(child_surface_id, std::move(child_frame_copy),
+ factory.SubmitCompositorFrame(child_surface_id, std::move(child_frame),
SurfaceFactory::DrawCallback());
TestCase tests[] = {
@@ -423,9 +409,7 @@ TEST(SurfaceHittestTest, Hittest_RenderPassDrawQuad) {
SurfaceIdAllocator root_allocator(1);
SurfaceId root_surface_id = root_allocator.GenerateId();
factory.Create(root_surface_id);
- std::unique_ptr<CompositorFrame> root_frame_copy(new CompositorFrame);
- *root_frame_copy = std::move(root_frame);
- factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame_copy),
+ factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
SurfaceFactory::DrawCallback());
TestCase tests[] = {
@@ -503,9 +487,7 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface_WithInsetsDelegate) {
SurfaceIdAllocator root_allocator(2);
SurfaceId root_surface_id = root_allocator.GenerateId();
factory.Create(root_surface_id);
- std::unique_ptr<CompositorFrame> root_frame_copy(new CompositorFrame);
- *root_frame_copy = std::move(root_frame);
- factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame_copy),
+ factory.SubmitCompositorFrame(root_surface_id, std::move(root_frame),
SurfaceFactory::DrawCallback());
// Creates a child surface.
@@ -522,9 +504,7 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface_WithInsetsDelegate) {
// Submit the frame.
factory.Create(child_surface_id);
- std::unique_ptr<CompositorFrame> frame_copy(new CompositorFrame);
- *frame_copy = std::move(child_frame);
- factory.SubmitCompositorFrame(child_surface_id, std::move(frame_copy),
+ factory.SubmitCompositorFrame(child_surface_id, std::move(child_frame),
SurfaceFactory::DrawCallback());
TestCase test_expectations_without_insets[] = {
« no previous file with comments | « cc/surfaces/surface_hittest.cc ('k') | cc/surfaces/surfaces_pixeltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698