SurfaceFlinger: Prevent deadlock by updating an atomic layer set.

Bug: 12934849

Change-Id: I9dede7316f1e967de4140bd731ac810115ea302f
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 2d8084d..765f179 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -277,6 +277,11 @@
      */
     Rect getContentCrop() const;
 
+    /*
+     * Returns if a frame is queued.
+     */
+    bool hasQueuedFrame() const { return mQueuedFrames > 0; }
+
     // -----------------------------------------------------------------------
 
     void clearWithOpenGL(const sp<const DisplayDevice>& hw, const Region& clip) const;