Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2462bd2 authored by Shuangxi Xiang's avatar Shuangxi Xiang
Browse files

Unified format and Clearly traced opening recents

Compared with the submission in Commit: fbeac3c3,it is recommended to unify the trace information in the copyLayerInto function and the copyHWBitmapInto function in RenderProxy to make the output information clearer and easier to understand.

Test: traced opening recents

Signed-off-by:
Shuangxi Xiang <xiangshuangxi@xiaomi.corp-partner.google.com>

Change-Id: If759ccebb6beae21e2c026112c202814fe5e336f
parent 78e7ee6c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -206,7 +206,7 @@ void RenderProxy::buildLayer(RenderNode* node) {
}

bool RenderProxy::copyLayerInto(DeferredLayerUpdater* layer, SkBitmap& bitmap) {
    ATRACE_NAME("TextureView#getBitmap");
    ATRACE_NAME("RenderProxy#copyLayerInto readback");
    auto& thread = RenderThread::getInstance();
    return thread.queue().runSync([&]() -> bool {
        return thread.readback().copyLayerInto(layer, &bitmap) == CopyResult::Success;
@@ -473,7 +473,7 @@ void RenderProxy::prepareToDraw(Bitmap& bitmap) {
}

int RenderProxy::copyHWBitmapInto(Bitmap* hwBitmap, SkBitmap* bitmap) {
    ATRACE_NAME("HardwareBitmap readback");
    ATRACE_NAME("RenderProxy#copyHWBitmapInto readback");
    RenderThread& thread = RenderThread::getInstance();
    if (RenderThread::isCurrent()) {
        // TODO: fix everything that hits this. We should never be triggering a readback ourselves.
@@ -485,6 +485,7 @@ int RenderProxy::copyHWBitmapInto(Bitmap* hwBitmap, SkBitmap* bitmap) {
}

int RenderProxy::copyImageInto(const sk_sp<SkImage>& image, SkBitmap* bitmap) {
    ATRACE_NAME("RenderProxy#copyImageInto readback");
    RenderThread& thread = RenderThread::getInstance();
    if (RenderThread::isCurrent()) {
        // TODO: fix everything that hits this. We should never be triggering a readback ourselves.