}
List<InternalRenderMetrics> list = layerToMetricsFactoryMap.get(context.getLayerInternal());
if( list.isEmpty() ){
return getPlaceHolder(context); // layer won't be rendered
}
InternalRenderMetrics internalRenderMetrics=null;
for( Iterator<InternalRenderMetrics> iter = list.iterator();
iter.hasNext() && internalRenderMetrics==null; ) {
internalRenderMetrics = iter.next();
boolean canRender;
try {
canRender = internalRenderMetrics.getRenderMetricsFactory().canRender(context);
if( canRender ) {
Renderer createRenderer = internalRenderMetrics.createRenderer();
createRenderer.setContext(context);
return createRenderer;
}
} catch (Throwable e) {
internalRenderMetrics=null;