• sail@chromium.org's avatar
    Mac Flash: Fix scaling bitmap · 75dae500
    sail@chromium.org authored
    There was a bug in the Flash code that caused a render crash. To reproduce the crash you had to do the following:
      - run on a Retina device
      - disable accelerated compositing
      - enable click to play
    In this case playing a flash video would crash the renderer.
    
    The problem was that we were incorrectly calculating the scaled rect of a bitmap.
    
    For example, when the pixel size of the bitmap is 1x1 the scaled size should be 0x0. Instead we were rounding up and returning a scaled valeu of 1x1.
    
    Fix was to use ToEnclosedRect instead of ToEnclosingRect.
    
    BUG=155309
    TBR=brettw@chromium.org
    
    Review URL: https://chromiumcodereview.appspot.com/11146009
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162384 0039d316-1c4b-4281-b951-d872f2087c98
    75dae500
ppb_graphics_2d_impl_unittest.cc 4.65 KB