<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
      The fix looks good to me.<br>
    <br>
      Thanks,<br>
      Alexandr.<br>
    <br>
    <div class="moz-cite-prefix">On 2/10/2017 9:24 AM, Prem Balakrishnan
      wrote:<br>
    </div>
    <blockquote cite="mid:6724ffd5-f0a9-49b3-b32c-1f1468cdf7de@default"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 12 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Cambria;
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Times New Roman \, serif";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
span.new
        {mso-style-name:new;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;}
span.changed
        {mso-style-name:changed;}
span.EmailStyle26
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle27
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle28
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle29
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle30
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle31
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle32
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle33
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle34
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle35
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle36
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle37
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:200285568;
        mso-list-type:hybrid;
        mso-list-template-ids:-251646598 1533304256 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:20.25pt;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level4
        {mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level7
        {mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext">Hi Phil,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext">Sorry, I
            misinterpreted the example code.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext">Updated
            patch as suggested: </span><span style="color:windowtext"><a
              moz-do-not-send="true"
              href="http://cr.openjdk.java.net/%7Epkbalakr/8162959/webrev.11/">http://cr.openjdk.java.net/~pkbalakr/8162959/webrev.11/</a>
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext">I have
            raised CCC request for the same.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext"> <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext">Regards,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext">Prem<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #B5C4DF
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
                Phil Race <br>
                <b>Sent:</b> Friday, February 10, 2017 1:54 AM<br>
                <b>To:</b> Prem Balakrishnan; Alexander Scherbatiy<br>
                <b>Cc:</b> Sergey Bylokhov; <a class="moz-txt-link-abbreviated" href="mailto:awt-dev@openjdk.java.net">awt-dev@openjdk.java.net</a><br>
                <b>Subject:</b> Re: Review Request JDK:-8162959 [HiDPI]
                screenshot artifacts using AWT Robot<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Your example here is  not what I wrote :-<o:p></o:p></p>
        <pre><span class="new">443      *      Image nativeResImage;</span><o:p></o:p></pre>
        <pre><span class="new"> 444      *      Image baseResImage;</span><o:p></o:p></pre>
        <pre><span class="new"> 445      *      MultiResolutionImage mrImage = robot.createMultiResolutionScreenCapture(frame.getBounds());</span><o:p></o:p></pre>
        <pre><span class="new"> 446      *      List<Image> resolutionVariants = mrImage.getResolutionVariants();</span><o:p></o:p></pre>
        <pre><span class="new"> 447      *      if (resolutionVariants.size() > 1) {</span><o:p></o:p></pre>
        <pre><span class="new"> 448      *          nativeResImage = resolutionVariants.get(1);</span><o:p></o:p></pre>
        <pre><span class="new"> 449      *      } else {</span><o:p></o:p></pre>
        <pre><span class="new"> 450      *          baseResImage = resolutionVariants.get(0);</span><o:p></o:p></pre>
        <pre><span class="new"> 451      *      } </pre> <o:p></o:p></span></pre>
        <pre><span class="new"><o:p> </o:p></span></pre>
        <p class="MsoNormal"><br>
          The result of that example is that only one of <o:p></o:p></p>
        <pre><span class="new">nativeResImage or baseResImage</span> is non-null and the developer then needs<o:p></o:p></pre>
        <pre>to check again.<o:p></o:p></pre>
        <pre>I defined only nativeResImage on purpose. If there is only one resolution<o:p></o:p></pre>
        <pre>variant then it must be the nativeResImage .. so the way I coded it was<o:p></o:p></pre>
        <pre>trying to show how you always get the unscaled result.<o:p></o:p></pre>
        <pre><o:p> </o:p></pre>
        <pre>So I recommend updating it as I originally suggested.<o:p></o:p></pre>
        <pre><o:p> </o:p></pre>
        <pre>Also please file the CCC today - the example part won't hold up that<o:p></o:p></pre>
        <pre>since it is not spec. significant.<o:p></o:p></pre>
        <pre><o:p> </o:p></pre>
        <pre>-phil.<o:p></o:p></pre>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div>
          <p class="MsoNormal">On 02/09/2017 01:49 AM, Prem Balakrishnan
            wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal">Hi Phil,<o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal">Thank you for the review.<o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal">Updated patch: <a moz-do-not-send="true"
href="http://cr.openjdk.java.net/%7Epkbalakr/8162959/webrev.10/">http://cr.openjdk.java.net/~pkbalakr/8162959/webrev.10/</a>
            <o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal">Regards,<o:p></o:p></p>
          <p class="MsoNormal">Prem<o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
          <div>
            <div style="border:none;border-top:solid #B5C4DF
              1.0pt;padding:3.0pt 0in 0in 0in">
              <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
                  Phil Race <br>
                  <b>Sent:</b> Thursday, February 09, 2017 1:59 AM<br>
                  <b>To:</b> Prem Balakrishnan; Alexander Scherbatiy<br>
                  <b>Cc:</b> Sergey Bylokhov; <a moz-do-not-send="true"
                    href="mailto:awt-dev@openjdk.java.net">awt-dev@openjdk.java.net</a><br>
                  <b>Subject:</b> Re: Review Request JDK:-8162959
                  [HiDPI] screenshot artifacts using AWT Robot</span><o:p></o:p></p>
            </div>
          </div>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal">Two minor grammar issues in the javadoc<o:p></o:p></p>
          <pre><span class="new"> This method should be used in case where there is a scaling transform</span><o:p></o:p></pre>
          <pre><span class="new">-></span><o:p></o:p></pre>
          <pre><span class="new"> This method can be used in case there is a scaling transform</span><o:p></o:p></pre>
          <pre><span class="new"> </span><o:p></o:p></pre>
          <pre><span class="new"> </span><o:p></o:p></pre>
          <pre><span class="new">* For a high resolution display where there is scaling transform, </span><o:p></o:p></pre>
          <pre><span class="new">-></span><o:p></o:p></pre>
          <pre><span class="new"> * For a high resolution display where there is a scaling transform, </span><o:p></o:p></pre>
          <p class="MsoNormal" style="margin-bottom:12.0pt"><br>
            Also I think we should show as an example in the javadoc how
            you would use it to get the hi-res image if you want it.<br>
            Derived fom Alexander's off-list email :<br>
                    Image nativeResImage;<br>
                    MultiResolutionImage mrImage =
            robot.createMultiResolutionScreenCapture(frame.getBounds());<br>
                    List<Image> resolutionVariants =
            mrImage.getResolutionVariants();<br>
                    if (resolutionVariants.size() > 1) {<br>
                        nativeResImage = resolutionVariants.get(1);<br>
                    } else {<br>
                        nativeResImage = resolutionVariants.get(0);<br>
                    }<br>
            <br>
            -phil.<o:p></o:p></p>
          <div>
            <p class="MsoNormal">On 02/08/2017 12:48 AM, Prem
              Balakrishnan wrote:<o:p></o:p></p>
          </div>
          <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
            <p class="MsoNormal"><span style="color:#1F497D">Thank you
                Alex for the review.</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">Updated
                patch: <a moz-do-not-send="true"
                  href="http://cr.openjdk.java.net/%7Epkbalakr/8162959/webrev.09/">http://cr.openjdk.java.net/~pkbalakr/8162959/webrev.09/</a></span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">Regards,</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">Prem </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <div>
              <div style="border:none;border-top:solid #B5C4DF
                1.0pt;padding:3.0pt 0in 0in 0in">
                <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
                    Alexandr Scherbatiy <br>
                    <b>Sent:</b> Tuesday, February 07, 2017 10:54 PM<br>
                    <b>To:</b> Prem Balakrishnan; Philip Race<br>
                    <b>Cc:</b> Sergey Bylokhov; <a
                      moz-do-not-send="true"
                      href="mailto:awt-dev@openjdk.java.net">awt-dev@openjdk.java.net</a><br>
                    <b>Subject:</b> Re: Review Request JDK:-8162959
                    [HiDPI] screenshot artifacts using AWT Robot</span><o:p></o:p></p>
              </div>
            </div>
            <p class="MsoNormal"> <o:p></o:p></p>
            <p class="MsoNormal">On 2/6/2017 1:19 PM, Prem Balakrishnan
              wrote:<br>
              <br>
              <br>
              <br>
              <o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">Hi Phil
                 and  Alex,</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">Please
                review updated patch as per review comments.</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"><a
                  moz-do-not-send="true"
                  href="http://cr.openjdk.java.net/%7Epkbalakr/8162959/webrev.08/">http://cr.openjdk.java.net/~pkbalakr/8162959/webrev.08/</a></span><o:p></o:p></p>
            <p class="MsoNormal"><span
                style="font-size:12.0pt;font-family:"Times New
                Roman","serif""><br>
                  Just as a small optimization. The private method
                Robot.createCompatibleImage(...) can return an array of
                BufferedImage-s.<br>
                  The createScreenCapture(...) can return just an image
                from the zero index and the
                createMultiResolutionScreenCapture(...) returns
                BaseMultiResolutionImage(array of images).<br>
                <br>
                  It is better if the public javadoc part is checked by
                a native speaker.<br>
                <br>
                  Thanks,<br>
                  Alexandr.<br>
                <br>
                <br>
                <br>
              </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">Multi-monitor
                scenario will be handled under JDK-8173972.</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"><a
                  moz-do-not-send="true"
                  href="https://bugs.openjdk.java.net/browse/JDK-8173972">https://bugs.openjdk.java.net/browse/JDK-8173972</a>
              </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">Regards,</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D">Prem</span><o:p></o:p></p>
            <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
            <div>
              <div style="border:none;border-top:solid #B5C4DF
                1.0pt;padding:3.0pt 0in 0in 0in">
                <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
                    Phil Race <br>
                    <b>Sent:</b> Tuesday, January 31, 2017 5:24 AM<br>
                    <b>To:</b> Prem Balakrishnan; Alexander Scherbatiy<br>
                    <b>Cc:</b> Sergey Bylokhov; <a
                      moz-do-not-send="true"
                      href="mailto:awt-dev@openjdk.java.net">awt-dev@openjdk.java.net</a><br>
                    <b>Subject:</b> Re: Review Request JDK:-8162959
                    [HiDPI] screenshot artifacts using AWT Robot</span><o:p></o:p></p>
              </div>
            </div>
            <p class="MsoNormal"> <o:p></o:p></p>
            <p class="MsoNormal">I like <o:p></o:p></p>
            <p class="MsoNormal"
              style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
                style="color:#1F497D">3.
                createMultiresolutionScreenCapture(Rectangle rect);<br>
                <br>
                <br>
                <br>
                <br>
              </span><o:p></o:p></p>
            <p class="MsoNormal"
              style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
                style="color:#1F497D"><br>
                -phil.<br>
                <br>
                <br>
                <br>
                <br>
              </span><o:p></o:p></p>
            <p class="MsoNormal"> <o:p></o:p></p>
            <div>
              <p class="MsoNormal">On 01/30/2017 01:11 AM, Prem
                Balakrishnan wrote:<o:p></o:p></p>
            </div>
            <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
              <p class="MsoNormal">Hi Phil,<o:p></o:p></p>
              <p class="MsoNormal"> <o:p></o:p></p>
              <p class="MsoNormal">Thank you for the review.<o:p></o:p></p>
              <p class="MsoNormal"> <o:p></o:p></p>
              <p class="MsoNormal">>Is Robot only capable of a screen
                capture from the default screen ? I hope not.<o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">Robot.createScreenCapture()
                  can be used to capture screenshots on Multi-Monitor as
                  well.</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">To
                  capture screen on Multi-Monitor user should calculate
                  the total width of multiple    </span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D"> screens,
                  based on the position of secondary monitor(i.e.,
                  Right/Left) with respect to   </span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">main
                  monitor and pass it  to createScreenCapture() method.</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
              <p class="MsoNormal">>So I would expect that where
                there are two screens with different DPI
                settings/transforms<br>
                >the logic in here will be sensitive to the target
                screen.<o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#17365D"> </span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#17365D">I tried
                  with MacBookPro (macOS Sierra version 10.12 , Retina )
                  by connecting a secondary monitor non-Retina display.</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#17365D">keeping
                  secondary monitor to the right/left of main display
                  and targeted rectangle on each sides, expected results
                  are obtained.</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#17365D"> </span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#17365D">The
                  current patch addresses most common scenario of single
                  HiDPI monitor setup and dual monitor (Hi-DPI,
                  non-HiDPI) setup.</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#17365D">As
                  “Handling multi monitor setup with different DPI
                  settings” requires additional effort to make it work
                  on all platforms, I propose to fix it separately. </span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#17365D"> </span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#17365D"> </span><o:p></o:p></p>
              <p class="MsoNormal">>And what happens if the target
                rectangle overlaps the edge between two screens ?<o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">I tried
                  this scenario with Mac connecting non-retina secondary
                  monitor,  OS doesn’t allow user to place a window in
                  between two screens.</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
              <p class="MsoNormal">>The more significant API change
                is that the isHiDPI parameter is a misnomer.<br>
                >It really means something else and I think what we
                should do is delete it<br>
                >and change the method name to something else.<o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">Thank you
                  for the Draft.</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">From my
                  point of view, I think we should maintain the method
                  name “createScreenCapture()”, because two functions
                  doing the same task</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">should
                  have the same name so that  method will have maximum
                  proximal visibility i.e., developer will easily know
                  that there exists two method variants to take
                  screenshots.</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">(At least
                  the method name should start with create….);</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">Some of
                  the signatures  we can choose from:<br>
                  1. createScreenCapture(int x, int y, int width, int
                  height);</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">2.
                  createScreenCapture(Point pt, Dimension d);</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">3.
                  createMultiresolutionScreenCapture(Rectangle rect);</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">4.
                  createMultiImageScreenCapture(Rectangle rect);</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">Request
                  your feedback on the same.</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">Once we
                  finalize the signature and behavior, I  shall update
                  the patch and send it for review.</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">Regards,</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D">Prem</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
              <div>
                <div style="border:none;border-top:solid #B5C4DF
                  1.0pt;padding:3.0pt 0in 0in 0in">
                  <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
                      Philip Race <br>
                      <b>Sent:</b> Wednesday, January 25, 2017 11:44 PM<br>
                      <b>To:</b> Alexandr Scherbatiy<br>
                      <b>Cc:</b> Prem Balakrishnan; Sergey Bylokhov; <a
                        moz-do-not-send="true"
                        href="mailto:awt-dev@openjdk.java.net">awt-dev@openjdk.java.net</a><br>
                      <b>Subject:</b> Re: Review Request JDK:-8162959
                      [HiDPI] screenshot artifacts using AWT Robot</span><o:p></o:p></p>
                </div>
              </div>
              <p class="MsoNormal"> <o:p></o:p></p>
              <p class="MsoNormal">I'd like to propose some revision to
                the API and also have a question about the
                implementation.<br>
                <br>
                The question about the implementation concerns this code
                :-<o:p></o:p></p>
              <pre><span class="changed"> 465         AffineTransform tx = GraphicsEnvironment.</span><o:p></o:p></pre>
              <pre><span class="changed"> 466                 getLocalGraphicsEnvironment().getDefaultScreenDevice().</span><o:p></o:p></pre>
              <pre><span class="changed"> 467                 getDefaultConfiguration().getDefaultTransform();</span><o:p></o:p></pre>
              <pre><span class="changed"> 468         double uiScaleX = tx.getScaleX();</span><o:p></o:p></pre>
              <pre><span class="changed"> 469         double uiScaleY = tx.getScaleY();</span><o:p></o:p></pre>
              <p class="MsoNormal"><br>
                Is Robot only capable of a screen capture from the
                default screen ? I hope not.<br>
                So I would expect that where there are two screens with
                different DPI settings/transforms<br>
                the logic in here will be sensitive to the target
                screen.<br>
                And what happens if the target rectangle overlaps the
                edge between two screens ?<br>
                <br>
                Regarding the API, I think that it needs to explain that
                it is "not 'hi dpi" per se,<br>
                rather that it is the non-default transform that
                matters.<br>
                <br>
                Additionally the doc should properly link to the class
                names, not just write them<br>
                as words.<br>
                <br>
                The more significant API change is that the isHiDPI
                parameter is a misnomer.<br>
                It really means something else and I think what we
                should do is delete it<br>
                and change the method name to something else.<br>
                <br>
                Here is my draft :<br>
                 /**<br>
                  * Creates an image containing pixels read from the
                screen.<br>
                  * This image does not include the mouse cursor.<br>
                  * This method should be used in case there is a
                scaling transform from<br>
                  * user space to screen (device) space.<br>
                  * Typically this means that the display is a high
                resolution screen,<br>
                  * although strictly it means any case in which there
                is such a transform.<br>
                  * Returns a {@link java.awt.image.BufferedImage} for a
                non-scaled display and<br>
                  * a {@link java.awt.image.MultiResolutionImage} where
                there is a scaling<br>
                  * transform. <br>
                  * <p><br>
                  * The {@code MultiResolutionImage} will have two image
                variants:<br>
                  * <ul><br>
                  * <li> Base Image with user specified size. This
                is scaled from the screen.<br>
                  * <li> Native device resolution image with
                device size pixels.<br>
                  * </ul><br>
                  * @param   screenRect     Rect to capture in screen
                coordinates<br>
                  * @return  The captured image<br>
                  * @throws  IllegalArgumentException if {@code
                screenRect} width and height<br>
                  * are not greater than zero<br>
                  * @throws  SecurityException if {@code
                readDisplayPixels} permission<br>
                  * is not granted<br>
                  * @see     SecurityManager#checkPermission<br>
                  * @see     AWTPermission<br>
                  */<br>
                <br>
                 public synchronized Image
                multiImageeScreenCapture(Rectangle screenRect);<br>
                <br>
                -phil.<br>
                <br>
                On 1/20/17, 3:20 AM, Alexandr Scherbatiy wrote: <o:p></o:p></p>
              <p> <o:p></o:p></p>
              <p class="MsoNormal"> <o:p></o:p></p>
              <div>
                <p class="MsoNormal">On 1/19/2017 3:57 PM, Prem
                  Balakrishnan wrote:<o:p></o:p></p>
              </div>
              <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
                <p class="MsoNormal"><span style="color:#1F497D">Hi
                    Alex,</span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-size:12.0pt;color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-size:12.0pt;color:#1F497D">Please review
                    updated patch as per review comments.</span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-size:12.0pt;color:#1F497D"><a
                      moz-do-not-send="true"
                      href="http://cr.openjdk.java.net/%7Epkbalakr/8162959/webrev.06/">http://cr.openjdk.java.net/~pkbalakr/8162959/webrev.06/</a>
                     </span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-size:12.0pt;color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-size:12.0pt;color:#1F497D">Automated
                    test validates both Robot.getPixelColor() and output
                    of Robot.createScreenCapture() API's.</span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-size:12.0pt;color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-size:12.0pt;color:#1F497D">Jtreg and JCK
                    tests passed on build with fix across all the
                    platforms(Mac, Windows and Linux) without causing
                    any regression.</span><o:p></o:p></p>
                <p class="MsoNormal"><span
                    style="font-size:12.0pt;color:#1F497D"> </span><o:p></o:p></p>
              </blockquote>
              <p class="MsoNormal"><span
                  style="font-size:12.0pt;font-family:"Times New
                  Roman","serif""> 
                  src/java.desktop/share/classes/java/awt/Robot.java<br>
                    > 421      * @param   isHiDPI     Indicates if
                  HiDPI Display<br>
                  <br>
                    There should be mention that this argument value is
                  ignored when a screenshot is taken on non-HiDPI
                  display<br>
                  <br>
                    Thanks,<br>
                    Alexandr.<br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                  <br>
                </span><o:p></o:p></p>
              <p class="MsoNormal"><span
                  style="font-size:12.0pt;color:#1F497D">Regards,</span><o:p></o:p></p>
              <p class="MsoNormal"><span
                  style="font-size:12.0pt;color:#1F497D">Prem</span><o:p></o:p></p>
              <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
              <div>
                <div style="border:none;border-top:solid #B5C4DF
                  1.0pt;padding:3.0pt 0in 0in 0in">
                  <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
                      Alexandr Scherbatiy <br>
                      <b>Sent:</b> Thursday, January 12, 2017 2:39 PM<br>
                      <b>To:</b> Prem Balakrishnan; Sergey Bylokhov; <a
                        moz-do-not-send="true"
                        href="mailto:awt-dev@openjdk.java.net">awt-dev@openjdk.java.net</a>;
                      Philip Race<br>
                      <b>Subject:</b> Re: Review Request JDK:-8162959
                      [HiDPI] screenshot artifacts using AWT Robot</span><o:p></o:p></p>
                </div>
              </div>
              <p class="MsoNormal"> <o:p></o:p></p>
              <p class="MsoNormal" style="margin-bottom:12.0pt"><br>
                > 421      * @param   isHiDPI     Indicates if HiDPI
                Display<br>
                <br>
                  There should be mention that this argument value is
                ignored when a screenshot is taken on non-HiDPI display<br>
                <br>
                Please also check the the method Robot.getPixelColor(int
                x, int y) also correctly works on Mac OS X, Windows and
                Linux after the fix.<br>
                <br>
                Thanks,<br>
                Alexandr.<o:p></o:p></p>
              <div>
                <p class="MsoNormal">On 1/10/2017 11:54 AM, Prem
                  Balakrishnan wrote:<o:p></o:p></p>
              </div>
              <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
                <p class="MsoNormal"><span style="color:#1F497D">Hi
                    Alex,</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D">Please
                    review updated patch,</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"><a
                      moz-do-not-send="true"
                      href="http://cr.openjdk.java.net/%7Epkbalakr/8162959/webrev.05/">http://cr.openjdk.java.net/~pkbalakr/8162959/webrev.05/</a></span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D">updated
                    imageOption to kCGWindowImageBestResolution  which
                    returns Best Resolution Image while capturing screen
                    using CGWindowListCreateImage() method.</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D">Regards,</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D">Prem</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                <div>
                  <div style="border:none;border-top:solid #B5C4DF
                    1.0pt;padding:3.0pt 0in 0in 0in">
                    <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
                        Alexandr Scherbatiy <br>
                        <b>Sent:</b> Tuesday, January 10, 2017 1:08 AM<br>
                        <b>To:</b> Prem Balakrishnan; Sergey Bylokhov; <a
                          moz-do-not-send="true"
                          href="mailto:awt-dev@openjdk.java.net">awt-dev@openjdk.java.net</a>;
                        Philip Race<br>
                        <b>Subject:</b> Re: Review Request JDK:-8162959
                        [HiDPI] screenshot artifacts using AWT Robot</span><o:p></o:p></p>
                  </div>
                </div>
                <p class="MsoNormal"> <o:p></o:p></p>
                <p class="MsoNormal" style="margin-bottom:12.0pt"><br>
                    CGWindowListCreateImage() method which is used to
                  capture a screenshot on Mac OS X by Robot has
                  imageOption argument which can have value:
                  kCGWindowImageBestResolution<br>
                      <a moz-do-not-send="true"
href="https://developer.apple.com/reference/coregraphics/1666230-quartz_window_services/window_image_types?language=objc">https://developer.apple.com/reference/coregraphics/1666230-quartz_window_services/window_image_types?language=objc</a><br>
                     "When capturing the window, return the best image
                  resolution. The returned image size may be different
                  than the screen size."<br>
                  <br>
                    Could this option help to get a high-resolution
                  CGImageRef on HiDPI display?<br>
                  <br>
                    Thanks,<br>
                    Alexandr.<o:p></o:p></p>
                <div>
                  <p class="MsoNormal">On 12/27/2016 12:14 PM, Prem
                    Balakrishnan wrote:<o:p></o:p></p>
                </div>
                <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
                  <p class="MsoNormal"><span style="color:#1F497D">Hi
                      Alexander,</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">Please
                      review updated patch,</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D"><a
                        moz-do-not-send="true"
                        href="http://cr.openjdk.java.net/%7Epkbalakr/8162959/webrev.04/">http://cr.openjdk.java.net/~pkbalakr/8162959/webrev.04/</a>
                    </span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">I
                      used  wrong bounds while creating images, correct
                      it in this patch.</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">Regards,</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">Prem</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                  <div>
                    <div style="border:none;border-top:solid #B5C4DF
                      1.0pt;padding:3.0pt 0in 0in 0in">
                      <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
                          Alexander Scherbatiy <br>
                          <b>Sent:</b> Wednesday, December 14, 2016 5:18
                          PM<br>
                          <b>To:</b> Prem Balakrishnan; Sergey Bylokhov;
                          <a moz-do-not-send="true"
                            href="mailto:awt-dev@openjdk.java.net">awt-dev@openjdk.java.net</a>;
                          Philip Race<br>
                          <b>Subject:</b> Re: Review Request
                          JDK:-8162959 [HiDPI] screenshot artifacts
                          using AWT Robot</span><o:p></o:p></p>
                    </div>
                  </div>
                  <p class="MsoNormal"> <o:p></o:p></p>
                  <p class="MsoNormal">On 07/12/16 10:24, Prem
                    Balakrishnan wrote:<br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">Hi
                      Alexander,</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">Please
                      review updated patch as per review comments.</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="font-size:12.0pt"><a
                        moz-do-not-send="true"
                        href="http://cr.openjdk.java.net/%7Epkbalakr/8162959/webrev.03/">http://cr.openjdk.java.net/~pkbalakr/8162959/webrev.03/</a></span><o:p></o:p></p>
                  <p class="MsoNormal"><span
                      style="font-size:12.0pt;font-family:"Times
                      New Roman , serif","serif"">  I
                      used a simple app [1] to create a screenshot of a
                      frame on Mac OS X:<br>
                              Rectangle rect = frame.getBounds();<br>
                             
                      rect.setLocation(frame.getLocationOnScreen());<br>
                              BufferedImage img =
                      robot.createScreenCapture(rect);<br>
                      <br>
                        It takes only bottom right quarter of the frame
                      [2].<br>
                      <br>
                        Is it possible to use some API that makes a
                      screenshot and returns an NSImage on Mac OS X?<br>
                        In this case it would be possible to get a high
                      resolution representation from the NSImage and
                      return it in the same way as it is updated on
                      Windows and Linux.<br>
                      <br>
                        [1] <a moz-do-not-send="true"
href="http://cr.openjdk.java.net/%7Ealexsch/8162959/screenshot/RobotScreenshot.java">http://cr.openjdk.java.net/~alexsch/8162959/screenshot/RobotScreenshot.java</a><br>
                        [2] <a moz-do-not-send="true"
href="http://cr.openjdk.java.net/%7Ealexsch/8162959/screenshot/screenshot.png">http://cr.openjdk.java.net/~alexsch/8162959/screenshot/screenshot.png</a><br>
                      <br>
                        Thanks,<br>
                        Alexandr.<br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                    </span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">Regards,</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">Prem</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                  <div>
                    <div style="border:none;border-top:solid #B5C4DF
                      1.0pt;padding:3.0pt 0in 0in 0in">
                      <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
                          Alexandr Scherbatiy <br>
                          <b>Sent:</b> Monday, November 21, 2016 8:10 PM<br>
                          <b>To:</b> Prem Balakrishnan; Sergey Bylokhov;
                          <a moz-do-not-send="true"
                            href="mailto:awt-dev@openjdk.java.net">awt-dev@openjdk.java.net</a>;
                          Phil Race<br>
                          <b>Subject:</b> Re: Review Request
                          JDK:-8162959 [HiDPI] screenshot artifacts
                          using AWT Robot</span><o:p></o:p></p>
                    </div>
                  </div>
                  <p class="MsoNormal"> <o:p></o:p></p>
                  <p class="MsoNormal">On 11/16/2016 8:46 AM, Prem
                    Balakrishnan wrote:<br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <o:p></o:p></p>
                  <p class="MsoNormal"><span
                      style="font-size:12.0pt;color:#1F497D">Hi
                      Alexander, </span><o:p></o:p></p>
                  <p class="MsoNormal"><span
                      style="font-size:12.0pt;color:#1F497D"> </span><o:p></o:p></p>
                  <p class="MsoNormal"><span
                      style="font-size:12.0pt;color:#1F497D">Please
                      review update patch as per review comments.</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="font-size:12.0pt"><a
                        moz-do-not-send="true"
                        href="http://cr.openjdk.java.net/%7Epkbalakr/8162959/webrev.02/">http://cr.openjdk.java.net/~pkbalakr/8162959/webrev.02/</a></span><o:p></o:p></p>
                  <p class="MsoNormal"><span
                      style="font-size:12.0pt;color:#1F497D"> </span><o:p></o:p></p>
                  <p class="MsoNormal"><span
                      style="font-size:12.0pt;color:#1F497D">With this
                      patch, Robot.createScreenCapture(Rectangle) method
                      returns a scaled down image on the HiDPI display.</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="font-size:12.0pt"><br>
                      - The native part on Mac OS X and Linux should be
                      updated as well.<br>
                      <br>
                      - 416      * Returns BufferedImage for Non-HiDPI
                      display and MultiResolutionImage <br>
                        417      * for HiDPI display with two resolution
                      variants.<br>
                      <br>
                      There should be added an explanation what is the
                      content of the first and the second resolution
                      variant.<br>
                      <br>
                      Thanks,<br>
                      Alexandr.<br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                    </span><o:p></o:p></p>
                  <p class="MsoNormal"><span
                      style="font-size:12.0pt;color:#1F497D"> </span><o:p></o:p></p>
                  <p class="MsoNormal"><span
                      style="font-size:12.0pt;color:#1F497D">Regards,</span><o:p></o:p></p>
                  <p class="MsoNormal"><span
                      style="font-size:12.0pt;color:#1F497D">Prem</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                  <div>
                    <div style="border:none;border-top:solid #B5C4DF
                      1.0pt;padding:3.0pt 0in 0in 0in">
                      <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
                          Alexandr Scherbatiy <br>
                          <b>Sent:</b> Thursday, November 03, 2016 4:05
                          PM<br>
                          <b>To:</b> Prem Balakrishnan; Sergey Bylokhov;
                          <a moz-do-not-send="true"
                            href="mailto:awt-dev@openjdk.java.net">awt-dev@openjdk.java.net</a><br>
                          <b>Subject:</b> Re: Review Request
                          JDK:-8162959 [HiDPI] screenshot artifacts
                          using AWT Robot</span><o:p></o:p></p>
                    </div>
                  </div>
                  <p class="MsoNormal"> <o:p></o:p></p>
                  <p class="MsoNormal">On 11/2/2016 1:57 PM, Prem
                    Balakrishnan wrote:<br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <br>
                    <o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">Hi
                      Alexander,</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">Please
                      review updated patch.</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="font-size:12.0pt"><a
                        moz-do-not-send="true"
                        href="http://cr.openjdk.java.net/%7Epkbalakr/8162959/webrev.01/">http://cr.openjdk.java.net/~pkbalakr/8162959/webrev.01/</a></span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="font-size:12.0pt"> </span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">Added
                      a new public API “<b>Image
                        createHiDPIScreenCapture(Rectangle screenRect)”.</b></span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">Returns
                      an ordinary screenshot(BufferedImage) if the UI
                      scale is 1.</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">Returns
                      MultiResolutionImage for HiDPI display with two
                      resolution variants,</span><o:p></o:p></p>
                  <p class="MsoListParagraph"
                    style="margin-left:20.25pt;text-indent:-.25in;mso-list:l0
                    level1 lfo2"><!--[if !supportLists]--><span
                      style="mso-list:Ignore">1.<span style="font:7.0pt
                        "Times New Roman"">       </span></span><!--[endif]--><span
                      style="color:#1F497D">Low Resolution/base image
                      with user input width and height,  I have used
                      interpolation algorithm for scaling , adapted from
                      JavaFX Robot (</span><a moz-do-not-send="true"
                      href="http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/89a5de54b7dc">http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/89a5de54b7dc</a><span
                      style="color:#1F497D">),</span><o:p></o:p></p>
                  <p class="MsoListParagraph"
                    style="margin-left:20.25pt;text-indent:-.25in;mso-list:l0
                    level1 lfo2"><!--[if !supportLists]--><span
                      style="mso-list:Ignore">2.<span style="font:7.0pt
                        "Times New Roman"">       </span></span><!--[endif]--><span
                      style="color:#1F497D">High Resolution image with
                      scaled width and height .</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="font-size:12.0pt"> 
                      - Please, check that the
                      Robot.createScreenCapture(Rectangle) method
                      returns a scaled down image on the HiDPI display<br>
                        - Probably existing Java methods can be used for
                      an image scaling.<br>
                        For example, there is the
                      Image.getScaledInstance(int width, int height, int
                      hints) method.<br>
                        Or may be it is better just to create an image
                      with required size and draw the high-resolution
                      image into it using a specific scale and rendering
                      hints.<br>
                      <br>
                        Thanks,<br>
                        Alexandr.<br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                    </span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">Regards,</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D">Prem</span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                  <div>
                    <div style="border:none;border-top:solid #B5C4DF
                      1.0pt;padding:3.0pt 0in 0in 0in">
                      <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
                          Alexander Scherbatiy <br>
                          <b>Sent:</b> Thursday, October 13, 2016 3:21
                          PM<br>
                          <b>To:</b> Prem Balakrishnan; Sergey Bylokhov;
                          <a moz-do-not-send="true"
                            href="mailto:awt-dev@openjdk.java.net">awt-dev@openjdk.java.net</a><br>
                          <b>Subject:</b> Re: Review Request
                          JDK:-8162959 [HiDPI] screenshot artifacts
                          using AWT Robot</span><o:p></o:p></p>
                    </div>
                  </div>
                  <p class="MsoNormal"> <o:p></o:p></p>
                  <p>On 06/10/16 15:28, Prem Balakrishnan wrote:<o:p></o:p></p>
                  <blockquote
                    style="margin-top:5.0pt;margin-bottom:5.0pt">
                    <p class="MsoNormal"><span style="font-size:12.0pt">Hi<b>,</b></span><o:p></o:p></p>
                    <p class="MsoNormal"><b><span
                          style="font-size:12.0pt"> </span></b><o:p></o:p></p>
                    <p class="MsoNormal"> <o:p></o:p></p>
                    <p class="MsoNormal"><span
                        style="font-size:12.0pt;font-family:"Times
                        New Roman","serif"">Please review
                        fix for JDK 9, </span><o:p></o:p></p>
                    <p class="MsoNormal"><span style="font-size:12.0pt"> </span><o:p></o:p></p>
                    <p class="MsoNormal"><b><span
                          style="font-size:12.0pt">Bug:</span></b><span
                        style="font-size:12.0pt"> <a
                          moz-do-not-send="true"
                          href="https://bugs.openjdk.java.net/browse/JDK-8162959">https://bugs.openjdk.java.net/browse/JDK-8162959</a>
                      </span><o:p></o:p></p>
                    <p class="MsoNormal"><b><span
                          style="font-size:12.0pt">Webrev:</span></b><span
                        style="font-size:12.0pt"> <a
                          moz-do-not-send="true"
                          href="http://cr.openjdk.java.net/%7Epkbalakr/8162959/webrev.00/">http://cr.openjdk.java.net/~pkbalakr/8162959/webrev.00/</a>
                      </span><o:p></o:p></p>
                    <p class="MsoNormal"><span style="font-size:12.0pt"> </span><o:p></o:p></p>
                    <p class="MsoNormal"><span style="font-size:12.0pt">I
                        have adapted the same fix as used for JavaFX
                        Robot </span><o:p></o:p></p>
                    <p class="MsoNormal"><b><span
                          style="font-size:12.0pt">Bug: </span></b><a
                        moz-do-not-send="true"
                        href="https://bugs.openjdk.java.net/browse/JDK-8162783">JDK-8162783</a>.<o:p></o:p></p>
                    <p class="MsoNormal"><b>Patch: </b><a
                        moz-do-not-send="true"
                        href="http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/89a5de54b7dc">http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/89a5de54b7dc</a><o:p></o:p></p>
                    <p class="MsoNormal"> <o:p></o:p></p>
                    <p class="MsoNormal"> <o:p></o:p></p>
                    <pre><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">New Public API ” </span><span style="font-size:12.0pt;font-family:"Cambria","serif"">BufferedImage createScreenCapture(Rectangle screenRect, boolean isHiDPI)”</span><span style="font-size:12.0pt;font-family:"Calibri","sans-serif""> is added,</span><o:p></o:p></pre>
                    <pre><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">Which will have a parameter to specify if HiDPI.</span><o:p></o:p></pre>
                  </blockquote>
                  <p class="MsoNormal"><span style="font-size:12.0pt"> 
                      It is better to a add public method which returns
                      MultiResolution image on HiDPI display and 
                      consists of two resoltion variants<br>
                         - base image which has size requested by a user<br>
                         - high-resolution image which creates an
                      original screen capture<br>
                        <br>
                        The proposed by your algorithm can be applied to
                      the base image. <br>
                        For more details see JDK-8020618 [macosx]
                      java.awt.Robot makes blurry screen captures on
                      Retina <br>
                      <br>
                        Thanks,<br>
                        Alexandr.<br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                      <br>
                    </span><o:p></o:p></p>
                  <pre> <o:p></o:p></pre>
                  <pre><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">Regards,</span><o:p></o:p></pre>
                  <pre><span style="font-size:12.0pt;font-family:"Calibri","sans-serif"">Prem</span><o:p></o:p></pre>
                  <pre> <o:p></o:p></pre>
                  <p class="MsoNormal"> <o:p></o:p></p>
                  <p class="MsoNormal"> <o:p></o:p></p>
                  <p class="MsoNormal"><span style="font-size:12.0pt"> </span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="font-size:12.0pt"> </span><o:p></o:p></p>
                  <p class="MsoNormal"><span style="font-size:12.0pt"> </span><o:p></o:p></p>
                  <p class="MsoNormal"><span
                      style="font-size:12.0pt;font-family:"Times
                      New Roman , serif","serif""> </span><o:p></o:p></p>
                </blockquote>
                <p class="MsoNormal"><span
                    style="font-size:12.0pt;font-family:"Times New
                    Roman","serif""> </span><o:p></o:p></p>
              </blockquote>
              <p class="MsoNormal"><span style="font-size:12.0pt"> </span><o:p></o:p></p>
              <p class="MsoNormal"><span
                  style="font-size:12.0pt;font-family:"Times New
                  Roman","serif""> </span><o:p></o:p></p>
            </blockquote>
            <p class="MsoNormal"><span style="font-size:12.0pt"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
                style="font-size:12.0pt;font-family:"Times New
                Roman","serif""> </span><o:p></o:p></p>
          </blockquote>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:"Times New Roman
              , serif","serif""> </span><o:p></o:p></p>
        </blockquote>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman","serif""><o:p> </o:p></span></p>
      </div>
    </blockquote>
    <br>
  </body>
</html>