Merge "Early return when the scale is 0." into mnc-dr-dev am: 10eb6ab94b
am: 8b581e2bc7
* commit '8b581e2bc797d3b470ad7ff3d362a998b42da4ea':
Early return when the scale is 0.
This commit is contained in:
@@ -666,7 +666,9 @@ template <class T>
|
|||||||
void RenderNode::issueDrawShadowOperation(const Matrix4& transformFromParent, T& handler) {
|
void RenderNode::issueDrawShadowOperation(const Matrix4& transformFromParent, T& handler) {
|
||||||
if (properties().getAlpha() <= 0.0f
|
if (properties().getAlpha() <= 0.0f
|
||||||
|| properties().getOutline().getAlpha() <= 0.0f
|
|| properties().getOutline().getAlpha() <= 0.0f
|
||||||
|| !properties().getOutline().getPath()) {
|
|| !properties().getOutline().getPath()
|
||||||
|
|| properties().getScaleX() == 0
|
||||||
|
|| properties().getScaleY() == 0) {
|
||||||
// no shadow to draw
|
// no shadow to draw
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -856,7 +858,10 @@ void RenderNode::issueOperations(OpenGLRenderer& renderer, T& handler) {
|
|||||||
const bool useViewProperties = (!mLayer || drawLayer);
|
const bool useViewProperties = (!mLayer || drawLayer);
|
||||||
if (useViewProperties) {
|
if (useViewProperties) {
|
||||||
const Outline& outline = properties().getOutline();
|
const Outline& outline = properties().getOutline();
|
||||||
if (properties().getAlpha() <= 0 || (outline.getShouldClip() && outline.isEmpty())) {
|
if (properties().getAlpha() <= 0
|
||||||
|
|| (outline.getShouldClip() && outline.isEmpty())
|
||||||
|
|| properties().getScaleX() == 0
|
||||||
|
|| properties().getScaleY() == 0) {
|
||||||
DISPLAY_LIST_LOGD("%*sRejected display list (%p, %s)", handler.level() * 2, "",
|
DISPLAY_LIST_LOGD("%*sRejected display list (%p, %s)", handler.level() * 2, "",
|
||||||
this, getName());
|
this, getName());
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -77,8 +77,8 @@ void ShadowTessellator::tessellateSpotShadow(bool isCasterOpaque,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG_SHADOW
|
#if DEBUG_SHADOW
|
||||||
ALOGD("light center %f %f %f",
|
ALOGD("light center %f %f %f %d",
|
||||||
adjustedLightCenter.x, adjustedLightCenter.y, adjustedLightCenter.z);
|
adjustedLightCenter.x, adjustedLightCenter.y, adjustedLightCenter.z, lightRadius);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// light position (because it's in local space) needs to compensate for receiver transform
|
// light position (because it's in local space) needs to compensate for receiver transform
|
||||||
|
|||||||
@@ -1052,7 +1052,7 @@ void SpotShadow::dumpPolygon(const Vector2* poly, int polyLength, const char* po
|
|||||||
*/
|
*/
|
||||||
void SpotShadow::dumpPolygon(const Vector3* poly, int polyLength, const char* polyName) {
|
void SpotShadow::dumpPolygon(const Vector3* poly, int polyLength, const char* polyName) {
|
||||||
for (int i = 0; i < polyLength; i++) {
|
for (int i = 0; i < polyLength; i++) {
|
||||||
ALOGD("polygon %s i %d x %f y %f", polyName, i, poly[i].x, poly[i].y);
|
ALOGD("polygon %s i %d x %f y %f z %f", polyName, i, poly[i].x, poly[i].y, poly[i].z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user