Loading core/java/android/view/ViewRoot.java +5 −2 Original line number Diff line number Diff line Loading @@ -502,6 +502,11 @@ public final class ViewRoot extends Handler implements ViewParent, (attrs.flags & WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED) != 0; if (hardwareAccelerated) { if (!HardwareRenderer.isAvailable()) { mAttachInfo.mHardwareAccelerationRequested = true; return; } // Only enable hardware acceleration if we are not in the system process // The window manager creates ViewRoots to display animated preview windows // of launching apps and we don't want those to be hardware accelerated Loading @@ -524,8 +529,6 @@ public final class ViewRoot extends Handler implements ViewParent, mAttachInfo.mHardwareRenderer = HardwareRenderer.createGlRenderer(2, translucent); mAttachInfo.mHardwareAccelerated = mAttachInfo.mHardwareAccelerationRequested = mAttachInfo.mHardwareRenderer != null; } else if (HardwareRenderer.isAvailable()) { mAttachInfo.mHardwareAccelerationRequested = true; } } } Loading libs/hwui/DisplayListRenderer.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -93,7 +93,9 @@ void DisplayList::clearResources() { mPaints.clear(); for (size_t i = 0; i < mPaths.size(); i++) { delete mPaths.itemAt(i); SkPath* path = mPaths.itemAt(i); caches.pathCache.remove(path); delete path; } mPaths.clear(); Loading libs/hwui/ShapeCache.h +5 −2 Original line number Diff line number Diff line Loading @@ -89,8 +89,11 @@ struct ShapeCacheEntry { join = SkPaint::kDefault_Join; cap = SkPaint::kDefault_Cap; style = SkPaint::kFill_Style; miter = 4.0f; strokeWidth = 1.0f; float v = 4.0f; miter = *(uint32_t*) &v; v = 1.0f; strokeWidth = *(uint32_t*) &v; pathEffect = NULL; } ShapeCacheEntry(const ShapeCacheEntry& entry): Loading Loading
core/java/android/view/ViewRoot.java +5 −2 Original line number Diff line number Diff line Loading @@ -502,6 +502,11 @@ public final class ViewRoot extends Handler implements ViewParent, (attrs.flags & WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED) != 0; if (hardwareAccelerated) { if (!HardwareRenderer.isAvailable()) { mAttachInfo.mHardwareAccelerationRequested = true; return; } // Only enable hardware acceleration if we are not in the system process // The window manager creates ViewRoots to display animated preview windows // of launching apps and we don't want those to be hardware accelerated Loading @@ -524,8 +529,6 @@ public final class ViewRoot extends Handler implements ViewParent, mAttachInfo.mHardwareRenderer = HardwareRenderer.createGlRenderer(2, translucent); mAttachInfo.mHardwareAccelerated = mAttachInfo.mHardwareAccelerationRequested = mAttachInfo.mHardwareRenderer != null; } else if (HardwareRenderer.isAvailable()) { mAttachInfo.mHardwareAccelerationRequested = true; } } } Loading
libs/hwui/DisplayListRenderer.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -93,7 +93,9 @@ void DisplayList::clearResources() { mPaints.clear(); for (size_t i = 0; i < mPaths.size(); i++) { delete mPaths.itemAt(i); SkPath* path = mPaths.itemAt(i); caches.pathCache.remove(path); delete path; } mPaths.clear(); Loading
libs/hwui/ShapeCache.h +5 −2 Original line number Diff line number Diff line Loading @@ -89,8 +89,11 @@ struct ShapeCacheEntry { join = SkPaint::kDefault_Join; cap = SkPaint::kDefault_Cap; style = SkPaint::kFill_Style; miter = 4.0f; strokeWidth = 1.0f; float v = 4.0f; miter = *(uint32_t*) &v; v = 1.0f; strokeWidth = *(uint32_t*) &v; pathEffect = NULL; } ShapeCacheEntry(const ShapeCacheEntry& entry): Loading