diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-04-26 15:50:31 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-04-26 15:50:31 -0700 |
commit | 97d5c418730946a0332f601cd140ed0b12ea19c1 (patch) | |
tree | 2b04ba44d4ecc2b20f46c95878c3b4c9f49c8088 /core/java/android | |
parent | 80b2760332f0c9af3757597ae6e5e5ab6bb69c38 (diff) | |
download | frameworks_base-97d5c418730946a0332f601cd140ed0b12ea19c1.zip frameworks_base-97d5c418730946a0332f601cd140ed0b12ea19c1.tar.gz frameworks_base-97d5c418730946a0332f601cd140ed0b12ea19c1.tar.bz2 |
Remove unused pipelining optimization.
Bug: 6375101
Change-Id: I5fcbbabfafae9e1661adac7b2becc748e42c4b66
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/view/Choreographer.java | 74 | ||||
-rw-r--r-- | core/java/android/view/ViewRootImpl.java | 1 |
2 files changed, 0 insertions, 75 deletions
diff --git a/core/java/android/view/Choreographer.java b/core/java/android/view/Choreographer.java index 1cb15a6..4866889 100644 --- a/core/java/android/view/Choreographer.java +++ b/core/java/android/view/Choreographer.java @@ -69,18 +69,9 @@ public final class Choreographer { private static final boolean USE_VSYNC = SystemProperties.getBoolean( "debug.choreographer.vsync", true); - // Enable/disable allowing traversals to proceed immediately if no drawing occurred - // during the previous frame. When true, the Choreographer can degrade more gracefully - // if drawing takes longer than a frame, but it may potentially block in eglSwapBuffers() - // if there are two dirty buffers enqueued. - // When false, we always schedule traversals on strict vsync boundaries. - private static final boolean USE_PIPELINING = SystemProperties.getBoolean( - "debug.choreographer.pipeline", false); - private static final int MSG_DO_FRAME = 0; private static final int MSG_DO_SCHEDULE_VSYNC = 1; private static final int MSG_DO_SCHEDULE_CALLBACK = 2; - private static final int MSG_DO_TRAVERSAL = 3; private final Object mLock = new Object(); @@ -94,8 +85,6 @@ public final class Choreographer { private boolean mFrameScheduled; private long mLastFrameTime; - private boolean mDrewLastFrame; - private boolean mTraversalScheduled; /** * Callback type: Input callback. Runs first. @@ -236,35 +225,11 @@ public final class Choreographer { } synchronized (mLock) { - if (USE_PIPELINING && callbackType == CALLBACK_INPUT) { - Message msg = Message.obtain(mHandler, action); - msg.setAsynchronous(true); - mHandler.sendMessage(msg); - return; - } - final long now = SystemClock.uptimeMillis(); final long dueTime = now + delayMillis; mCallbackQueues[callbackType].addCallbackLocked(dueTime, action, token); if (dueTime <= now) { - if (USE_PIPELINING && callbackType == CALLBACK_TRAVERSAL) { - if (!mDrewLastFrame) { - if (DEBUG) { - Log.d(TAG, "Scheduling traversal immediately."); - } - if (!mTraversalScheduled) { - mTraversalScheduled = true; - Message msg = mHandler.obtainMessage(MSG_DO_TRAVERSAL); - msg.setAsynchronous(true); - mHandler.sendMessageAtTime(msg, dueTime); - } - return; - } - if (DEBUG) { - Log.d(TAG, "Scheduling traversal on next frame."); - } - } scheduleFrameLocked(now); } else { Message msg = mHandler.obtainMessage(MSG_DO_SCHEDULE_CALLBACK, action); @@ -305,27 +270,6 @@ public final class Choreographer { } } - /** - * Tells the choreographer that the application has actually drawn to a surface. - * - * It uses this information to determine whether to draw immediately or to - * post a draw to the next vsync because it might otherwise block. - */ - public void notifyDrawOccurred() { - if (DEBUG) { - Log.d(TAG, "Draw occurred."); - } - - if (USE_PIPELINING) { - synchronized (mLock) { - if (!mDrewLastFrame) { - mDrewLastFrame = true; - scheduleFrameLocked(SystemClock.uptimeMillis()); - } - } - } - } - private void scheduleFrameLocked(long now) { if (!mFrameScheduled) { mFrameScheduled = true; @@ -363,7 +307,6 @@ public final class Choreographer { } mFrameScheduled = false; mLastFrameTime = SystemClock.uptimeMillis(); - mDrewLastFrame = false; } doCallbacks(Choreographer.CALLBACK_INPUT); @@ -382,11 +325,6 @@ public final class Choreographer { synchronized (mLock) { start = SystemClock.uptimeMillis(); callbacks = mCallbackQueues[callbackType].extractDueCallbacksLocked(start); - - if (USE_PIPELINING && callbackType == CALLBACK_TRAVERSAL && mTraversalScheduled) { - mTraversalScheduled = false; - mHandler.removeMessages(MSG_DO_TRAVERSAL); - } } if (callbacks != null) { @@ -428,15 +366,6 @@ public final class Choreographer { } } - void doTraversal() { - synchronized (mLock) { - if (mTraversalScheduled) { - mTraversalScheduled = false; - doCallbacks(CALLBACK_TRAVERSAL); - } - } - } - private void scheduleVsyncLocked() { mDisplayEventReceiver.scheduleVsync(); } @@ -483,9 +412,6 @@ public final class Choreographer { case MSG_DO_SCHEDULE_CALLBACK: doScheduleCallback(msg.arg1); break; - case MSG_DO_TRAVERSAL: - doTraversal(); - break; } } } diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 59f0917..d4c9aca 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -1994,7 +1994,6 @@ public final class ViewRootImpl implements ViewParent, final boolean fullRedrawNeeded = mFullRedrawNeeded; mFullRedrawNeeded = false; - mChoreographer.notifyDrawOccurred(); Trace.traceBegin(Trace.TRACE_TAG_VIEW, "draw"); try { |