Loading build/phone-xxhdpi-2048-hwui-memory.mk +6 −6 Original line number Diff line number Diff line Loading @@ -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 \ Loading libs/gui/IGraphicBufferProducer.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -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; Loading libs/gui/Surface.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -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); Loading libs/ui/GraphicBuffer.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -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; Loading services/surfaceflinger/DisplayDevice.cpp 100644 → 100755 +16 −4 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ DisplayDevice::DisplayDevice( mSecureLayerVisible(false), mScreenAcquired(false), mLayerStack(NO_LAYER_STACK), mHardwareOrientation(0), mOrientation() { mNativeWindow = new Surface(producer, false); Loading Loading @@ -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"; Loading Loading @@ -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; Loading Loading @@ -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 Loading Loading @@ -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 Loading
build/phone-xxhdpi-2048-hwui-memory.mk +6 −6 Original line number Diff line number Diff line Loading @@ -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 \ Loading
libs/gui/IGraphicBufferProducer.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -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; Loading
libs/gui/Surface.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -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); Loading
libs/ui/GraphicBuffer.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -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; Loading
services/surfaceflinger/DisplayDevice.cpp 100644 → 100755 +16 −4 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ DisplayDevice::DisplayDevice( mSecureLayerVisible(false), mScreenAcquired(false), mLayerStack(NO_LAYER_STACK), mHardwareOrientation(0), mOrientation() { mNativeWindow = new Surface(producer, false); Loading Loading @@ -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"; Loading Loading @@ -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; Loading Loading @@ -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 Loading Loading @@ -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