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

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

Issue 1968363002: SurfaceAggregator should check whether output is secure when drawin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 aded09917040e0b53df5f2cef3c44d6408b25c58..e4f4a8937af6f854225140e119a571b94f2d69b4 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -152,6 +152,7 @@ struct GpuProcessTransportFactory::PerCompositorData {
BrowserCompositorOutputSurface* surface;
ReflectorImpl* reflector;
std::unique_ptr<cc::OnscreenDisplayClient> display_client;
+ bool output_is_secure = false;
PerCompositorData()
: surface_handle(gpu::kNullSurfaceHandle),
@@ -512,6 +513,7 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
display_client->set_surface_output_surface(output_surface.get());
output_surface->set_display_client(display_client.get());
display_client->display()->Resize(compositor->size());
+ display_client->display()->SetOutputIsSecure(data->output_is_secure);
data->display_client = std::move(display_client);
compositor->SetOutputSurface(std::move(output_surface));
}
@@ -634,6 +636,18 @@ void GpuProcessTransportFactory::SetAuthoritativeVSyncInterval(
}
}
+void GpuProcessTransportFactory::SetOutputIsSecure(ui::Compositor* compositor,
+ bool secure) {
+ PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor);
+ if (it == per_compositor_data_.end())
+ return;
+ PerCompositorData* data = it->second;
+ DCHECK(data);
+ data->output_is_secure = secure;
+ if (data->display_client)
+ data->display_client->display()->SetOutputIsSecure(secure);
+}
+
cc::SurfaceManager* GpuProcessTransportFactory::GetSurfaceManager() {
return surface_manager_.get();
}

Powered by Google App Engine
This is Rietveld 408576698