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

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 62eef31bc6c2368259efaa0f18c69c34b67dc129..ea713fd1a5b1269dd56115420be12082250bfc93 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -153,6 +153,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),
@@ -511,6 +512,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));
}
@@ -633,6 +635,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();
}
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.h ('k') | mojo/converters/surfaces/surfaces_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698