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

Unified Diff: cc/surfaces/surface_factory_unittest.cc

Issue 603703002: Fix SurfaceResourceHolder destruction order (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test Created 6 years, 3 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_factory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_factory_unittest.cc
diff --git a/cc/surfaces/surface_factory_unittest.cc b/cc/surfaces/surface_factory_unittest.cc
index 08156368c4c2bf628d16b1c7470ab17a7c9754a1..a4aecf8f372fa06feaf42517efdafc5f3d0d799a 100644
--- a/cc/surfaces/surface_factory_unittest.cc
+++ b/cc/surfaces/surface_factory_unittest.cc
@@ -356,5 +356,21 @@ TEST_F(SurfaceFactoryTest, ResourceLifetime) {
}
}
+// Tests shutting down the factory with a surface with outstanding refs still in
+// the map.
+TEST_F(SurfaceFactoryTest, DestroyWithResourceRefs) {
+ SurfaceId id(7);
+ factory_.Create(id, gfx::Size(1, 1));
+
+ scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
+ TransferableResource resource;
+ resource.id = 1;
+ resource.mailbox_holder.texture_target = GL_TEXTURE_2D;
+ frame_data->resource_list.push_back(resource);
+ scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+ frame->delegated_frame_data = frame_data.Pass();
+ factory_.SubmitFrame(id, frame.Pass(), base::Closure());
+}
+
} // namespace
} // namespace cc
« no previous file with comments | « cc/surfaces/surface_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698