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

Unified Diff: ui/compositor/test/in_process_context_factory.cc

Issue 2791723003: Update GpuSurfaceTracker to include Android surfaces. (Closed)
Patch Set: rebased 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 | « gpu/ipc/common/gpu_surface_tracker.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/test/in_process_context_factory.cc
diff --git a/ui/compositor/test/in_process_context_factory.cc b/ui/compositor/test/in_process_context_factory.cc
index aecb9b792c2f1a2993f2c0c00bf0d7080ee97b28..cf1ae50eed2db79e9f18b3098e42f62de182df8a 100644
--- a/ui/compositor/test/in_process_context_factory.cc
+++ b/ui/compositor/test/in_process_context_factory.cc
@@ -332,7 +332,19 @@ InProcessContextFactory::CreatePerCompositorData(ui::Compositor* compositor) {
data->surface_handle = widget;
#else
gpu::GpuSurfaceTracker* tracker = gpu::GpuSurfaceTracker::Get();
- data->surface_handle = tracker->AddSurfaceForNativeWidget(widget);
+ data->surface_handle = tracker->AddSurfaceForNativeWidget(
+ gpu::GpuSurfaceTracker::SurfaceRecord(
+ widget
+#if defined(OS_ANDROID)
+ // We have to provide a surface too, but we don't have one.
+ // ContentShell probably does, but how do we get it? For now, we
danakj 2017/05/01 22:26:12 This class is used for unit tests, not for content
liberato (no reviews please) 2017/05/01 22:41:39 Done.
+ // don't provide it, since nobody will ask anyway.
+ // If we ever provide a valid surface here, then GpuSurfaceTracker
+ // can be more strict about enforcing it.
+ ,
+ nullptr
+#endif
+ ));
#endif
}
« no previous file with comments | « gpu/ipc/common/gpu_surface_tracker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698