Merge "Add layer tracing tags in new pipeline" into nyc-dev
am: f8892359b0
* commit 'f8892359b0ae07031160a71cf3f7e3a86604c2b1':
Add layer tracing tags in new pipeline
Change-Id: Id77f8234013d6bdbfd75b8fbc6a63b724820fd95
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user