Loading core/java/android/hardware/OverlayProperties.java +0 −13 Original line number Diff line number Diff line Loading @@ -69,19 +69,6 @@ public final class OverlayProperties implements Parcelable { return sDefaultOverlayProperties; } /** * @return True if the device can support fp16, false otherwise. * TODO: Move this to isCombinationSupported once the flag flips * @hide */ public boolean isFp16SupportedForHdr() { if (mNativeObject == 0) { return false; } return nIsCombinationSupported( mNativeObject, DataSpace.DATASPACE_SCRGB, HardwareBuffer.RGBA_FP16); } /** * Indicates that hardware composition of a buffer encoded with the provided {@link DataSpace} * and {@link HardwareBuffer.Format} is supported on the device. Loading graphics/java/android/graphics/HardwareRenderer.java +12 −2 Original line number Diff line number Diff line Loading @@ -25,6 +25,8 @@ import android.app.ActivityManager; import android.content.Context; import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.hardware.DataSpace; import android.hardware.HardwareBuffer; import android.hardware.OverlayProperties; import android.hardware.display.DisplayManager; import android.os.IBinder; Loading Loading @@ -1417,7 +1419,14 @@ public class HardwareRenderer { nInitDisplayInfo(largestWidth, largestHeight, defaultDisplay.getRefreshRate(), wideColorDataspace, defaultDisplay.getAppVsyncOffsetNanos(), defaultDisplay.getPresentationDeadlineNanos(), overlayProperties.isFp16SupportedForHdr(), overlayProperties.isCombinationSupported( DataSpace.DATASPACE_SCRGB, HardwareBuffer.RGBA_FP16), overlayProperties.isCombinationSupported( DataSpace.pack( DataSpace.STANDARD_DCI_P3, DataSpace.TRANSFER_SRGB, DataSpace.RANGE_EXTENDED), HardwareBuffer.RGBA_10101010), overlayProperties.isMixedColorSpacesSupported()); mDisplayInitialized = true; Loading Loading @@ -1603,7 +1612,8 @@ public class HardwareRenderer { private static native void nInitDisplayInfo(int width, int height, float refreshRate, int wideColorDataspace, long appVsyncOffsetNanos, long presentationDeadlineNanos, boolean supportsFp16ForHdr, boolean nInitDisplayInfo); boolean supportsFp16ForHdr, boolean isRgba10101010SupportedForHdr, boolean nSupportMixedColorSpaces); private static native void nSetDrawingEnabled(boolean drawingEnabled); Loading libs/hwui/DeviceInfo.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -108,6 +108,10 @@ void DeviceInfo::setSupportFp16ForHdr(bool supportFp16ForHdr) { get()->mSupportFp16ForHdr = supportFp16ForHdr; } void DeviceInfo::setSupportRgba10101010ForHdr(bool supportRgba10101010ForHdr) { get()->mSupportRgba10101010ForHdr = supportRgba10101010ForHdr; } void DeviceInfo::setSupportMixedColorSpaces(bool supportMixedColorSpaces) { get()->mSupportMixedColorSpaces = supportMixedColorSpaces; } Loading libs/hwui/DeviceInfo.h +10 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,15 @@ public: return get()->mSupportFp16ForHdr; }; static void setSupportRgba10101010ForHdr(bool supportRgba10101010ForHdr); static bool isSupportRgba10101010ForHdr() { if (!Properties::hdr10bitPlus) { return false; } return get()->mSupportRgba10101010ForHdr; }; static void setSupportMixedColorSpaces(bool supportMixedColorSpaces); static bool isSupportMixedColorSpaces() { return get()->mSupportMixedColorSpaces; }; Loading Loading @@ -102,6 +111,7 @@ private: int mMaxTextureSize; sk_sp<SkColorSpace> mWideColorSpace = SkColorSpace::MakeSRGB(); bool mSupportFp16ForHdr = false; bool mSupportRgba10101010ForHdr = false; bool mSupportMixedColorSpaces = false; SkColorType mWideColorType = SkColorType::kN32_SkColorType; int mDisplaysSize = 0; Loading libs/hwui/jni/android_graphics_HardwareRenderer.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -860,7 +860,8 @@ static void android_view_ThreadedRenderer_setDisplayDensityDpi(JNIEnv*, jclass, static void android_view_ThreadedRenderer_initDisplayInfo( JNIEnv* env, jclass, jint physicalWidth, jint physicalHeight, jfloat refreshRate, jint wideColorDataspace, jlong appVsyncOffsetNanos, jlong presentationDeadlineNanos, jboolean supportFp16ForHdr, jboolean supportMixedColorSpaces) { jboolean supportFp16ForHdr, jboolean supportRgba10101010ForHdr, jboolean supportMixedColorSpaces) { DeviceInfo::setWidth(physicalWidth); DeviceInfo::setHeight(physicalHeight); DeviceInfo::setRefreshRate(refreshRate); Loading @@ -868,6 +869,7 @@ static void android_view_ThreadedRenderer_initDisplayInfo( DeviceInfo::setAppVsyncOffsetNanos(appVsyncOffsetNanos); DeviceInfo::setPresentationDeadlineNanos(presentationDeadlineNanos); DeviceInfo::setSupportFp16ForHdr(supportFp16ForHdr); DeviceInfo::setSupportRgba10101010ForHdr(supportRgba10101010ForHdr); DeviceInfo::setSupportMixedColorSpaces(supportMixedColorSpaces); } Loading Loading @@ -1020,7 +1022,7 @@ static const JNINativeMethod gMethods[] = { {"nSetForceDark", "(JI)V", (void*)android_view_ThreadedRenderer_setForceDark}, {"nSetDisplayDensityDpi", "(I)V", (void*)android_view_ThreadedRenderer_setDisplayDensityDpi}, {"nInitDisplayInfo", "(IIFIJJZZ)V", (void*)android_view_ThreadedRenderer_initDisplayInfo}, {"nInitDisplayInfo", "(IIFIJJZZZ)V", (void*)android_view_ThreadedRenderer_initDisplayInfo}, {"preload", "()V", (void*)android_view_ThreadedRenderer_preload}, {"isWebViewOverlaysEnabled", "()Z", (void*)android_view_ThreadedRenderer_isWebViewOverlaysEnabled}, Loading Loading
core/java/android/hardware/OverlayProperties.java +0 −13 Original line number Diff line number Diff line Loading @@ -69,19 +69,6 @@ public final class OverlayProperties implements Parcelable { return sDefaultOverlayProperties; } /** * @return True if the device can support fp16, false otherwise. * TODO: Move this to isCombinationSupported once the flag flips * @hide */ public boolean isFp16SupportedForHdr() { if (mNativeObject == 0) { return false; } return nIsCombinationSupported( mNativeObject, DataSpace.DATASPACE_SCRGB, HardwareBuffer.RGBA_FP16); } /** * Indicates that hardware composition of a buffer encoded with the provided {@link DataSpace} * and {@link HardwareBuffer.Format} is supported on the device. Loading
graphics/java/android/graphics/HardwareRenderer.java +12 −2 Original line number Diff line number Diff line Loading @@ -25,6 +25,8 @@ import android.app.ActivityManager; import android.content.Context; import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.hardware.DataSpace; import android.hardware.HardwareBuffer; import android.hardware.OverlayProperties; import android.hardware.display.DisplayManager; import android.os.IBinder; Loading Loading @@ -1417,7 +1419,14 @@ public class HardwareRenderer { nInitDisplayInfo(largestWidth, largestHeight, defaultDisplay.getRefreshRate(), wideColorDataspace, defaultDisplay.getAppVsyncOffsetNanos(), defaultDisplay.getPresentationDeadlineNanos(), overlayProperties.isFp16SupportedForHdr(), overlayProperties.isCombinationSupported( DataSpace.DATASPACE_SCRGB, HardwareBuffer.RGBA_FP16), overlayProperties.isCombinationSupported( DataSpace.pack( DataSpace.STANDARD_DCI_P3, DataSpace.TRANSFER_SRGB, DataSpace.RANGE_EXTENDED), HardwareBuffer.RGBA_10101010), overlayProperties.isMixedColorSpacesSupported()); mDisplayInitialized = true; Loading Loading @@ -1603,7 +1612,8 @@ public class HardwareRenderer { private static native void nInitDisplayInfo(int width, int height, float refreshRate, int wideColorDataspace, long appVsyncOffsetNanos, long presentationDeadlineNanos, boolean supportsFp16ForHdr, boolean nInitDisplayInfo); boolean supportsFp16ForHdr, boolean isRgba10101010SupportedForHdr, boolean nSupportMixedColorSpaces); private static native void nSetDrawingEnabled(boolean drawingEnabled); Loading
libs/hwui/DeviceInfo.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -108,6 +108,10 @@ void DeviceInfo::setSupportFp16ForHdr(bool supportFp16ForHdr) { get()->mSupportFp16ForHdr = supportFp16ForHdr; } void DeviceInfo::setSupportRgba10101010ForHdr(bool supportRgba10101010ForHdr) { get()->mSupportRgba10101010ForHdr = supportRgba10101010ForHdr; } void DeviceInfo::setSupportMixedColorSpaces(bool supportMixedColorSpaces) { get()->mSupportMixedColorSpaces = supportMixedColorSpaces; } Loading
libs/hwui/DeviceInfo.h +10 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,15 @@ public: return get()->mSupportFp16ForHdr; }; static void setSupportRgba10101010ForHdr(bool supportRgba10101010ForHdr); static bool isSupportRgba10101010ForHdr() { if (!Properties::hdr10bitPlus) { return false; } return get()->mSupportRgba10101010ForHdr; }; static void setSupportMixedColorSpaces(bool supportMixedColorSpaces); static bool isSupportMixedColorSpaces() { return get()->mSupportMixedColorSpaces; }; Loading Loading @@ -102,6 +111,7 @@ private: int mMaxTextureSize; sk_sp<SkColorSpace> mWideColorSpace = SkColorSpace::MakeSRGB(); bool mSupportFp16ForHdr = false; bool mSupportRgba10101010ForHdr = false; bool mSupportMixedColorSpaces = false; SkColorType mWideColorType = SkColorType::kN32_SkColorType; int mDisplaysSize = 0; Loading
libs/hwui/jni/android_graphics_HardwareRenderer.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -860,7 +860,8 @@ static void android_view_ThreadedRenderer_setDisplayDensityDpi(JNIEnv*, jclass, static void android_view_ThreadedRenderer_initDisplayInfo( JNIEnv* env, jclass, jint physicalWidth, jint physicalHeight, jfloat refreshRate, jint wideColorDataspace, jlong appVsyncOffsetNanos, jlong presentationDeadlineNanos, jboolean supportFp16ForHdr, jboolean supportMixedColorSpaces) { jboolean supportFp16ForHdr, jboolean supportRgba10101010ForHdr, jboolean supportMixedColorSpaces) { DeviceInfo::setWidth(physicalWidth); DeviceInfo::setHeight(physicalHeight); DeviceInfo::setRefreshRate(refreshRate); Loading @@ -868,6 +869,7 @@ static void android_view_ThreadedRenderer_initDisplayInfo( DeviceInfo::setAppVsyncOffsetNanos(appVsyncOffsetNanos); DeviceInfo::setPresentationDeadlineNanos(presentationDeadlineNanos); DeviceInfo::setSupportFp16ForHdr(supportFp16ForHdr); DeviceInfo::setSupportRgba10101010ForHdr(supportRgba10101010ForHdr); DeviceInfo::setSupportMixedColorSpaces(supportMixedColorSpaces); } Loading Loading @@ -1020,7 +1022,7 @@ static const JNINativeMethod gMethods[] = { {"nSetForceDark", "(JI)V", (void*)android_view_ThreadedRenderer_setForceDark}, {"nSetDisplayDensityDpi", "(I)V", (void*)android_view_ThreadedRenderer_setDisplayDensityDpi}, {"nInitDisplayInfo", "(IIFIJJZZ)V", (void*)android_view_ThreadedRenderer_initDisplayInfo}, {"nInitDisplayInfo", "(IIFIJJZZZ)V", (void*)android_view_ThreadedRenderer_initDisplayInfo}, {"preload", "()V", (void*)android_view_ThreadedRenderer_preload}, {"isWebViewOverlaysEnabled", "()Z", (void*)android_view_ThreadedRenderer_isWebViewOverlaysEnabled}, Loading