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

Commit 7bdbb16a authored by Brint E. Kriebel's avatar Brint E. Kriebel
Browse files

Merge remote-tracking branch 'github/cm-11.0' into HEAD

parents a4709462 a8669f44
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -17,13 +17,13 @@
# Provides overrides to configure the HWUI memory limits

PRODUCT_PROPERTY_OVERRIDES += \
    ro.hwui.texture_cache_size=48 \
    ro.hwui.layer_cache_size=32 \
    ro.hwui.r_buffer_cache_size=4 \
    ro.hwui.path_cache_size=24 \
    ro.hwui.texture_cache_size=72 \
    ro.hwui.layer_cache_size=48 \
    ro.hwui.r_buffer_cache_size=8 \
    ro.hwui.path_cache_size=32 \
    ro.hwui.gradient_cache_size=1 \
    ro.hwui.drop_shadow_cache_size=5 \
    ro.hwui.texture_cache_flushrate=0.5 \
    ro.hwui.drop_shadow_cache_size=6 \
    ro.hwui.texture_cache_flushrate=0.4 \
    ro.hwui.text_small_cache_width=1024 \
    ro.hwui.text_small_cache_height=1024 \
    ro.hwui.text_large_cache_width=2048 \
+5 −1
Original line number Diff line number Diff line
@@ -61,7 +61,11 @@ public:
        bool nonNull = reply.readInt32();
        if (nonNull) {
            *buf = new GraphicBuffer();
            reply.read(**buf);
            result = reply.read(**buf);
            if(result != NO_ERROR) {
                (*buf).clear();
                return result;
            }
        }
        result = reply.readInt32();
        return result;
+10 −0
Original line number Diff line number Diff line
@@ -368,6 +368,16 @@ int Surface::query(int what, int* value) const {
                }
                return err;
            }
            case NATIVE_WINDOW_CONSUMER_USAGE_BITS: {
                status_t err = NO_ERROR;
                err = mGraphicBufferProducer->query(what, value);
                if(err == NO_ERROR) {
                    *value |= mReqUsage;
                    return NO_ERROR;
                } else {
                    return err;
                }
            }
        }
    }
    return mGraphicBufferProducer->query(what, value);
+2 −0
Original line number Diff line number Diff line
@@ -311,6 +311,8 @@ status_t GraphicBuffer::unflatten(
    if (handle != 0) {
        status_t err = mBufferMapper.registerBuffer(handle);
        if (err != NO_ERROR) {
            width = height = stride = format = usage = 0;
            handle = NULL;
            ALOGE("unflatten: registerBuffer failed: %s (%d)",
                    strerror(-err), err);
            return err;
+16 −4
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ DisplayDevice::DisplayDevice(
      mSecureLayerVisible(false),
      mScreenAcquired(false),
      mLayerStack(NO_LAYER_STACK),
      mHardwareOrientation(0),
      mOrientation()
{
    mNativeWindow = new Surface(producer, false);
@@ -114,7 +115,12 @@ DisplayDevice::DisplayDevice(
    // was created with createDisplay().
    switch (mType) {
        case DISPLAY_PRIMARY:
            char value[PROPERTY_VALUE_MAX];
            mDisplayName = "Built-in Screen";

            /* hwrotation applies only to the primary display */
            property_get("ro.sf.hwrotation", value, "0");
            mHardwareOrientation = atoi(value);
            break;
        case DISPLAY_EXTERNAL:
            mDisplayName = "HDMI Screen";
@@ -367,9 +373,7 @@ status_t DisplayDevice::orientationToTransfrom(
        int orientation, int w, int h, Transform* tr)
{
    uint32_t flags = 0;
    char value[PROPERTY_VALUE_MAX];
    property_get("ro.sf.hwrotation", value, "0");
    int additionalRot = atoi(value);
    int additionalRot = this->getHardwareOrientation();

    if (additionalRot) {
        additionalRot /= 90;
@@ -416,8 +420,12 @@ void DisplayDevice::setProjection(int orientation,
    if (!frame.isValid()) {
        // the destination frame can be invalid if it has never been set,
        // in that case we assume the whole display frame.
        if ((mHardwareOrientation/90) & DisplayState::eOrientationSwapMask) {
            frame = Rect(h, w);
        } else {
            frame = Rect(w, h);
        }
    }

    if (viewport.isEmpty()) {
        // viewport can be invalid if it has never been set, in that case
@@ -471,6 +479,10 @@ void DisplayDevice::setProjection(int orientation,
    mFrame = frame;
}

int DisplayDevice::getHardwareOrientation() {
    return mHardwareOrientation;
}

void DisplayDevice::dump(String8& result) const {
    const Transform& tr(mGlobalTransform);
    result.appendFormat(
Loading