OLD | NEW |
---|---|
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "cc/scheduler_state_machine.h" | 5 #include "cc/scheduler_state_machine.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 | 9 |
10 namespace cc { | 10 namespace cc { |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
178 m_commitState = COMMIT_STATE_FRAME_IN_PROGRESS; | 178 m_commitState = COMMIT_STATE_FRAME_IN_PROGRESS; |
179 m_needsCommit = false; | 179 m_needsCommit = false; |
180 m_needsForcedCommit = false; | 180 m_needsForcedCommit = false; |
181 return; | 181 return; |
182 | 182 |
183 case ACTION_COMMIT: | 183 case ACTION_COMMIT: |
184 if (m_expectImmediateBeginFrame) | 184 if (m_expectImmediateBeginFrame) |
185 m_commitState = COMMIT_STATE_WAITING_FOR_FIRST_FORCED_DRAW; | 185 m_commitState = COMMIT_STATE_WAITING_FOR_FIRST_FORCED_DRAW; |
186 else | 186 else |
187 m_commitState = COMMIT_STATE_WAITING_FOR_FIRST_DRAW; | 187 m_commitState = COMMIT_STATE_WAITING_FOR_FIRST_DRAW; |
188 m_needsRedraw = true; | |
nduca
2013/01/10 11:01:09
this seems really funky
| |
189 if (m_drawIfPossibleFailed) | 188 if (m_drawIfPossibleFailed) |
190 m_lastFrameNumberWhereDrawWasCalled = -1; | 189 m_lastFrameNumberWhereDrawWasCalled = -1; |
191 | 190 |
192 if (m_needsForcedRedrawAfterNextCommit) { | 191 if (m_needsForcedRedrawAfterNextCommit) { |
193 m_needsForcedRedrawAfterNextCommit = false; | 192 m_needsForcedRedrawAfterNextCommit = false; |
194 m_needsForcedRedraw = true; | 193 m_needsForcedRedraw = true; |
195 } | 194 } |
196 | 195 |
197 m_textureState = LAYER_TEXTURE_STATE_ACQUIRED_BY_IMPL_THREAD; | 196 m_textureState = LAYER_TEXTURE_STATE_ACQUIRED_BY_IMPL_THREAD; |
198 return; | 197 return; |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
348 m_outputSurfaceState = OUTPUT_SURFACE_ACTIVE; | 347 m_outputSurfaceState = OUTPUT_SURFACE_ACTIVE; |
349 setNeedsCommit(); | 348 setNeedsCommit(); |
350 } | 349 } |
351 | 350 |
352 void SchedulerStateMachine::setMaximumNumberOfFailedDrawsBeforeDrawIsForced(int numDraws) | 351 void SchedulerStateMachine::setMaximumNumberOfFailedDrawsBeforeDrawIsForced(int numDraws) |
353 { | 352 { |
354 m_maximumNumberOfFailedDrawsBeforeDrawIsForced = numDraws; | 353 m_maximumNumberOfFailedDrawsBeforeDrawIsForced = numDraws; |
355 } | 354 } |
356 | 355 |
357 } // namespace cc | 356 } // namespace cc |
OLD | NEW |