Generating responsive images from cropped source file
Here's what I've ended up with:

{% macro srcset(image, maxCssWidth, maxCssHeight, includeDimensions) %}
{%- spaceless %}

    {# Is this a 2X image? #}
    {% set is2x = image.is2x %}

    {# Determine the CSS width for the image, if it were output at 100% #}
    {% set cssWidth = (is2x ? round(image.width / 2) : image.width) %}      

    {# Determine the image size that 1X screens should get #}
    {% set width = (cssWidth &gt; maxCssWidth ? maxCssWidth : cssWidth) %}
    {% set height = maxCssHeight %}        

    {# Determine the image size that 2X screens should get #}
    {% set width2x = (width * 2) &gt; image.width ? image.width : (width * 2) %}
    {% set height2x = (height * 2) &gt; image.height ? image.height : (height * 2) %}

    {# Output the srcset= attribute value #}
    srcset="{{ image.getUrl(image.width != width ? { width: width, height: height, mode: 'crop' }) }}, {{ image.getUrl(image.width != width2x ? { width: width2x, height: height2x, mode: 'crop' }) }} 2x"

    {#- Output the width= and height= attributes if needed #}
    {%- if includeDimensions %} width="{{ width }}" height="{{ image.getHeight({ width: width }) }}"{% endif %}
{% endspaceless -%}
{% endmacro %}