Fix some const-ness and comments
mDrawingState doesn't need to be accessed by the
mStateLock, because by definition it's only accessed
from the main thread.
Similarily, the list of layers in the drawing state
cannot change (ie: is const).
Change-Id: I2e5da7f4d8caee7af7802b432cd45cc81c7c08b0
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 9566819..0964848 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -304,7 +304,7 @@
Vector< sp<LayerBase> >& ditchedLayers);
void computeVisibleRegions(
- LayerVector& currentLayers,
+ const LayerVector& currentLayers,
Region& dirtyRegion,
Region& wormholeRegion);
@@ -371,7 +371,6 @@
// access must be protected by mStateLock
mutable Mutex mStateLock;
State mCurrentState;
- State mDrawingState;
volatile int32_t mTransactionFlags;
volatile int32_t mTransactionCount;
Condition mTransactionCV;
@@ -395,6 +394,7 @@
// Can only accessed from the main thread, these members
// don't need synchronization
+ State mDrawingState;
Region mDirtyRegion;
Region mDirtyRegionRemovedLayer;
Region mInvalidRegion;