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

Unified Diff: cc/test/test_compositor_frame_sink.cc

Issue 2485473003: Remove SurfaceFactory::Create and SurfaceFactory::Destroy (Closed)
Patch Set: up Created 4 years, 1 month 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/surfaces_pixeltest.cc ('k') | components/exo/surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_compositor_frame_sink.cc
diff --git a/cc/test/test_compositor_frame_sink.cc b/cc/test/test_compositor_frame_sink.cc
index e15d8a6e5df30edae158586de10a98784a3436d9..2f383c96e50514268455d1995478e574e6a3006c 100644
--- a/cc/test/test_compositor_frame_sink.cc
+++ b/cc/test/test_compositor_frame_sink.cc
@@ -111,8 +111,7 @@ bool TestCompositorFrameSink::BindToClient(CompositorFrameSinkClient* client) {
void TestCompositorFrameSink::DetachFromClient() {
// Some tests make BindToClient fail on purpose. ^__^
if (bound_) {
- if (delegated_local_frame_id_.is_valid())
- surface_factory_->Destroy(delegated_local_frame_id_);
+ surface_factory_->EvictSurface();
surface_manager_->UnregisterSurfaceFactoryClient(frame_sink_id_);
surface_manager_->InvalidateFrameSinkId(frame_sink_id_);
display_ = nullptr;
@@ -130,7 +129,6 @@ void TestCompositorFrameSink::SubmitCompositorFrame(CompositorFrame frame) {
if (!delegated_local_frame_id_.is_valid()) {
delegated_local_frame_id_ = surface_id_allocator_->GenerateId();
- surface_factory_->Create(delegated_local_frame_id_);
}
display_->SetLocalFrameId(delegated_local_frame_id_,
frame.metadata.device_scale_factor);
@@ -154,8 +152,7 @@ void TestCompositorFrameSink::SubmitCompositorFrame(CompositorFrame frame) {
std::move(frame), draw_callback);
for (std::unique_ptr<CopyOutputRequest>& copy_request : copy_requests_) {
- surface_factory_->RequestCopyOfSurface(delegated_local_frame_id_,
- std::move(copy_request));
+ surface_factory_->RequestCopyOfSurface(std::move(copy_request));
}
copy_requests_.clear();
@@ -178,7 +175,7 @@ void TestCompositorFrameSink::DidDrawCallback() {
void TestCompositorFrameSink::ForceReclaimResources() {
if (capabilities_.can_force_reclaim_resources &&
delegated_local_frame_id_.is_valid()) {
- surface_factory_->ClearSurface(delegated_local_frame_id_);
+ surface_factory_->ClearSurface();
}
}
« no previous file with comments | « cc/surfaces/surfaces_pixeltest.cc ('k') | components/exo/surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698