diff options
| author | 2011-01-13 17:53:01 -0800 | |
|---|---|---|
| committer | 2011-01-13 17:53:01 -0800 | |
| commit | ad456f9878ff7c176499e7b992f9ff1cb3e9cdee (patch) | |
| tree | eb872776112b6ad6b4e247d56305d1563bd46686 /services/surfaceflinger/LayerBase.cpp | |
| parent | a034863a11ffc63be309ce01fcbd7d7c1e62b4c6 (diff) | |
fix [3312683] Camera mirroring problem after switching from back to front camera
the crop as well as buffer orientation can change at every frame, when that happens
we need to reset the hwc HAL (ie: set the GEOMETRY_CHANGED flag).
currently we achieve this by taking the same code path than an actual geometry change
which is a bit more heavy than necessary.
Change-Id: I751f9ed1eeec0c27db7df2e77d5d17c6bcc17a24
Diffstat (limited to 'services/surfaceflinger/LayerBase.cpp')
| -rw-r--r-- | services/surfaceflinger/LayerBase.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp index 8a021cbfc9..0c1fcf9124 100644 --- a/services/surfaceflinger/LayerBase.cpp +++ b/services/surfaceflinger/LayerBase.cpp @@ -503,12 +503,18 @@ void LayerBase::drawWithOpenGL(const Region& clip, const Texture& texture) const 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 |