Skip to content

Commit d514fe7

Browse files
committed
DO NOT MERGE
Change BootAnimation's initial display size query to check a system property instead of the SurfaceFlinger's display size (which comes from the frame buffer) in case the hwc choose a display size that is smaller than the full frame buffer. The hwc would do this if the monitor's preferred/native resolution is less than 1080p. Change-Id: I33bf06fe06a21e778cf3f23eaf0374346a6e2aa0 Signed-off-by: Mike J. Chen <mjchen@google.com>
1 parent 1903a73 commit d514fe7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

cmds/bootanimation/BootAnimation.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,14 @@ status_t BootAnimation::readyToRun() {
213213
mAssets.addDefaultAssets();
214214

215215
DisplayInfo dinfo;
216-
status_t status = session()->getDisplayInfo(0, &dinfo);
217-
if (status)
218-
return -1;
216+
char display_size[PROPERTY_VALUE_MAX];
217+
218+
if (property_get("sys.display-size", display_size, "") <= 0 ||
219+
sscanf(display_size, "%dx%d", &dinfo.w, &dinfo.h) != 2) {
220+
status_t status = session()->getDisplayInfo(0, &dinfo);
221+
if (status)
222+
return -1;
223+
}
219224

220225
// create the native surface
221226
sp<SurfaceControl> control = session()->createSurface(

0 commit comments

Comments
 (0)