Remove kStatusInvoke & kStatusDraw

 They are unused

Change-Id: I44ecf1164dc6bc1b09438e733976d5a97a25f00e
diff --git a/core/java/android/view/GLRenderer.java b/core/java/android/view/GLRenderer.java
index 90824ab..f083148 100644
--- a/core/java/android/view/GLRenderer.java
+++ b/core/java/android/view/GLRenderer.java
@@ -1096,8 +1096,7 @@
             }
 
             if (checkRenderContext() != SURFACE_STATE_ERROR) {
-                int status = mCanvas.invokeFunctors(mRedrawClip);
-                handleFunctorStatus(attachInfo, status);
+                mCanvas.invokeFunctors(mRedrawClip);
             }
         }
     }
@@ -1301,7 +1300,6 @@
             mProfileData[mProfileCurrentFrame + 1] = total;
         }
 
-        handleFunctorStatus(attachInfo, status);
         return status;
     }
 
@@ -1337,26 +1335,6 @@
         }
     }
 
-    private void handleFunctorStatus(View.AttachInfo attachInfo, int status) {
-        // If the draw flag is set, functors will be invoked while executing
-        // the tree of display lists
-        if ((status & RenderNode.STATUS_DRAW) != 0) {
-            if (mRedrawClip.isEmpty()) {
-                attachInfo.mViewRootImpl.invalidate();
-            } else {
-                attachInfo.mViewRootImpl.invalidateChildInParent(null, mRedrawClip);
-                mRedrawClip.setEmpty();
-            }
-        }
-
-        if ((status & RenderNode.STATUS_INVOKE) != 0 ||
-                attachInfo.mHandler.hasCallbacks(mFunctorsRunnable)) {
-            attachInfo.mHandler.removeCallbacks(mFunctorsRunnable);
-            mFunctorsRunnable.attachInfo = attachInfo;
-            attachInfo.mHandler.postDelayed(mFunctorsRunnable, FUNCTOR_PROCESS_DELAY);
-        }
-    }
-
     @Override
     void detachFunctor(long functor) {
         if (mCanvas != null) {
diff --git a/core/java/android/view/HardwareCanvas.java b/core/java/android/view/HardwareCanvas.java
index f695b20..233f846 100644
--- a/core/java/android/view/HardwareCanvas.java
+++ b/core/java/android/view/HardwareCanvas.java
@@ -23,7 +23,7 @@
 
 /**
  * Hardware accelerated canvas.
- * 
+ *
  * @hide
  */
 public abstract class HardwareCanvas extends Canvas {
@@ -40,7 +40,7 @@
 
     /**
      * Invoked before any drawing operation is performed in this canvas.
-     * 
+     *
      * @param dirty The dirty rectangle to update, can be null.
      * @return {@link RenderNode#STATUS_DREW} if anything was drawn (such as a call to clear
      *         the canvas).
@@ -70,13 +70,11 @@
      * Draws the specified display list onto this canvas.
      *
      * @param displayList The display list to replay.
-     * @param dirty The dirty region to redraw in the next pass, matters only
-     *        if this method returns {@link RenderNode#STATUS_DRAW}, can be null.
+     * @param dirty Ignored, can be null.
      * @param flags Optional flags about drawing, see {@link RenderNode} for
      *              the possible flags.
      *
-     * @return One of {@link RenderNode#STATUS_DONE}, {@link RenderNode#STATUS_DRAW}, or
-     *         {@link RenderNode#STATUS_INVOKE}, or'd with {@link RenderNode#STATUS_DREW}
+     * @return One of {@link RenderNode#STATUS_DONE} or {@link RenderNode#STATUS_DREW}
      *         if anything was drawn.
      *
      * @hide
@@ -101,9 +99,8 @@
      * This function may return true if an invalidation is needed after the call.
      *
      * @param drawGLFunction A native function pointer
-     *                       
-     * @return One of {@link RenderNode#STATUS_DONE}, {@link RenderNode#STATUS_DRAW} or
-     *         {@link RenderNode#STATUS_INVOKE}
+     *
+     * @return {@link RenderNode#STATUS_DONE}
      *
      * @hide
      */
@@ -114,11 +111,10 @@
 
     /**
      * Invoke all the functors who requested to be invoked during the previous frame.
-     * 
-     * @param dirty The region to redraw when the functors return {@link RenderNode#STATUS_DRAW}
-     *              
-     * @return One of {@link RenderNode#STATUS_DONE}, {@link RenderNode#STATUS_DRAW} or
-     *         {@link RenderNode#STATUS_INVOKE}
+     *
+     * @param dirty Ignored
+     *
+     * @return Ignored
      *
      * @hide
      */
@@ -154,7 +150,7 @@
 
     /**
      * Indicates that the specified layer must be updated as soon as possible.
-     * 
+     *
      * @param layer The layer to update
      *
      * @see #clearLayerUpdates()
@@ -187,7 +183,7 @@
 
     /**
      * Removes all enqueued layer updates.
-     * 
+     *
      * @see #pushLayerUpdate(HardwareLayer)
      *
      * @hide
diff --git a/include/private/hwui/DrawGlInfo.h b/include/private/hwui/DrawGlInfo.h
index fc810be..3b7ba8b 100644
--- a/include/private/hwui/DrawGlInfo.h
+++ b/include/private/hwui/DrawGlInfo.h
@@ -65,14 +65,6 @@
     enum Status {
         // The functor is done
         kStatusDone = 0x0,
-        // The functor is requesting a redraw (the clip rect
-        // used by the redraw is specified by DrawGlInfo.)
-        // The rest of the UI might redraw too.
-        kStatusDraw = 0x1,
-        // The functor needs to be invoked again but will
-        // not redraw. Only the functor is invoked again
-        // (unless another functor requests a redraw.)
-        kStatusInvoke = 0x2,
         // DisplayList actually issued GL drawing commands.
         // This is used to signal the HardwareRenderer that the
         // buffers should be flipped - otherwise, there were no
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index d808735..b730d30 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -409,15 +409,6 @@
         for (size_t i = 0; i < count; i++) {
             Functor* f = functors.itemAt(i);
             result |= (*f)(DrawGlInfo::kModeProcess, &info);
-
-            if (result & DrawGlInfo::kStatusDraw) {
-                Rect localDirty(info.dirtyLeft, info.dirtyTop, info.dirtyRight, info.dirtyBottom);
-                dirty.unionWith(localDirty);
-            }
-
-            if (result & DrawGlInfo::kStatusInvoke) {
-                mFunctors.add(f);
-            }
         }
         resume();
     }
@@ -461,19 +452,10 @@
     interrupt();
 
     // call functor immediately after GL state setup
-    status_t result = (*functor)(DrawGlInfo::kModeDraw, &info);
-
-    if (result != DrawGlInfo::kStatusDone) {
-        Rect localDirty(info.dirtyLeft, info.dirtyTop, info.dirtyRight, info.dirtyBottom);
-        dirty.unionWith(localDirty);
-
-        if (result & DrawGlInfo::kStatusInvoke) {
-            mFunctors.add(functor);
-        }
-    }
+    (*functor)(DrawGlInfo::kModeDraw, &info);
 
     resume();
-    return result | DrawGlInfo::kStatusDrew;
+    return DrawGlInfo::kStatusDrew;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 8ebffc2..017fb56 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -411,7 +411,6 @@
 
     Rect outBounds;
     status |= mCanvas->drawDisplayList(displayList, outBounds);
-    handleFunctorStatus(status, outBounds);
 
     // TODO: Draw debug info
     // TODO: Performance tracking
@@ -448,22 +447,7 @@
 
     makeCurrent();
     Rect dirty;
-    int status = mCanvas->invokeFunctors(dirty);
-    handleFunctorStatus(status, dirty);
-}
-
-void CanvasContext::handleFunctorStatus(int status, const Rect& redrawClip) {
-    if (status & DrawGlInfo::kStatusDraw) {
-        // TODO: Invalidate the redrawClip
-        // Do we need to post to ViewRootImpl like the current renderer?
-        // Can we just enqueue ourselves to re-invoke the same display list?
-        // Something else entirely? Does ChromiumView still want this in a
-        // RenderThread world?
-    }
-
-    if (status & DrawGlInfo::kStatusInvoke) {
-        queueFunctorsTask();
-    }
+    mCanvas->invokeFunctors(dirty);
 }
 
 void CanvasContext::removeFunctorsTask() {
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index e3fdf97..746c1bf 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -82,7 +82,6 @@
 
     friend class InvokeFunctorsTask;
     void invokeFunctors();
-    void handleFunctorStatus(int status, const Rect& redrawClip);
     void removeFunctorsTask();
     void queueFunctorsTask(int delayMs = FUNCTOR_PROCESS_DELAY);