summaryrefslogtreecommitdiffstats
path: root/libs/ui
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-08-19 17:46:26 -0700
committerMathias Agopian <mathias@google.com>2009-08-19 17:46:26 -0700
commit18b6b49ea5235fb6c0802db9a0cc2c6dd20646cb (patch)
tree99d8c9f592a961c1af7f583792f4178bce2cc89f /libs/ui
parentb2f8450db8dfbc05724624f93d9ec5e65f0b7e54 (diff)
downloadframeworks_base-18b6b49ea5235fb6c0802db9a0cc2c6dd20646cb.zip
frameworks_base-18b6b49ea5235fb6c0802db9a0cc2c6dd20646cb.tar.gz
frameworks_base-18b6b49ea5235fb6c0802db9a0cc2c6dd20646cb.tar.bz2
fix a bug that caused the PixelFormat viewed by Surface to be wrong.
what happened is that the efective pixel format is calculated by SF but Surface nevew had access to it directly. in particular this caused query(FORMAT) to return the requested format instead of the effective format.
Diffstat (limited to 'libs/ui')
-rw-r--r--libs/ui/ISurfaceFlingerClient.cpp10
-rw-r--r--libs/ui/Surface.cpp3
2 files changed, 10 insertions, 3 deletions
diff --git a/libs/ui/ISurfaceFlingerClient.cpp b/libs/ui/ISurfaceFlingerClient.cpp
index 51e8422..4a6a1d7 100644
--- a/libs/ui/ISurfaceFlingerClient.cpp
+++ b/libs/ui/ISurfaceFlingerClient.cpp
@@ -189,8 +189,11 @@ status_t BnSurfaceFlingerClient::onTransact(
status_t ISurfaceFlingerClient::surface_data_t::readFromParcel(const Parcel& parcel)
{
- token = parcel.readInt32();
- identity = parcel.readInt32();
+ token = parcel.readInt32();
+ identity = parcel.readInt32();
+ width = parcel.readInt32();
+ height = parcel.readInt32();
+ format = parcel.readInt32();
return NO_ERROR;
}
@@ -198,6 +201,9 @@ status_t ISurfaceFlingerClient::surface_data_t::writeToParcel(Parcel* parcel) co
{
parcel->writeInt32(token);
parcel->writeInt32(identity);
+ parcel->writeInt32(width);
+ parcel->writeInt32(height);
+ parcel->writeInt32(format);
return NO_ERROR;
}
diff --git a/libs/ui/Surface.cpp b/libs/ui/Surface.cpp
index 0ba0a65..36a10cf 100644
--- a/libs/ui/Surface.cpp
+++ b/libs/ui/Surface.cpp
@@ -197,7 +197,8 @@ SurfaceControl::SurfaceControl(
uint32_t w, uint32_t h, PixelFormat format, uint32_t flags)
: mClient(client), mSurface(surface),
mToken(data.token), mIdentity(data.identity),
- mWidth(w), mHeight(h), mFormat(format), mFlags(flags)
+ mWidth(data.width), mHeight(data.height), mFormat(data.format),
+ mFlags(flags)
{
}