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

Unified Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 2083853002: exo: Recreate Surface resources on context lost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nits 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
Index: content/browser/compositor/gpu_process_transport_factory.cc
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index 2c0e1453fad86e443e081853eb71cdc6a48b3917..805a2204090d4633185df25a17eea387d9ec1577 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -589,8 +589,8 @@ void GpuProcessTransportFactory::RemoveCompositor(ui::Compositor* compositor) {
// If there are any observer left at this point, make sure they clean up
// before we destroy the GLHelper.
- FOR_EACH_OBSERVER(
- ImageTransportFactoryObserver, observer_list_, OnLostResources());
+ FOR_EACH_OBSERVER(ui::ContextFactoryObserver, observer_list_,
+ OnLostResources());
helper.reset();
DCHECK(!gl_helper_) << "Destroying the GLHelper should not cause a new "
@@ -671,6 +671,16 @@ void GpuProcessTransportFactory::SetOutputIsSecure(ui::Compositor* compositor,
data->display->SetOutputIsSecure(secure);
}
+void GpuProcessTransportFactory::AddObserver(
+ ui::ContextFactoryObserver* observer) {
+ observer_list_.AddObserver(observer);
+}
+
+void GpuProcessTransportFactory::RemoveObserver(
+ ui::ContextFactoryObserver* observer) {
+ observer_list_.RemoveObserver(observer);
+}
+
cc::SurfaceManager* GpuProcessTransportFactory::GetSurfaceManager() {
return surface_manager_.get();
}
@@ -686,16 +696,6 @@ display_compositor::GLHelper* GpuProcessTransportFactory::GetGLHelper() {
return gl_helper_.get();
}
-void GpuProcessTransportFactory::AddObserver(
- ImageTransportFactoryObserver* observer) {
- observer_list_.AddObserver(observer);
-}
-
-void GpuProcessTransportFactory::RemoveObserver(
- ImageTransportFactoryObserver* observer) {
- observer_list_.RemoveObserver(observer);
-}
-
#if defined(OS_MACOSX)
void GpuProcessTransportFactory::SetCompositorSuspendedForRecycle(
ui::Compositor* compositor,
@@ -788,8 +788,7 @@ void GpuProcessTransportFactory::OnLostMainThreadSharedContext() {
std::unique_ptr<display_compositor::GLHelper> lost_gl_helper =
std::move(gl_helper_);
- FOR_EACH_OBSERVER(ImageTransportFactoryObserver,
- observer_list_,
+ FOR_EACH_OBSERVER(ui::ContextFactoryObserver, observer_list_,
OnLostResources());
// Kill things that use the shared context before killing the shared context.
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.h ('k') | content/browser/compositor/image_transport_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698