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

Unified Diff: cc/surfaces/display.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: onemore 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
« no previous file with comments | « cc/surfaces/display.h ('k') | cc/surfaces/display_scheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/display.cc
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc
index 31c9f176995a7627b8c584b661bd032baffa601c..907815bda93dbe9d9621150a3a2e3bb9f57f2ea2 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -105,6 +105,15 @@ void Display::SetSurfaceId(const SurfaceId& id, float device_scale_factor) {
scheduler_->SetNewRootSurface(id);
}
+void Display::SetVisible(bool visible) {
+ TRACE_EVENT1("cc", "Display::SetVisible", "visible", visible);
+ if (renderer_)
+ renderer_->SetVisible(visible);
+ if (scheduler_)
+ scheduler_->SetVisible(visible);
+ visible_ = visible;
+}
+
void Display::Resize(const gfx::Size& size) {
if (size == current_surface_size_)
return;
@@ -182,6 +191,7 @@ void Display::InitializeRenderer() {
}
renderer_->SetEnlargePassTextureAmount(enlarge_texture_amount_);
+ renderer_->SetVisible(visible_);
// TODO(jbauman): Outputting an incomplete quad list doesn't work when using
// overlays.
« no previous file with comments | « cc/surfaces/display.h ('k') | cc/surfaces/display_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698