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

Unified Diff: ui/compositor/compositor.cc

Issue 953803005: ui: Move software fallback decisions to GpuProcessTransportFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fallback: winfixandshould Created 5 years, 10 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 | « ui/compositor/compositor.h ('k') | ui/compositor/test/in_process_context_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
void Compositor::DidCommit() {
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/test/in_process_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698