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: services/ui/ws/frame_generator.cc

Issue 2582823002: WIP: Surface Synchronization System
Patch Set: Only create ClientSurfaceEmbedder if window is visible. Trash it otherwise. Created 3 years, 11 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: services/ui/ws/frame_generator.cc
diff --git a/services/ui/ws/frame_generator.cc b/services/ui/ws/frame_generator.cc
index ba893e2095cb53ccc60cc1e438b7668ec5827727..f8e2adb735735dd1b94a52c25290b0966ddd8376 100644
--- a/services/ui/ws/frame_generator.cc
+++ b/services/ui/ws/frame_generator.cc
@@ -143,6 +143,9 @@ cc::CompositorFrame FrameGenerator::GenerateCompositorFrame(
if (window_manager_surface_info_.id().is_valid()) {
frame.metadata.referenced_surfaces.push_back(
window_manager_surface_info_.id());
+ // We have nothing useful to do UNTIL the window manager has something to
+ // show.
+ frame.metadata.respect_deadline = false;
}
return frame;
@@ -154,6 +157,8 @@ void FrameGenerator::DrawWindow(cc::RenderPass* pass) {
const gfx::Rect bounds_at_origin(
window_manager_surface_info_.size_in_pixels());
+ // fprintf(stderr, ">>>>DrawWindow %s\n",
+ // default_surface_id.ToString().c_str());
gfx::Transform quad_to_target_transform;
quad_to_target_transform.Translate(bounds_at_origin.x(),
bounds_at_origin.y());
@@ -175,7 +180,8 @@ void FrameGenerator::DrawWindow(cc::RenderPass* pass) {
auto* quad = pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>();
quad->SetAll(sqs, bounds_at_origin /* rect */, gfx::Rect() /* opaque_rect */,
bounds_at_origin /* visible_rect */, true /* needs_blending*/,
- window_manager_surface_info_.id());
+ window_manager_surface_info_.id(),
+ cc::SurfaceDrawQuadType::PRIMARY, nullptr);
}
} // namespace ws

Powered by Google App Engine
This is Rietveld 408576698