Loading libs/renderengine/ExternalTexture.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -14,11 +14,11 @@ * limitations under the License. */ #include <common/trace.h> #include <log/log.h> #include <renderengine/RenderEngine.h> #include <renderengine/impl/ExternalTexture.h> #include <ui/GraphicBuffer.h> #include <utils/Trace.h> namespace android::renderengine::impl { Loading @@ -35,7 +35,7 @@ ExternalTexture::~ExternalTexture() { } void ExternalTexture::remapBuffer() { ATRACE_CALL(); SFTRACE_CALL(); { auto buf = mBuffer; mRenderEngine.unmapExternalTextureBuffer(std::move(buf)); Loading libs/renderengine/benchmark/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ cc_benchmark { "libui", "libutils", "server_configurable_flags", "libtracing_perfetto", ], data: ["resources/*"], Loading libs/renderengine/skia/AutoBackendTexture.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -25,8 +25,8 @@ #include "compat/SkiaBackendTexture.h" #include <common/trace.h> #include <log/log_main.h> #include <utils/Trace.h> namespace android { namespace renderengine { Loading Loading @@ -63,7 +63,7 @@ void AutoBackendTexture::releaseImageProc(SkImages::ReleaseContext releaseContex } sk_sp<SkImage> AutoBackendTexture::makeImage(ui::Dataspace dataspace, SkAlphaType alphaType) { ATRACE_CALL(); SFTRACE_CALL(); sk_sp<SkImage> image = mBackendTexture->makeImage(alphaType, dataspace, releaseImageProc, this); // The following ref will be counteracted by releaseProc, when SkImage is discarded. Loading @@ -75,7 +75,7 @@ sk_sp<SkImage> AutoBackendTexture::makeImage(ui::Dataspace dataspace, SkAlphaTyp } sk_sp<SkSurface> AutoBackendTexture::getOrCreateSurface(ui::Dataspace dataspace) { ATRACE_CALL(); SFTRACE_CALL(); LOG_ALWAYS_FATAL_IF(!mBackendTexture->isOutputBuffer(), "You can't generate an SkSurface for a read-only texture"); if (!mSurface.get() || mDataspace != dataspace) { Loading libs/renderengine/skia/GaneshVkRenderEngine.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -21,9 +21,9 @@ #include <include/gpu/ganesh/vk/GrVkBackendSemaphore.h> #include <common/trace.h> #include <log/log_main.h> #include <sync/sync.h> #include <utils/Trace.h> namespace android::renderengine::skia { Loading Loading @@ -78,7 +78,7 @@ base::unique_fd GaneshVkRenderEngine::flushAndSubmit(SkiaGpuContext* context, sk_sp<SkSurface> dstSurface) { sk_sp<GrDirectContext> grContext = context->grDirectContext(); { ATRACE_NAME("flush surface"); SFTRACE_NAME("flush surface"); // TODO: Investigate feasibility of combining this "surface flush" into the "context flush" // below. context->grDirectContext()->flush(dstSurface.get()); Loading libs/renderengine/skia/SkiaGLRenderEngine.cpp +7 −8 Original line number Diff line number Diff line Loading @@ -28,12 +28,11 @@ #include <GrContextOptions.h> #include <GrTypes.h> #include <android-base/stringprintf.h> #include <common/trace.h> #include <gl/GrGLInterface.h> #include <include/gpu/ganesh/gl/GrGLDirectContext.h> #include <gui/TraceUtils.h> #include <sync/sync.h> #include <ui/DebugUtils.h> #include <utils/Trace.h> #include <cmath> #include <cstdint> Loading Loading @@ -332,7 +331,7 @@ bool SkiaGLRenderEngine::useProtectedContextImpl(GrProtected isProtected) { void SkiaGLRenderEngine::waitFence(SkiaGpuContext*, base::borrowed_fd fenceFd) { if (fenceFd.get() >= 0 && !waitGpuFence(fenceFd)) { ATRACE_NAME("SkiaGLRenderEngine::waitFence"); SFTRACE_NAME("SkiaGLRenderEngine::waitFence"); sync_wait(fenceFd.get(), -1); } } Loading @@ -341,19 +340,19 @@ base::unique_fd SkiaGLRenderEngine::flushAndSubmit(SkiaGpuContext* context, sk_sp<SkSurface> dstSurface) { sk_sp<GrDirectContext> grContext = context->grDirectContext(); { ATRACE_NAME("flush surface"); SFTRACE_NAME("flush surface"); grContext->flush(dstSurface.get()); } base::unique_fd drawFence = flushGL(); bool requireSync = drawFence.get() < 0; if (requireSync) { ATRACE_BEGIN("Submit(sync=true)"); SFTRACE_BEGIN("Submit(sync=true)"); } else { ATRACE_BEGIN("Submit(sync=false)"); SFTRACE_BEGIN("Submit(sync=false)"); } bool success = grContext->submit(requireSync ? GrSyncCpu::kYes : GrSyncCpu::kNo); ATRACE_END(); SFTRACE_END(); if (!success) { ALOGE("Failed to flush RenderEngine commands"); // Chances are, something illegal happened (Skia's internal GPU object Loading Loading @@ -400,7 +399,7 @@ bool SkiaGLRenderEngine::waitGpuFence(base::borrowed_fd fenceFd) { } base::unique_fd SkiaGLRenderEngine::flushGL() { ATRACE_CALL(); SFTRACE_CALL(); if (!GLExtensions::getInstance().hasNativeFenceSync()) { return base::unique_fd(); } Loading Loading
libs/renderengine/ExternalTexture.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -14,11 +14,11 @@ * limitations under the License. */ #include <common/trace.h> #include <log/log.h> #include <renderengine/RenderEngine.h> #include <renderengine/impl/ExternalTexture.h> #include <ui/GraphicBuffer.h> #include <utils/Trace.h> namespace android::renderengine::impl { Loading @@ -35,7 +35,7 @@ ExternalTexture::~ExternalTexture() { } void ExternalTexture::remapBuffer() { ATRACE_CALL(); SFTRACE_CALL(); { auto buf = mBuffer; mRenderEngine.unmapExternalTextureBuffer(std::move(buf)); Loading
libs/renderengine/benchmark/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ cc_benchmark { "libui", "libutils", "server_configurable_flags", "libtracing_perfetto", ], data: ["resources/*"], Loading
libs/renderengine/skia/AutoBackendTexture.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -25,8 +25,8 @@ #include "compat/SkiaBackendTexture.h" #include <common/trace.h> #include <log/log_main.h> #include <utils/Trace.h> namespace android { namespace renderengine { Loading Loading @@ -63,7 +63,7 @@ void AutoBackendTexture::releaseImageProc(SkImages::ReleaseContext releaseContex } sk_sp<SkImage> AutoBackendTexture::makeImage(ui::Dataspace dataspace, SkAlphaType alphaType) { ATRACE_CALL(); SFTRACE_CALL(); sk_sp<SkImage> image = mBackendTexture->makeImage(alphaType, dataspace, releaseImageProc, this); // The following ref will be counteracted by releaseProc, when SkImage is discarded. Loading @@ -75,7 +75,7 @@ sk_sp<SkImage> AutoBackendTexture::makeImage(ui::Dataspace dataspace, SkAlphaTyp } sk_sp<SkSurface> AutoBackendTexture::getOrCreateSurface(ui::Dataspace dataspace) { ATRACE_CALL(); SFTRACE_CALL(); LOG_ALWAYS_FATAL_IF(!mBackendTexture->isOutputBuffer(), "You can't generate an SkSurface for a read-only texture"); if (!mSurface.get() || mDataspace != dataspace) { Loading
libs/renderengine/skia/GaneshVkRenderEngine.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -21,9 +21,9 @@ #include <include/gpu/ganesh/vk/GrVkBackendSemaphore.h> #include <common/trace.h> #include <log/log_main.h> #include <sync/sync.h> #include <utils/Trace.h> namespace android::renderengine::skia { Loading Loading @@ -78,7 +78,7 @@ base::unique_fd GaneshVkRenderEngine::flushAndSubmit(SkiaGpuContext* context, sk_sp<SkSurface> dstSurface) { sk_sp<GrDirectContext> grContext = context->grDirectContext(); { ATRACE_NAME("flush surface"); SFTRACE_NAME("flush surface"); // TODO: Investigate feasibility of combining this "surface flush" into the "context flush" // below. context->grDirectContext()->flush(dstSurface.get()); Loading
libs/renderengine/skia/SkiaGLRenderEngine.cpp +7 −8 Original line number Diff line number Diff line Loading @@ -28,12 +28,11 @@ #include <GrContextOptions.h> #include <GrTypes.h> #include <android-base/stringprintf.h> #include <common/trace.h> #include <gl/GrGLInterface.h> #include <include/gpu/ganesh/gl/GrGLDirectContext.h> #include <gui/TraceUtils.h> #include <sync/sync.h> #include <ui/DebugUtils.h> #include <utils/Trace.h> #include <cmath> #include <cstdint> Loading Loading @@ -332,7 +331,7 @@ bool SkiaGLRenderEngine::useProtectedContextImpl(GrProtected isProtected) { void SkiaGLRenderEngine::waitFence(SkiaGpuContext*, base::borrowed_fd fenceFd) { if (fenceFd.get() >= 0 && !waitGpuFence(fenceFd)) { ATRACE_NAME("SkiaGLRenderEngine::waitFence"); SFTRACE_NAME("SkiaGLRenderEngine::waitFence"); sync_wait(fenceFd.get(), -1); } } Loading @@ -341,19 +340,19 @@ base::unique_fd SkiaGLRenderEngine::flushAndSubmit(SkiaGpuContext* context, sk_sp<SkSurface> dstSurface) { sk_sp<GrDirectContext> grContext = context->grDirectContext(); { ATRACE_NAME("flush surface"); SFTRACE_NAME("flush surface"); grContext->flush(dstSurface.get()); } base::unique_fd drawFence = flushGL(); bool requireSync = drawFence.get() < 0; if (requireSync) { ATRACE_BEGIN("Submit(sync=true)"); SFTRACE_BEGIN("Submit(sync=true)"); } else { ATRACE_BEGIN("Submit(sync=false)"); SFTRACE_BEGIN("Submit(sync=false)"); } bool success = grContext->submit(requireSync ? GrSyncCpu::kYes : GrSyncCpu::kNo); ATRACE_END(); SFTRACE_END(); if (!success) { ALOGE("Failed to flush RenderEngine commands"); // Chances are, something illegal happened (Skia's internal GPU object Loading Loading @@ -400,7 +399,7 @@ bool SkiaGLRenderEngine::waitGpuFence(base::borrowed_fd fenceFd) { } base::unique_fd SkiaGLRenderEngine::flushGL() { ATRACE_CALL(); SFTRACE_CALL(); if (!GLExtensions::getInstance().hasNativeFenceSync()) { return base::unique_fd(); } Loading