Revert "Make stopped state a first-class thing"

This reverts commit 945961f78a.

Change-Id: Iebc1d49fac33380233f8785fc39bec6c30a5e714
This commit is contained in:
John Reck
2016-04-11 20:49:28 +00:00
parent 945961f78a
commit eab3f2658a
9 changed files with 25 additions and 63 deletions

View File

@ -113,7 +113,7 @@ bool DrawFrameTask::syncFrameState(TreeInfo& info) {
ATRACE_CALL();
int64_t vsync = mFrameInfo[static_cast<int>(FrameInfoIndex::Vsync)];
mRenderThread->timeLord().vsyncReceived(vsync);
bool canDraw = mContext->makeCurrent();
mContext->makeCurrent();
Caches::getInstance().textureCache.resetMarkInUse(mContext);
for (size_t i = 0; i < mLayers.size(); i++) {
@ -124,9 +124,8 @@ bool DrawFrameTask::syncFrameState(TreeInfo& info) {
// This is after the prepareTree so that any pending operations
// (RenderNode tree state, prefetched layers, etc...) will be flushed.
if (CC_UNLIKELY(!mContext->hasSurface() || !canDraw)) {
if (CC_UNLIKELY(!mContext->hasSurface())) {
mSyncResult |= kSync_LostSurfaceRewardIfFound;
info.out.canDrawThisFrame = false;
}
if (info.out.hasAnimations) {