Hello noel,

I'd like you to do a code review.  Please execute
        g4 diff -c 10832767

or point your web browser to
        http://mondrian/10832767

to review the following code:

Change 10832767 by nigel...@nigeltao-srcgears2 on 2009/04/16 20:48:48 *pending*

        When resizing a (partially transparent) canvas, ensure that the
        resultant image starts from a clean background.
        
        PRESUBMIT=passed
        R=noel
        [email protected]
        DELTA=3  (1 added, 2 deleted, 0 changed)
        OCL=10832767

Affected files ...

... //depot/googleclient/gears/opensource/gears/canvas/canvas.cc#28 edit

3 delta lines: 1 added, 2 deleted, 0 changed

Also consider running:
        g4 lint -c 10832767

which verifies that the changelist doesn't introduce new style violations.

If you can't do the review, please let me know as soon as possible.  During
your review, please ensure that all new code has corresponding unit tests and
that existing unit tests are updated appropriately.  Visit
http://www/eng/code_review.html for more information.

This is a semiautomated message from "g4 mail".  Complaints or suggestions?
Mail [email protected].
Change 10832767 by nigel...@nigeltao-srcgears2 on 2009/04/16 20:48:48 *pending*

        When resizing a (partially transparent) canvas, ensure that the
        resultant image starts from a clean background.

Affected files ...

... //depot/googleclient/gears/opensource/gears/canvas/canvas.cc#28 edit

==== //depot/googleclient/gears/opensource/gears/canvas/canvas.cc#28 - 
/home/nigeltao/srcgears2/googleclient/gears/opensource/gears/canvas/canvas.cc 
====
# action=edit type=text
--- googleclient/gears/opensource/gears/canvas/canvas.cc        2009-04-15 
13:42:41.000000000 +1000
+++ googleclient/gears/opensource/gears/canvas/canvas.cc        2009-04-16 
20:46:10.000000000 +1000
@@ -273,6 +273,7 @@
   SkBitmap new_bitmap;
   new_bitmap.setConfig(skia_config, new_width, new_height);
   new_bitmap.allocPixels();
+  new_bitmap.eraseARGB(0, 0, 0, 0);
 
   int old_width = GetWidth();
   int old_height = GetHeight();
@@ -287,8 +288,6 @@
       return;
     }
     new_canvas.drawBitmap(*skia_bitmap_, SkIntToScalar(0), SkIntToScalar(0));
-  } else {
-    new_bitmap.eraseARGB(0, 0, 0, 0);
   }
   new_bitmap.swap(*skia_bitmap_);
 }

Reply via email to