void LayerBase::setBufferCrop(const Rect& crop) {
if (!crop.isEmpty()) {
- mBufferCrop = crop;
+ if (mBufferCrop != crop) {
+ mBufferCrop = crop;
+ mFlinger->invalidateHwcGeometry();
+ }
}
}
void LayerBase::setBufferTransform(uint32_t transform) {
- mBufferTransform = transform;
+ if (mBufferTransform != transform) {
+ mBufferTransform = transform;
+ mFlinger->invalidateHwcGeometry();
+ }
}
void LayerBase::dump(String8& result, char* buffer, size_t SIZE) const
handleTransactionLocked(transactionFlags, ditchedLayers);
mLastTransactionTime = systemTime() - now;
mDebugInTransaction = 0;
- mHwWorkListDirty = true;
+ invalidateHwcGeometry();
// here the transaction has been committed
}
mWormholeRegion = screenRegion.subtract(opaqueRegion);
mVisibleRegionsDirty = false;
- mHwWorkListDirty = true;
+ invalidateHwcGeometry();
}
unlockPageFlip(currentLayers);
mDirtyRegion.andSelf(screenRegion);
}
+void SurfaceFlinger::invalidateHwcGeometry()
+{
+ mHwWorkListDirty = true;
+}
+
bool SurfaceFlinger::lockPageFlip(const LayerVector& currentLayers)
{
bool recomputeVisibleRegions = false;
case 1008: // toggle use of hw composer
n = data.readInt32();
mDebugDisableHWC = n ? 1 : 0;
- mHwWorkListDirty = true;
+ invalidateHwcGeometry();
// fall-through...
case 1004:{ // repaint everything
Mutex::Autolock _l(mStateLock);
status_t removeLayer(const sp<LayerBase>& layer);
status_t addLayer(const sp<LayerBase>& layer);
status_t invalidateLayerVisibility(const sp<LayerBase>& layer);
+ void invalidateHwcGeometry();
sp<Layer> getLayer(const sp<ISurface>& sur) const;