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

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

Issue 2238693002: Plumb SetVisible from ui::Compositor to the DirectRenderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: setvisible-browser: . Created 4 years, 4 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 334b10c04662d48f227bfffcbd408266b92f24a6..60d390273a437f45eef63aa6232ef7aa0092f5e4 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -171,6 +171,7 @@ struct GpuProcessTransportFactory::PerCompositorData {
std::unique_ptr<cc::Display> display;
bool output_is_secure = false;
gfx::ColorSpace color_space;
+ bool visible = false;
};
GpuProcessTransportFactory::GpuProcessTransportFactory()
@@ -564,6 +565,7 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
data->display->Resize(compositor->size());
data->display->SetOutputIsSecure(data->output_is_secure);
data->display->SetColorSpace(data->color_space);
+ data->display->SetVisible(data->visible);
compositor->SetOutputSurface(std::move(delegated_output_surface));
}
@@ -655,6 +657,18 @@ uint32_t GpuProcessTransportFactory::AllocateSurfaceClientId() {
return next_surface_client_id_++;
}
+void GpuProcessTransportFactory::SetDisplayVisible(ui::Compositor* compositor,
+ bool visible) {
+ PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor);
+ if (it == per_compositor_data_.end())
+ return;
+ PerCompositorData* data = it->second;
+ DCHECK(data);
+ data->visible = visible;
+ if (data->display)
+ data->display->SetVisible(visible);
+}
+
void GpuProcessTransportFactory::ResizeDisplay(ui::Compositor* compositor,
const gfx::Size& size) {
PerCompositorDataMap::iterator it = per_compositor_data_.find(compositor);

Powered by Google App Engine
This is Rietveld 408576698