summaryrefslogtreecommitdiff
path: root/libs/hwui/RenderNode.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2018-05-03 14:40:56 -0700
committerJohn Reck <jreck@google.com>2018-05-03 15:25:19 -0700
commitd9d7f127b5f07df9434aff67374a0012b1750cd4 (patch)
tree5be03d634c7b14030e4dd111aecd4b046e70b3fe /libs/hwui/RenderNode.cpp
parentba720d098ebd6bbc1b376bb0945c76dcda3820b6 (diff)
Delete a bunch of code
This removes the duality of DisplayList, removing a small amount of overhead Test: buids & hwuiunit passes Change-Id: I8bb3a20e9ead1caec4b4a8a3e9f2c08f717a7096
Diffstat (limited to 'libs/hwui/RenderNode.cpp')
-rw-r--r--libs/hwui/RenderNode.cpp72
1 files changed, 0 insertions, 72 deletions
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp
index 62b80c43ebb7..e9039001bd53 100644
--- a/libs/hwui/RenderNode.cpp
+++ b/libs/hwui/RenderNode.cpp
@@ -381,78 +381,6 @@ void RenderNode::applyViewPropertyTransforms(mat4& matrix, bool true3dTransform)
}
}
-/**
- * Organizes the DisplayList hierarchy to prepare for background projection reordering.
- *
- * This should be called before a call to defer() or drawDisplayList()
- *
- * Each DisplayList that serves as a 3d root builds its list of composited children,
- * which are flagged to not draw in the standard draw loop.
- */
-void RenderNode::computeOrdering() {
- ATRACE_CALL();
- mProjectedNodes.clear();
-
- // TODO: create temporary DDLOp and call computeOrderingImpl on top DisplayList so that
- // transform properties are applied correctly to top level children
- if (mDisplayList == nullptr) return;
- for (unsigned int i = 0; i < mDisplayList->getChildren().size(); i++) {
- RenderNodeOp* childOp = mDisplayList->getChildren()[i];
- childOp->renderNode->computeOrderingImpl(childOp, &mProjectedNodes, &mat4::identity());
- }
-}
-
-void RenderNode::computeOrderingImpl(
- RenderNodeOp* opState, std::vector<RenderNodeOp*>* compositedChildrenOfProjectionSurface,
- const mat4* transformFromProjectionSurface) {
- mProjectedNodes.clear();
- if (mDisplayList == nullptr || mDisplayList->isEmpty()) return;
-
- // TODO: should avoid this calculation in most cases
- // TODO: just calculate single matrix, down to all leaf composited elements
- Matrix4 localTransformFromProjectionSurface(*transformFromProjectionSurface);
- localTransformFromProjectionSurface.multiply(opState->localMatrix);
-
- if (properties().getProjectBackwards()) {
- // composited projectee, flag for out of order draw, save matrix, and store in proj surface
- opState->skipInOrderDraw = true;
- opState->transformFromCompositingAncestor = localTransformFromProjectionSurface;
- compositedChildrenOfProjectionSurface->push_back(opState);
- } else {
- // standard in order draw
- opState->skipInOrderDraw = false;
- }
-
- if (mDisplayList->getChildren().size() > 0) {
- const bool isProjectionReceiver = mDisplayList->projectionReceiveIndex >= 0;
- bool haveAppliedPropertiesToProjection = false;
- for (unsigned int i = 0; i < mDisplayList->getChildren().size(); i++) {
- RenderNodeOp* childOp = mDisplayList->getChildren()[i];
- RenderNode* child = childOp->renderNode;
-
- std::vector<RenderNodeOp*>* projectionChildren = nullptr;
- const mat4* projectionTransform = nullptr;
- if (isProjectionReceiver && !child->properties().getProjectBackwards()) {
- // if receiving projections, collect projecting descendant
-
- // Note that if a direct descendant is projecting backwards, we pass its
- // grandparent projection collection, since it shouldn't project onto its
- // parent, where it will already be drawing.
- projectionChildren = &mProjectedNodes;
- projectionTransform = &mat4::identity();
- } else {
- if (!haveAppliedPropertiesToProjection) {
- applyViewPropertyTransforms(localTransformFromProjectionSurface);
- haveAppliedPropertiesToProjection = true;
- }
- projectionChildren = compositedChildrenOfProjectionSurface;
- projectionTransform = &localTransformFromProjectionSurface;
- }
- child->computeOrderingImpl(childOp, projectionChildren, projectionTransform);
- }
- }
-}
-
const SkPath* RenderNode::getClippedOutline(const SkRect& clipRect) const {
const SkPath* outlinePath = properties().getOutline().getPath();
const uint32_t outlineID = outlinePath->getGenerationID();