Remove logging of DisplayList staleness

Change-Id: Ie6b3af3065d4d10ec0bc9b419223d3458d297ea8
This commit is contained in:
Chris Craik
2014-01-27 14:26:14 -08:00
parent 2d434c8bdf
commit 3783e70b55
4 changed files with 5 additions and 49 deletions

View File

@@ -261,7 +261,6 @@ void DisplayList::init() {
mHeight = 0;
mPivotExplicitlySet = false;
mCaching = false;
mOrderingId = 0;
}
size_t DisplayList::getSize() {
@@ -504,8 +503,6 @@ void DisplayList::computeOrdering() {
ATRACE_CALL();
m3dNodes.clear();
mProjectedNodes.clear();
mRootDisplayList = this;
mOrderingId++;
// TODO: create temporary DDLOp and call computeOrderingImpl on top DisplayList so that
// transform properties are applied correctly to top level children
@@ -514,8 +511,7 @@ void DisplayList::computeOrdering() {
DrawDisplayListOp* childOp = mDisplayListData->children[i];
childOp->mDisplayList->computeOrderingImpl(childOp,
&m3dNodes, &mat4::identity(),
&mProjectedNodes, &mat4::identity(),
mRootDisplayList, mOrderingId);
&mProjectedNodes, &mat4::identity());
}
}
@@ -524,15 +520,10 @@ void DisplayList::computeOrderingImpl(
Vector<ZDrawDisplayListOpPair>* compositedChildrenOf3dRoot,
const mat4* transformFrom3dRoot,
Vector<DrawDisplayListOp*>* compositedChildrenOfProjectionSurface,
const mat4* transformFromProjectionSurface,
const void* rootDisplayList, const int orderingId) {
const mat4* transformFromProjectionSurface) {
m3dNodes.clear();
mProjectedNodes.clear();
// Temporary, for logging
mRootDisplayList = rootDisplayList;
mOrderingId = orderingId;
// TODO: should avoid this calculation in most cases
// TODO: just calculate single matrix, down to all leaf composited elements
Matrix4 localTransformFrom3dRoot(*transformFrom3dRoot);
@@ -584,8 +575,7 @@ void DisplayList::computeOrderingImpl(
DrawDisplayListOp* childOp = mDisplayListData->children[i];
childOp->mDisplayList->computeOrderingImpl(childOp,
compositedChildrenOf3dRoot, transformFrom3dRoot,
compositedChildrenOfProjectionSurface, transformFromProjectionSurface,
rootDisplayList, orderingId);
compositedChildrenOfProjectionSurface, transformFromProjectionSurface);
}
}
}
@@ -599,7 +589,6 @@ public:
}
inline LinearAllocator& allocator() { return *(mDeferStruct.mAllocator); }
const DisplayList* getRoot() { return mDeferStruct.mRoot; }
private:
DeferStateStruct& mDeferStruct;
const int mLevel;
@@ -622,7 +611,6 @@ public:
}
inline LinearAllocator& allocator() { return *(mReplayStruct.mAllocator); }
const DisplayList* getRoot() { return mReplayStruct.mRoot; }
private:
ReplayStateStruct& mReplayStruct;
const int mLevel;
@@ -659,14 +647,6 @@ void DisplayList::iterate3dChildren(ChildrenSelectMode mode, OpenGLRenderer& ren
const float zValue = m3dNodes[i].key;
DrawDisplayListOp* childOp = m3dNodes[i].value;
if (CC_UNLIKELY(handler.getRoot()->mRootDisplayList != childOp->mDisplayList->mRootDisplayList ||
handler.getRoot()->mOrderingId != childOp->mDisplayList->mOrderingId)) {
ALOGW("Error in 3d order computation: Root %p, order %d, expected %p %d",
childOp->mDisplayList->mRootDisplayList, childOp->mDisplayList->mOrderingId,
handler.getRoot()->mRootDisplayList, handler.getRoot()->mOrderingId);
CRASH();
}
if (mode == kPositiveZChildren && zValue < 0.0f) continue;
if (mode == kNegativeZChildren && zValue > 0.0f) break;
@@ -728,15 +708,6 @@ void DisplayList::iterate(OpenGLRenderer& renderer, T& handler, const int level)
ALOGW("Error: %s is drawing after destruction, size %d", getName(), mSize);
CRASH();
}
if (CC_UNLIKELY(handler.getRoot()->mRootDisplayList != mRootDisplayList ||
handler.getRoot()->mOrderingId != mOrderingId)) {
ALOGW("Error in order computation: Root %p, order %d, expected %p %d",
mRootDisplayList, mOrderingId,
handler.getRoot()->mRootDisplayList, handler.getRoot()->mOrderingId);
CRASH();
}
if (mSize == 0 || mAlpha <= 0) {
DISPLAY_LIST_LOGD("%*sEmpty display list (%p, %s)", level * 2, "", this, mName.string());
return;

View File

@@ -76,7 +76,7 @@ class DrawDisplayListOp;
class PlaybackStateStruct {
protected:
PlaybackStateStruct(OpenGLRenderer& renderer, int replayFlags, LinearAllocator* allocator)
: mRenderer(renderer), mReplayFlags(replayFlags), mAllocator(allocator), mRoot(NULL) {}
: mRenderer(renderer), mReplayFlags(replayFlags), mAllocator(allocator){}
public:
OpenGLRenderer& mRenderer;
@@ -85,7 +85,6 @@ public:
// Allocator with the lifetime of a single frame.
// replay uses an Allocator owned by the struct, while defer shares the DeferredDisplayList's Allocator
LinearAllocator * const mAllocator;
const DisplayList* mRoot; // TEMPORARY, for debug logging only
};
class DeferStateStruct : public PlaybackStateStruct {
@@ -196,9 +195,6 @@ public:
}
void setProjectToContainedVolume(bool shouldProject) {
if (!mProjectToContainedVolume && shouldProject) {
ALOGD("DL %s(%p) marked for projection", getName(), this);
}
mProjectToContainedVolume = shouldProject;
}
@@ -264,9 +260,6 @@ public:
void setTranslationZ(float translationZ) {
if (translationZ != mTranslationZ) {
if (mTranslationZ == 0.0f) {
ALOGD("DL %s(%p) marked for 3d compositing", getName(), this);
}
mTranslationZ = translationZ;
onTranslationUpdate();
}
@@ -537,8 +530,7 @@ private:
Vector<ZDrawDisplayListOpPair>* compositedChildrenOf3dRoot,
const mat4* transformFrom3dRoot,
Vector<DrawDisplayListOp*>* compositedChildrenOfProjectionSurface,
const mat4* transformFromProjectionSurface,
const void* rootDisplayList, const int orderingId);
const mat4* transformFromProjectionSurface);
template <class T>
inline void setViewProperties(OpenGLRenderer& renderer, T& handler, const int level);
@@ -631,10 +623,6 @@ private:
// for projection surfaces, contains a list of all children items
Vector<DrawDisplayListOp*> mProjectedNodes;
// TEMPORARY, for debug logging only
const void* mRootDisplayList;
int mOrderingId;
}; // class DisplayList
}; // namespace uirenderer

View File

@@ -199,7 +199,6 @@ void Layer::defer() {
DeferStateStruct deferredState(*deferredList, *renderer,
DisplayList::kReplayFlag_ClipChildren);
deferredState.mRoot = displayList;
renderer->initViewport(width, height);
renderer->setupFrameState(dirtyRect.left, dirtyRect.top,

View File

@@ -1877,7 +1877,6 @@ status_t OpenGLRenderer::drawDisplayList(DisplayList* displayList, Rect& dirty,
if (CC_UNLIKELY(mCaches.drawDeferDisabled)) {
status = startFrame();
ReplayStateStruct replayStruct(*this, dirty, replayFlags);
replayStruct.mRoot = displayList;
displayList->replay(replayStruct, 0);
return status | replayStruct.mDrawGlStatus;
}
@@ -1885,7 +1884,6 @@ status_t OpenGLRenderer::drawDisplayList(DisplayList* displayList, Rect& dirty,
bool avoidOverdraw = !mCaches.debugOverdraw && !mCountOverdraw; // shh, don't tell devs!
DeferredDisplayList deferredList(*currentClipRect(), avoidOverdraw);
DeferStateStruct deferStruct(deferredList, *this, replayFlags);
deferStruct.mRoot = displayList;
displayList->defer(deferStruct, 0);
flushLayers();