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

Unified Diff: cc/scheduler/scheduler_state_machine.cc

Issue 14772021: cc::OutputSurfaceClient::InitializeForGL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Do not drop resources since coming from resourceless software mode Created 7 years, 6 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: cc/scheduler/scheduler_state_machine.cc
diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc
index 01252dd7aff1c21a0330eb5c9598a567658a6eb1..3dce1426923c3962f8b68677ad75f909bdab4486 100644
--- a/cc/scheduler/scheduler_state_machine.cc
+++ b/cc/scheduler/scheduler_state_machine.cc
@@ -430,7 +430,14 @@ void SchedulerStateMachine::SetHasPendingTree(bool has_pending_tree) {
void SchedulerStateMachine::SetCanDraw(bool can) { can_draw_ = can; }
void SchedulerStateMachine::DidCreateAndInitializeOutputSurface() {
- DCHECK_EQ(output_surface_state_, OUTPUT_SURFACE_CREATING);
+ DCHECK(output_surface_state_ == OUTPUT_SURFACE_CREATING ||
+ output_surface_state_ == OUTPUT_SURFACE_ACTIVE);
+
+ // This can be called from LayerTreeHost::DeferredInitialize while an output
danakj 2013/06/05 21:53:32 Pretty sure LTH isn't calling the scheduler :)
+ // surface is already active.
danakj 2013/06/05 21:53:32 nit: double space
+ if (output_surface_state_ == OUTPUT_SURFACE_ACTIVE)
+ return;
+
output_surface_state_ = OUTPUT_SURFACE_ACTIVE;
if (did_create_and_initialize_first_output_surface_) {

Powered by Google App Engine
This is Rietveld 408576698