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

Commit f8892359 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add layer tracing tags in new pipeline" into nyc-dev

parents 8e788d01 aff230f6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -82,6 +82,9 @@ void FrameBuilder::deferLayers(const LayerUpdateQueue& layers) {
        // removed during a dropped frame, but layers may still remain scheduled so
        // as not to lose info on what portion is damaged
        if (CC_LIKELY(layerNode->getLayer() != nullptr)) {
            ATRACE_FORMAT("Optimize HW Layer DisplayList %s %ux%u",
                    layerNode->getName(), layerNode->getWidth(), layerNode->getHeight());

            const Rect& layerDamage = layers.entries()[i].damage;
            layerNode->computeOrdering();

+8 −1
Original line number Diff line number Diff line
@@ -336,7 +336,13 @@ void LayerBuilder::deferMergeableOp(LinearAllocator& allocator,

void LayerBuilder::replayBakedOpsImpl(void* arg,
        BakedOpReceiver* unmergedReceivers, MergedOpReceiver* mergedReceivers) const {
    ATRACE_NAME("flush drawing commands");
    if (renderNode) {
        ATRACE_FORMAT_BEGIN("Issue HW Layer DisplayList %s %ux%u",
                renderNode->getName(), width, height);
    } else {
        ATRACE_BEGIN("flush drawing commands");
    }

    for (const BatchBase* batch : mBatches) {
        size_t size = batch->getOps().size();
        if (size > 1 && batch->isMerging()) {
@@ -355,6 +361,7 @@ void LayerBuilder::replayBakedOpsImpl(void* arg,
            }
        }
    }
    ATRACE_END();
}

void LayerBuilder::clear() {
+3 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include "Properties.h"
#include "renderstate/RenderState.h"
#include "utils/FatVector.h"
#include "utils/TraceUtils.h"

#include <utils/Log.h>

@@ -41,6 +42,7 @@ OffscreenBuffer::OffscreenBuffer(RenderState& renderState, Caches& caches,
        , texture(caches) {
    uint32_t width = computeIdealDimension(viewportWidth);
    uint32_t height = computeIdealDimension(viewportHeight);
    ATRACE_FORMAT("Allocate %ux%u HW Layer", width, height);
    caches.textureState().activateTexture(0);
    texture.resize(width, height, GL_RGBA);
    texture.blend = true;
@@ -101,6 +103,7 @@ uint32_t OffscreenBuffer::computeIdealDimension(uint32_t dimension) {
}

OffscreenBuffer::~OffscreenBuffer() {
    ATRACE_FORMAT("Destroy %ux%u HW Layer", texture.width(), texture.height());
    texture.deleteTexture();
    renderState.meshState().deleteMeshBuffer(vbo);
    elementCount = 0;