Use RenderDrawable to render mipmaps
Bug: http://b.android.com/179714 Change-Id: If05e71b33ee3a95590eb892f4fffbff4cfca1867
This commit is contained in:
@@ -42,10 +42,6 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Action to render a given Drawable provided through {@link DrawableParams#getDrawable()}.
|
||||
*
|
||||
@@ -72,8 +68,12 @@ public class RenderDrawable extends RenderAction<DrawableParams> {
|
||||
BridgeContext context = getContext();
|
||||
drawableResource = context.getRenderResources().resolveResValue(drawableResource);
|
||||
|
||||
if (drawableResource == null ||
|
||||
drawableResource.getResourceType() != ResourceType.DRAWABLE) {
|
||||
if (drawableResource == null) {
|
||||
return Status.ERROR_NOT_A_DRAWABLE.createResult();
|
||||
}
|
||||
|
||||
ResourceType resourceType = drawableResource.getResourceType();
|
||||
if (resourceType != ResourceType.DRAWABLE && resourceType != ResourceType.MIPMAP) {
|
||||
return Status.ERROR_NOT_A_DRAWABLE.createResult();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user