Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d904207b authored by Steve Kondik's avatar Steve Kondik
Browse files

Revert "libhwui: make surface buffer allocation asynchronous"

This reverts commit a9cdd4ff.

Change-Id: I3be8069c365cc213c9d57d513c1de5be42ace055
parent a0b5d767
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1721,6 +1721,12 @@ public final class ViewRootImpl implements ViewParent,
                            try {
                                hwInitialized = mAttachInfo.mHardwareRenderer.initialize(
                                        mSurface);
                                if (hwInitialized && (host.mPrivateFlags
                                        & View.PFLAG_REQUEST_TRANSPARENT_REGIONS) == 0) {
                                    // Don't pre-allocate if transparent regions
                                    // are requested as they may not be needed
                                    mSurface.allocateBuffers();
                                }
                            } catch (OutOfResourcesException e) {
                                handleOutOfResourcesException(e);
                                return;
+0 −5
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@
#include <strings.h>
#include <cutils/properties.h>
#include <private/hwui/DrawGlInfo.h>
#include <gui/Surface.h>

#define TRIM_MEMORY_COMPLETE 80
#define TRIM_MEMORY_UI_HIDDEN 20
@@ -116,10 +115,6 @@ bool CanvasContext::initialize(ANativeWindow* window) {
    if (mCanvas) return false;
    mCanvas = new OpenGLRenderer(mRenderThread.renderState());
    mCanvas->initProperties();
    if (window) {
        Surface *s = static_cast<Surface*>(window);
        s->allocateBuffers();
    }
    return true;
}