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

Commit 1ce61201 authored by Chris Craik's avatar Chris Craik Committed by android-build-merger
Browse files

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

am: f8892359

* commit 'f8892359':
  Add layer tracing tags in new pipeline

Change-Id: I04a15d55b50f67dc808b63b4c95843bc38b48262
parents 97b48fdc f8892359
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;