Skip to content

Pie : patch framework source

Peter Yoon edited this page May 12, 2019 · 6 revisions

Put delay in android.hardware.graphics.allocator

Until android.hardware.graphics.mapper retain the buffer.

Apply following patch under hardware/interfaces.

graphics/allocator/2.0/utils/hal/include/allocator-hal/2.0/Allocator.h
@@ line 66 @@ class AllocatorImpl : public Interface {
     hidl_vec<hidl_handle> hidlBuffers(buffers.cbegin(), buffers.cend());
     hidl_cb(Error::NONE, stride, hidlBuffers);
+    usleep(1000);
     // free the local handles
     mHal->freeBuffers(buffers);

Limit SurfaceSize in com.android.server.wm.DisplayContent

Since rpi3 max texture size is 2048x2048,

Apply following patch under frameworks/base.

services/core/java/com/android/server/wm/DisplayContent.java
@@ line 773 @@ class DisplayContent
     mSurfaceSize = Math.max(mBaseDisplayHeight, mBaseDisplayWidth) * 2;
+    if (mSurfaceSize > 2048) mSurfaceSize = 2048;
     final SurfaceControl.Builder b = mService.makeSurfaceBuilder(mSession)
Clone this wiki locally