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

Side by Side Diff: blimp/client/feature/compositor/blimp_compositor.cc

Issue 2270573002: cc: Get rid of LayerTreeHost::output_surface_lost_ state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@renderer-caps
Patch Set: lth-outputsurface-lost: deps Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "blimp/client/feature/compositor/blimp_compositor.h" 5 #include "blimp/client/feature/compositor/blimp_compositor.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // gfx::AcceleratedWidget make our compositor visible. If the compositor 176 // gfx::AcceleratedWidget make our compositor visible. If the compositor
177 // had an outstanding output surface request, trigger the request again so 177 // had an outstanding output surface request, trigger the request again so
178 // we build the output surface. 178 // we build the output surface.
179 host_->SetVisible(true); 179 host_->SetVisible(true);
180 if (output_surface_request_pending_) 180 if (output_surface_request_pending_)
181 HandlePendingOutputSurfaceRequest(); 181 HandlePendingOutputSurfaceRequest();
182 } else if (!visible) { 182 } else if (!visible) {
183 // If not visible, hide the compositor and have it drop it's output 183 // If not visible, hide the compositor and have it drop it's output
184 // surface. 184 // surface.
185 host_->SetVisible(false); 185 host_->SetVisible(false);
186 if (!host_->output_surface_lost()) { 186 host_->ReleaseOutputSurface();
187 host_->ReleaseOutputSurface();
188 }
189 } 187 }
190 } 188 }
191 189
192 void BlimpCompositor::CreateLayerTreeHost( 190 void BlimpCompositor::CreateLayerTreeHost(
193 const cc::proto::InitializeImpl& initialize_message) { 191 const cc::proto::InitializeImpl& initialize_message) {
194 DCHECK(!host_); 192 DCHECK(!host_);
195 VLOG(1) << "Creating LayerTreeHost for render widget: " << render_widget_id_; 193 VLOG(1) << "Creating LayerTreeHost for render widget: " << render_widget_id_;
196 194
197 // Create the LayerTreeHost 195 // Create the LayerTreeHost
198 cc::LayerTreeHost::InitParams params; 196 cc::LayerTreeHost::InitParams params;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 client_->GetGpuMemoryBufferManager(), 276 client_->GetGpuMemoryBufferManager(),
279 host_->settings().renderer_settings, 277 host_->settings().renderer_settings,
280 client_->GetCompositorTaskRunner().get()); 278 client_->GetCompositorTaskRunner().get());
281 279
282 host_->SetOutputSurface(std::move(delegating_output_surface)); 280 host_->SetOutputSurface(std::move(delegating_output_surface));
283 output_surface_request_pending_ = false; 281 output_surface_request_pending_ = false;
284 } 282 }
285 283
286 } // namespace client 284 } // namespace client
287 } // namespace blimp 285 } // namespace blimp
OLDNEW
« no previous file with comments | « no previous file | cc/debug/micro_benchmark_controller_unittest.cc » ('j') | ui/compositor/compositor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698