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

Commit bb5da058 authored by David 'Digit' Turner's avatar David 'Digit' Turner
Browse files

pixelflinger: back-port AOSP master version.

Pixelflinger doesn't have an x86 JIT, and the generic scanline()
routine is _extremely_ slow. This makes UI performance very slow.
when running full_x86-eng under emulation.

This patch back-ports the AOSP master pixelflinger into the
gingerbread branch. This essentially contains more than a dozen
new "shortcut" scanline functions used to speed-up the pixel
operations that are mostly used with the normal widget UI.

GL applications (e.g. Gallery3D) will still be very slow, but
this makes the home screen, app launcher, settings and many
simple applications work with very usable performance.

Change-Id: Ia64d8dd2e46820f07e98c4c9a4ec831b59fc61e4
parent 0f1b4f37
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

#
# ARMv6 specific objects
#

ifeq ($(TARGET_ARCH),arm)
LOCAL_ASFLAGS := -march=armv6
LOCAL_SRC_FILES := rotate90CW_4x4_16v6.S
LOCAL_MODULE := libpixelflinger_armv6
include $(BUILD_STATIC_LIBRARY)
endif

#
# C/C++ and ARMv5 objects
#
@@ -77,10 +66,6 @@ ifneq ($(BUILD_TINY_ANDROID),true)
LOCAL_SHARED_LIBRARIES += libhardware_legacy
LOCAL_CFLAGS += -DWITH_LIB_HARDWARE
endif

ifeq ($(TARGET_ARCH),arm)
LOCAL_WHOLE_STATIC_LIBRARIES := libpixelflinger_armv6
endif
include $(BUILD_SHARED_LIBRARY)

#
@@ -91,9 +76,6 @@ include $(CLEAR_VARS)
LOCAL_MODULE:= libpixelflinger_static
LOCAL_SRC_FILES := $(PIXELFLINGER_SRC_FILES)
LOCAL_CFLAGS := $(PIXELFLINGER_CFLAGS) 
ifeq ($(TARGET_ARCH),arm)
LOCAL_WHOLE_STATIC_LIBRARIES := libpixelflinger_armv6
endif
include $(BUILD_STATIC_LIBRARY)


+11 −1
Original line number Diff line number Diff line
@@ -334,7 +334,7 @@ void ARMAssembler::LDM(int cc, int dir,

void ARMAssembler::STM(int cc, int dir,
        int Rn, int W, uint32_t reg_list)
{   //                    FA EA FD ED      IB IA DB DA
{   //                    ED FD EA FA      IB IA DB DA
    const uint8_t P[8] = { 0, 1, 0, 1,      1, 0, 1, 0 };
    const uint8_t U[8] = { 0, 0, 1, 1,      1, 1, 0, 0 };
    *mPC++ = (cc<<28) | (4<<25) | (uint32_t(P[dir])<<24) |
@@ -433,6 +433,16 @@ void ARMAssembler::UXTB16(int cc, int Rd, int Rm, int rotate)
{
    *mPC++ = (cc<<28) | 0x6CF0070 | (Rd<<12) | ((rotate >> 3) << 10) | Rm;
}
#if 0
#pragma mark -
#pragma mark Bit manipulation (ARMv7+ only)...
#endif

// Bit manipulation (ARMv7+ only)...
void ARMAssembler::UBFX(int cc, int Rd, int Rn, int lsb, int width)
{
    *mPC++ = (cc<<28) | 0x7E00000 | ((width-1)<<16) | (Rd<<12) | (lsb<<7) | 0x50 | Rn;
}

}; // namespace android
+1 −0
Original line number Diff line number Diff line
@@ -124,6 +124,7 @@ public:
    virtual void SMLAW(int cc, int y,
                int Rd, int Rm, int Rs, int Rn);
    virtual void UXTB16(int cc, int Rd, int Rm, int rotate);
    virtual void UBFX(int cc, int Rd, int Rn, int lsb, int width);

private:
                ARMAssembler(const ARMAssembler& rhs);
+3 −0
Original line number Diff line number Diff line
@@ -206,6 +206,9 @@ public:
    // byte/half word extract...
    virtual void UXTB16(int cc, int Rd, int Rm, int rotate) = 0;

    // bit manipulation...
    virtual void UBFX(int cc, int Rd, int Rn, int lsb, int width) = 0;

    // -----------------------------------------------------------------------
    // convenience...
    // -----------------------------------------------------------------------
+4 −0
Original line number Diff line number Diff line
@@ -199,5 +199,9 @@ void ARMAssemblerProxy::UXTB16(int cc, int Rd, int Rm, int rotate) {
    mTarget->UXTB16(cc, Rd, Rm, rotate);
}

void ARMAssemblerProxy::UBFX(int cc, int Rd, int Rn, int lsb, int width) {
    mTarget->UBFX(cc, Rd, Rn, lsb, width);
}

}; // namespace android
Loading