Skip to content

Commit

Permalink
[device] ::Huawei:: HWC doesn't understand 0,0,0,0 == fullscreen dama…
Browse files Browse the repository at this point in the history
…ge. Set it to the whole visible surface

Change-Id: Idb01e9c7a91e2bb242ee8b389c24bd9680ffc3d4
  • Loading branch information
phhusson committed Jan 4, 2018
1 parent 4f08186 commit 632d84f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion services/surfaceflinger/Layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,10 @@ void Layer::setPerFrameData(const sp<const DisplayDevice>& displayDevice) {
visible.dump(LOG_TAG);
}

error = hwcLayer->setSurfaceDamage(surfaceDamageRegion);
if(surfaceDamageRegion.getBounds() == Rect::INVALID_RECT)
error = hwcLayer->setSurfaceDamage(visible);
else
error = hwcLayer->setSurfaceDamage(surfaceDamageRegion);
if (error != HWC2::Error::None) {
ALOGE("[%s] Failed to set surface damage: %s (%d)", mName.string(),
to_string(error).c_str(), static_cast<int32_t>(error));
Expand Down

0 comments on commit 632d84f

Please sign in to comment.