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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 1394263004: android webview: allow cc to fail hardware draw (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests compile but crash Created 5 years, 2 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/output/output_surface.h ('k') | cc/test/fake_output_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler_state_machine.cc
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
index 661dc7aace4712f57995bb1be623b3bc953af1d8..4f2db8f50f73489852f8888a5bf0107292d4ee43 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -256,8 +256,6 @@ bool SchedulerStateMachine::PendingDrawsShouldBeAborted() const {
// software draws could be scheduled by the Android OS at any time and draws
// should not be aborted in this case.
bool is_output_surface_lost = (output_surface_state_ == OUTPUT_SURFACE_NONE);
- if (settings_.using_synchronous_renderer_compositor)
- return is_output_surface_lost || !can_draw_;
// These are all the cases where we normally cannot or do not want to draw
// but, if needs_redraw_ is true and we do not draw to make forward progress,
@@ -265,7 +263,12 @@ bool SchedulerStateMachine::PendingDrawsShouldBeAborted() const {
// This should be a superset of PendingActivationsShouldBeForced() since
// activation of the pending tree is blocked by drawing of the active tree and
// the main thread might be blocked on activation of the most recent commit.
- return is_output_surface_lost || !can_draw_ || !visible_;
+ // Note deliverately not checking |visible_| here because |can_draw_| already
+ // incorporates |visible_| state.
+ // TODO(boliu): This contradicts comment above that
boliu 2015/10/09 18:09:51 Question for Brian: So this patch shoves resource
boliu 2015/10/09 18:39:53 This goes a bit deeper, since resourceless softwar
+ // PendingDrawsShouldBeAborted is a superset of
+ // PendingActivationsShouldBeForced.
+ return is_output_surface_lost || !can_draw_;
}
bool SchedulerStateMachine::PendingActivationsShouldBeForced() const {
« no previous file with comments | « cc/output/output_surface.h ('k') | cc/test/fake_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698