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

Unified Diff: chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc

Issue 2791723003: Update GpuSurfaceTracker to include Android surfaces. (Closed)
Patch Set: updated comment 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 | « no previous file | content/browser/compositor/gpu_process_transport_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc
diff --git a/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc b/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc
index 18e2ec21b512b4e89d76e6e1cebcabdee4652276..9f64f0a68f65fa8342fd1fdee530b33a2b8d2f7f 100644
--- a/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc
+++ b/chrome/browser/android/vr_shell/mailbox_to_surface_bridge.cc
@@ -141,7 +141,7 @@ MailboxToSurfaceBridge::~MailboxToSurfaceBridge() {
if (surface_handle_) {
// Unregister from the surface tracker to avoid a resource leak.
gpu::GpuSurfaceTracker* tracker = gpu::GpuSurfaceTracker::Get();
- tracker->UnregisterViewSurface(surface_handle_);
+ tracker->RemoveSurface(surface_handle_);
}
DestroyContext();
}
@@ -172,10 +172,10 @@ void MailboxToSurfaceBridge::CreateSurface(
gpu::GpuSurfaceTracker* tracker = gpu::GpuSurfaceTracker::Get();
ANativeWindow_acquire(window);
// Skip ANativeWindow_setBuffersGeometry, the default size appears to work.
- surface_handle_ = tracker->AddSurfaceForNativeWidget(window);
-
auto surface = base::MakeUnique<gl::ScopedJavaSurface>(surface_texture);
- tracker->RegisterViewSurface(surface_handle_, surface->j_surface().obj());
+ surface_handle_ =
+ tracker->AddSurfaceForNativeWidget(gpu::GpuSurfaceTracker::SurfaceRecord(
+ window, surface->j_surface().obj()));
// Unregistering happens in the destructor.
ANativeWindow_release(window);
« no previous file with comments | « no previous file | content/browser/compositor/gpu_process_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698