Loading libs/hwui/Properties.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,8 @@ float Properties::maxHdrHeadroomOn8bit = 5.f; // TODO: Refine this number bool Properties::clipSurfaceViews = false; bool Properties::hdr10bitPlus = false; int Properties::timeoutMultiplier = 1; StretchEffectBehavior Properties::stretchEffectBehavior = StretchEffectBehavior::ShaderHWUI; DrawingEnabled Properties::drawingEnabled = DrawingEnabled::NotInitialized; Loading Loading @@ -183,6 +185,8 @@ bool Properties::load() { base::GetBoolProperty("debug.hwui.clip_surfaceviews", hwui_flags::clip_surfaceviews()); hdr10bitPlus = hwui_flags::hdr_10bit_plus(); timeoutMultiplier = android::base::GetIntProperty("ro.hw_timeout_multiplier", 1); return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw); } Loading libs/hwui/Properties.h +2 −0 Original line number Diff line number Diff line Loading @@ -338,6 +338,8 @@ public: static bool clipSurfaceViews; static bool hdr10bitPlus; static int timeoutMultiplier; static StretchEffectBehavior getStretchEffectBehavior() { return stretchEffectBehavior; } Loading libs/hwui/Readback.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -91,8 +91,10 @@ void Readback::copySurfaceInto(ANativeWindow* window, const std::shared_ptr<Copy { ATRACE_NAME("sync_wait"); if (sourceFence != -1 && sync_wait(sourceFence.get(), 500 /* ms */) != NO_ERROR) { ALOGE("Timeout (500ms) exceeded waiting for buffer fence, abandoning readback attempt"); int syncWaitTimeoutMs = 500 * Properties::timeoutMultiplier; if (sourceFence != -1 && sync_wait(sourceFence.get(), syncWaitTimeoutMs) != NO_ERROR) { ALOGE("Timeout (%dms) exceeded waiting for buffer fence, abandoning readback attempt", syncWaitTimeoutMs); return request->onCopyFinished(CopyResult::Timeout); } } Loading @@ -109,9 +111,8 @@ void Readback::copySurfaceInto(ANativeWindow* window, const std::shared_ptr<Copy sk_sp<SkColorSpace> colorSpace = DataSpaceToColorSpace(static_cast<android_dataspace>(dataspace)); sk_sp<SkImage> image = SkImages::DeferredFromAHardwareBuffer(sourceBuffer.get(), kPremul_SkAlphaType, colorSpace); sk_sp<SkImage> image = SkImages::DeferredFromAHardwareBuffer(sourceBuffer.get(), kPremul_SkAlphaType, colorSpace); if (!image.get()) { return request->onCopyFinished(CopyResult::UnknownError); Loading Loading
libs/hwui/Properties.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,8 @@ float Properties::maxHdrHeadroomOn8bit = 5.f; // TODO: Refine this number bool Properties::clipSurfaceViews = false; bool Properties::hdr10bitPlus = false; int Properties::timeoutMultiplier = 1; StretchEffectBehavior Properties::stretchEffectBehavior = StretchEffectBehavior::ShaderHWUI; DrawingEnabled Properties::drawingEnabled = DrawingEnabled::NotInitialized; Loading Loading @@ -183,6 +185,8 @@ bool Properties::load() { base::GetBoolProperty("debug.hwui.clip_surfaceviews", hwui_flags::clip_surfaceviews()); hdr10bitPlus = hwui_flags::hdr_10bit_plus(); timeoutMultiplier = android::base::GetIntProperty("ro.hw_timeout_multiplier", 1); return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw); } Loading
libs/hwui/Properties.h +2 −0 Original line number Diff line number Diff line Loading @@ -338,6 +338,8 @@ public: static bool clipSurfaceViews; static bool hdr10bitPlus; static int timeoutMultiplier; static StretchEffectBehavior getStretchEffectBehavior() { return stretchEffectBehavior; } Loading
libs/hwui/Readback.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -91,8 +91,10 @@ void Readback::copySurfaceInto(ANativeWindow* window, const std::shared_ptr<Copy { ATRACE_NAME("sync_wait"); if (sourceFence != -1 && sync_wait(sourceFence.get(), 500 /* ms */) != NO_ERROR) { ALOGE("Timeout (500ms) exceeded waiting for buffer fence, abandoning readback attempt"); int syncWaitTimeoutMs = 500 * Properties::timeoutMultiplier; if (sourceFence != -1 && sync_wait(sourceFence.get(), syncWaitTimeoutMs) != NO_ERROR) { ALOGE("Timeout (%dms) exceeded waiting for buffer fence, abandoning readback attempt", syncWaitTimeoutMs); return request->onCopyFinished(CopyResult::Timeout); } } Loading @@ -109,9 +111,8 @@ void Readback::copySurfaceInto(ANativeWindow* window, const std::shared_ptr<Copy sk_sp<SkColorSpace> colorSpace = DataSpaceToColorSpace(static_cast<android_dataspace>(dataspace)); sk_sp<SkImage> image = SkImages::DeferredFromAHardwareBuffer(sourceBuffer.get(), kPremul_SkAlphaType, colorSpace); sk_sp<SkImage> image = SkImages::DeferredFromAHardwareBuffer(sourceBuffer.get(), kPremul_SkAlphaType, colorSpace); if (!image.get()) { return request->onCopyFinished(CopyResult::UnknownError); Loading