Chromium Code Reviews| Index: ui/compositor/compositor.cc |
| diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc |
| index 4793cbb136113dd161f7d323548426d5c845d84f..287eaf19751ffc5e0d4f4fe09826482f812fef7c 100644 |
| --- a/ui/compositor/compositor.cc |
| +++ b/ui/compositor/compositor.cc |
| @@ -76,7 +76,6 @@ Compositor::Compositor(gfx::AcceleratedWidget widget, |
| device_scale_factor_(0.0f), |
| last_started_frame_(0), |
| last_ended_frame_(0), |
| - num_failed_recreate_attempts_(0), |
| disable_schedule_composite_(false), |
| compositor_lock_(NULL), |
| layer_animator_collection_(this), |
| @@ -302,27 +301,16 @@ void Compositor::Layout() { |
| } |
| void Compositor::RequestNewOutputSurface() { |
| - bool fallback = |
| - num_failed_recreate_attempts_ >= OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK; |
| - context_factory_->CreateOutputSurface(weak_ptr_factory_.GetWeakPtr(), |
| - fallback); |
| + context_factory_->CreateOutputSurface(weak_ptr_factory_.GetWeakPtr()); |
| } |
| void Compositor::DidInitializeOutputSurface() { |
| - num_failed_recreate_attempts_ = 0; |
| } |
| void Compositor::DidFailToInitializeOutputSurface() { |
| - num_failed_recreate_attempts_++; |
| - |
| - // Tolerate a certain number of recreation failures to work around races |
| - // in the output-surface-lost machinery. |
| - if (num_failed_recreate_attempts_ >= MAX_OUTPUT_SURFACE_RETRIES) |
| - LOG(FATAL) << "Failed to create a fallback OutputSurface."; |
| - |
| - base::MessageLoop::current()->PostTask( |
| - FROM_HERE, base::Bind(&Compositor::RequestNewOutputSurface, |
| - weak_ptr_factory_.GetWeakPtr())); |
| + // The OutputSurface should already be bound/initialized before being given to |
| + // the Compositor. |
| + NOTREACHED(); |
|
no sievers
2015/02/25 01:51:00
Although there is also |worker_context_provider_|
enne (OOO)
2015/02/25 19:37:33
I think it'd be fine to document that this can onl
no sievers
2015/02/25 20:52:12
Sounds good then. I guess it is in the name :)
|
| } |
| void Compositor::DidCommit() { |