Hello cprince,

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

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

to review the following code:

Change 10313349 by nigel...@nigeltao-srcgears5 on 2009/02/27 20:29:37 *pending*

        Implement canvas fillRect, set fillStyle, and rotate.
        
        Also, remove GearsCanvas::Clone (it isn't part of the HTML5 spec),
        and refactor the SkBitmap and SkCanvas instances to be in the
        GearsCanvas and GearsCanvasRenderingContext2D respectively,
        which feels more natural than having them both in the GearsCanvas.
        
        PRESUBMIT=passed
        R=cprince
        [email protected]
        DELTA=163  (44 added, 70 deleted, 49 changed)
        OCL=10313349

Affected files ...

... //depot/googleclient/gears/opensource/gears/Makefile#237 edit
... //depot/googleclient/gears/opensource/gears/canvas/canvas.cc#22 edit
... //depot/googleclient/gears/opensource/gears/canvas/canvas.h#17 edit
... 
//depot/googleclient/gears/opensource/gears/canvas/canvas_rendering_context_2d.cc#18
 edit
... 
//depot/googleclient/gears/opensource/gears/canvas/canvas_rendering_context_2d.h#13
 edit
... //depot/googleclient/gears/opensource/gears/test/manual/canvas.html#1 edit
... //depot/googleclient/gears/opensource/gears/tools/config.mk#103 edit
... //depot/googleclient/gears/opensource/third_party/skia/README.google#5 edit
... 
//depot/googleclient/gears/opensource/third_party/skia/src/xml/SkParseColor.cpp#1
 edit

163 delta lines: 44 added, 70 deleted, 49 changed

Also consider running:
        g4 lint -c 10313349

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 10313349 by nigel...@nigeltao-srcgears5 on 2009/02/27 20:29:37 *pending*

        Implement canvas fillRect, set fillStyle, and rotate.
        
        Also, remove GearsCanvas::Clone (it isn't part of the HTML5 spec),
        and refactor the SkBitmap and SkCanvas instances to be in the
        GearsCanvas and GearsCanvasRenderingContext2D respectively,
        which feels more natural than having them both in the GearsCanvas.

Affected files ...

... //depot/googleclient/gears/opensource/gears/Makefile#237 edit
... //depot/googleclient/gears/opensource/gears/canvas/canvas.cc#22 edit
... //depot/googleclient/gears/opensource/gears/canvas/canvas.h#17 edit
... 
//depot/googleclient/gears/opensource/gears/canvas/canvas_rendering_context_2d.cc#18
 edit
... 
//depot/googleclient/gears/opensource/gears/canvas/canvas_rendering_context_2d.h#13
 edit
... //depot/googleclient/gears/opensource/gears/test/manual/canvas.html#1 edit
... //depot/googleclient/gears/opensource/gears/tools/config.mk#103 edit
... //depot/googleclient/gears/opensource/third_party/skia/README.google#5 edit
... 
//depot/googleclient/gears/opensource/third_party/skia/src/xml/SkParseColor.cpp#1
 edit

==== //depot/googleclient/gears/opensource/gears/Makefile#237 - 
/home/nigeltao/srcgears5/googleclient/gears/opensource/gears/Makefile ====
# action=edit type=text
--- googleclient/gears/opensource/gears/Makefile        2009-02-27 
18:44:43.000000000 +1100
+++ googleclient/gears/opensource/gears/Makefile        2009-02-27 
19:53:29.000000000 +1100
@@ -379,6 +379,7 @@
                ../third_party/skia/src/core \
                ../third_party/skia/src/images \
                ../third_party/skia/src/ports \
+               ../third_party/skia/src/xml \
                $(NULL)
 
 # these cpp files are from skia/src/core
@@ -481,6 +482,12 @@
                SkScaledBitmapSampler.cpp \
                $(NULL)
 
+# these cpp files are from skia/src/xml
+THIRD_PARTY_CPPSRCS    += \
+               SkParse.cpp \
+               SkParseColor.cpp \
+               $(NULL)
+
 # these cpp files are from skia/src/ports (except skia/src/SkMMapStream.cpp)
 ifeq ($(OS),linux)
 THIRD_PARTY_CPPSRCS    += \
==== //depot/googleclient/gears/opensource/gears/canvas/canvas.cc#22 - 
/home/nigeltao/srcgears5/googleclient/gears/opensource/gears/canvas/canvas.cc 
====
# action=edit type=text
--- googleclient/gears/opensource/gears/canvas/canvas.cc        2009-02-13 
13:24:43.000000000 +1100
+++ googleclient/gears/opensource/gears/canvas/canvas.cc        2009-02-27 
20:00:54.000000000 +1100
@@ -66,7 +66,6 @@
 void Dispatcher<GearsCanvas>::Init() {
   RegisterMethod("load", &GearsCanvas::Load);
   RegisterMethod("toBlob", &GearsCanvas::ToBlob);
-  RegisterMethod("clone", &GearsCanvas::Clone);
   RegisterMethod("crop", &GearsCanvas::Crop);
   RegisterMethod("resize", &GearsCanvas::Resize);
   RegisterProperty("width", &GearsCanvas::GetWidth, &GearsCanvas::SetWidth);
@@ -93,10 +92,10 @@
   
   BlobBackedSkiaInputStream blob_stream(blob.get());
   if (!SkImageDecoder::DecodeStream(&blob_stream,
-                                    skia_bitmap(),
+                                    skia_bitmap_.get(),
                                     skia_config,
                                     SkImageDecoder::kDecodePixels_Mode)) {
-    context->SetException(STRING16(L"Couldn't decode blob."));
+    context->SetException(STRING16(L"Could not decode the Blob as an image."));
   }
 }
 
@@ -127,7 +126,7 @@
 
   // Pixels should have been allocated, either in the contructor,
   // or in SetWidth() and SetHeight().
-  assert(skia_bitmap()->getPixels());
+  assert(skia_bitmap_->getPixels());
 
   // SkBitmap's isOpaque flag tells whether the bitmap has any transparent
   // pixels. If this flag is set, the encoder creates a file without alpha
@@ -161,7 +160,7 @@
   // may or may not be transparent. Futher, these other pixels can be cropped
   // away in the future. The only clean way is to set IsOpaque false and not
   // have the encoder strip away the alpha channel while exporting to a blob.
-  skia_bitmap()->setIsOpaque(false);
+  skia_bitmap_->setIsOpaque(false);
 
   BlobBackedSkiaOutputStream output_stream;
   scoped_ptr<SkImageEncoder> encoder(SkImageEncoder::Create(type));
@@ -174,10 +173,10 @@
       context->SetException(STRING16(L"quality must be between 0.0 and 1.0"));
       return;
     }
-    encode_succeeded = encoder->encodeStream(&output_stream, *skia_bitmap(),
+    encode_succeeded = encoder->encodeStream(&output_stream, *skia_bitmap_,
         static_cast<int> (quality * 100));
   } else {
-    encode_succeeded = encoder->encodeStream(&output_stream, *skia_bitmap(),
+    encode_succeeded = encoder->encodeStream(&output_stream, *skia_bitmap_,
         SkImageEncoder::kDefaultQuality);
   }
   if (!encode_succeeded) {
@@ -194,29 +193,6 @@
   }
   gears_blob->Reset(blob.get());
   context->SetReturnValue(JSPARAM_MODULE, gears_blob.get());
-}
-
-void GearsCanvas::Clone(JsCallContext *context) {
-  scoped_refptr<GearsCanvas> clone;
-  if (!CreateModule<GearsCanvas>(module_environment_.get(), context, &clone)) {
-    return;
-    }
-
-  clone->ResetCanvas(width(), height());
-  assert(clone->skia_bitmap()->getPixels());
-  clone->skia_canvas()->drawBitmap(*skia_bitmap_, 0, 0);
-
-  assert(clone->skia_bitmap()->getSize() == skia_bitmap()->getSize());
-  assert(memcmp(clone->skia_bitmap()->getPixels(),
-      skia_bitmap()->getPixels(), skia_bitmap()->getSize()) == 0);
-
-  clone->set_alpha(alpha());
-  clone->set_composite_operation(composite_operation());
-  clone->set_fill_style(fill_style());
-  // TODO(nigeltao): Copy the transformation matrix and generally make sure 
that
-  // all state is copied.
-
-  context->SetReturnValue(JSPARAM_MODULE, clone.get());
 }
 
 void GearsCanvas::Crop(JsCallContext *context) {
@@ -333,20 +309,21 @@
   if (rendering_context_ == NULL) {
     if (!CreateModule<GearsCanvasRenderingContext2D>(
         module_environment_.get(), context, &rendering_context_scoped_ptr)) {
+      context->SetException(STRING16(L"Unable to create context"));
       return;
     }
     rendering_context_ = rendering_context_scoped_ptr.get();
-    rendering_context_->InitCanvasField(this);
+    rendering_context_->SetCanvas(this, skia_bitmap_.get());
   }
   context->SetReturnValue(JSPARAM_MODULE, rendering_context_);
 }
 
 int GearsCanvas::width() const {
-  return skia_bitmap()->width();
+  return skia_bitmap_->width();
 }
 
 int GearsCanvas::height() const {
-  return skia_bitmap()->height();
+  return skia_bitmap_->height();
 }
 
 double GearsCanvas::alpha() const {
@@ -375,18 +352,6 @@
   return true;
 }
 
-std::string16 GearsCanvas::fill_style() const {
-  return fill_style_;
-}
-
-void GearsCanvas::set_fill_style(std::string16 new_fill_style) {
-  // TODO(nigeltao):
-  // if (new_fill_style is not a valid CSS color)
-  //  return;
-
-  fill_style_ = new_fill_style;
-}
-
 void GearsCanvas::ResetCanvas(int width, int height) {
   // Since we're starting with a clean slate, let's reset the SkBitmap as well.
   // For some reason things don't work otherwise.
@@ -398,19 +363,9 @@
   // or assertions fire and some operations (like eraseARGB) fail silently.
   skia_bitmap_->allocPixels();
   skia_bitmap_->eraseARGB(0, 0, 0, 0);
-  skia_canvas_.reset(new SkCanvas(*skia_bitmap_));
 
   alpha_ = 1.0;
   composite_operation_ = STRING16(L"source-over");
-  fill_style_ = STRING16(L"#000000");
-}
-
-SkBitmap *GearsCanvas::skia_bitmap() const {
-  return skia_bitmap_.get();
-}
-
-SkCanvas *GearsCanvas::skia_canvas() const {
-  return skia_canvas_.get();
 }
 
 bool GearsCanvas::IsRectValid(const SkIRect &rect) {
==== //depot/googleclient/gears/opensource/gears/canvas/canvas.h#17 - 
/home/nigeltao/srcgears5/googleclient/gears/opensource/gears/canvas/canvas.h 
====
# action=edit type=text
--- googleclient/gears/opensource/gears/canvas/canvas.h 2009-02-13 
13:24:44.000000000 +1100
+++ googleclient/gears/opensource/gears/canvas/canvas.h 2009-02-27 
20:00:07.000000000 +1100
@@ -65,11 +65,6 @@
   // OUT: Blob
   void ToBlob(JsCallContext *context);
 
-  // Returns a new Canvas object with the same state (width, height, pixels).
-  // IN: -
-  // OUT: Canvas
-  void Clone(JsCallContext *context);
-
   // Crops the canvas to the specified rectangle, in-place.
   // IN: int x, int y, int width, int height
   // OUT: -
@@ -113,10 +108,6 @@
   // fail silently without returning an error, as per the HTML5 canvas spec.
   // But if given an argument that HTML5 canvas supports but we don't,
   // the setters (set_composite_operation, to be precise) returns false.
-  // Returns the SkBitmap backing store for this canvas.
-  SkBitmap *skia_bitmap() const;
-  // Returns the SkCanvas object used to draw onto this canvas.
-  SkCanvas *skia_canvas() const;
   int width() const;
   int height() const;
   double alpha() const;
@@ -124,8 +115,6 @@
   std::string16 composite_operation() const;
   // Returns false if given a mode HTML5 canvas supports but we don't.
   bool set_composite_operation(std::string16 new_composite_op);
-  std::string16 fill_style() const;
-  void set_fill_style(std::string16 new_fill_style);
 
  private:
   // Resets the Canvas to the specified dimensions and fills it with 
transparent
@@ -141,13 +130,11 @@
   // Cannot embed objects directly due to compilation issues; see comment
   // at top of file.
   scoped_ptr<SkBitmap> skia_bitmap_;
-  scoped_ptr<SkCanvas> skia_canvas_;
 
   // Context state:
-  // TODO(nigeltao): Move this state into SkCanvas?
+  // TODO(nigeltao): Move this state into GearsCanvasRenderingContext2D?
   double alpha_;
   std::string16 composite_operation_;
-  std::string16 fill_style_;
 
   DISALLOW_EVIL_CONSTRUCTORS(GearsCanvas);
 };
==== 
//depot/googleclient/gears/opensource/gears/canvas/canvas_rendering_context_2d.cc#18
 - 
/home/nigeltao/srcgears5/googleclient/gears/opensource/gears/canvas/canvas_rendering_context_2d.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/canvas/canvas_rendering_context_2d.cc   
2009-02-13 13:24:44.000000000 +1100
+++ googleclient/gears/opensource/gears/canvas/canvas_rendering_context_2d.cc   
2009-02-27 20:32:52.000000000 +1100
@@ -27,6 +27,7 @@
 
 #include "gears/base/common/js_runner.h"
 #include "third_party/skia/include/core/SkPorterDuff.h"
+#include "third_party/skia/include/utils/SkParse.h"
 
 DECLARE_DISPATCHER(GearsCanvasRenderingContext2D);
 const std::string
@@ -36,23 +37,27 @@
 
 GearsCanvasRenderingContext2D::GearsCanvasRenderingContext2D()
     : ModuleImplBaseClass(kModuleName) {
-}
-
-void GearsCanvasRenderingContext2D::InitCanvasField(GearsCanvas *new_canvas) {
-  // Prevent double initialization.
-  assert(canvas_ == NULL);
-  assert(new_canvas != NULL);
-  canvas_ = new_canvas;
-  unload_monitor_.reset(
-      new JsEventMonitor(GetJsRunner(), JSEVENT_UNLOAD, this));
+  fill_style_as_paint_.setAntiAlias(true);
+}
+
+void GearsCanvasRenderingContext2D::SetCanvas(
+    GearsCanvas *canvas,
+    SkBitmap *bitmap) {
+  assert(gears_canvas_ == NULL || gears_canvas_ == canvas);
+  gears_canvas_ = canvas;
+  skia_canvas_.reset(new SkCanvas(*bitmap));
+  if (unload_monitor_.get() == NULL) {
+    unload_monitor_.reset(
+        new JsEventMonitor(GetJsRunner(), JSEVENT_UNLOAD, this));
+  }
 }
 
 void GearsCanvasRenderingContext2D::ClearReferenceFromGearsCanvas() {
   // The canvas pointer will be null if this object didn't initalize in the
   // first place (that is, if InitBaseFromSibling failed), or after a page
   // unload event.
-  if (canvas_)
-    canvas_->ClearRenderingContextReference();
+  if (gears_canvas_)
+    gears_canvas_->ClearRenderingContextReference();
 }
 
 void GearsCanvasRenderingContext2D::HandleEvent(JsEventType event_type) {
@@ -63,7 +68,7 @@
   // clear it in the destructor since at that time we no longer have a pointer
   // to Canvas.
   ClearReferenceFromGearsCanvas();
-  canvas_.reset();
+  gears_canvas_.reset();
 }
 
 GearsCanvasRenderingContext2D::~GearsCanvasRenderingContext2D() {
@@ -162,8 +167,7 @@
 // a NaN value must be ignored.
 
 void GearsCanvasRenderingContext2D::GetCanvas(JsCallContext *context) {
-  assert(canvas_ != NULL);
-  context->SetReturnValue(JSPARAM_MODULE, canvas_.get());
+  context->SetReturnValue(JSPARAM_MODULE, gears_canvas_.get());
 }
 
 void GearsCanvasRenderingContext2D::Save(JsCallContext *context) {
@@ -192,9 +196,6 @@
 }
 
 void GearsCanvasRenderingContext2D::Rotate(JsCallContext *context) {
-  // TODO(nigeltao): Remove this after unit testing.
-  context->SetException(STRING16(L"Unimplemented"));
-  return;
   double angle;
   JsArgument args[] = {
     { JSPARAM_REQUIRED, JSPARAM_DOUBLE, &angle },
@@ -207,7 +208,7 @@
   const double kDegreesPerRadian = 180.0/kPi;
   angle *= kDegreesPerRadian;
 
-  canvas_->skia_canvas()->rotate(SkDoubleToScalar(angle));
+  skia_canvas_->rotate(SkDoubleToScalar(angle));
 }
 
 void GearsCanvasRenderingContext2D::Translate(JsCallContext *context) {
@@ -256,7 +257,7 @@
 
 void GearsCanvasRenderingContext2D::GetGlobalAlpha(
     JsCallContext *context) {
-  double alpha = canvas_->alpha();
+  double alpha = gears_canvas_->alpha();
   context->SetReturnValue(JSPARAM_DOUBLE, &alpha);
 }
 
@@ -269,12 +270,12 @@
   context->GetArguments(ARRAYSIZE(args), args);
   if (context->is_exception_set())
     return;
-  canvas_->set_alpha(new_alpha);
+  gears_canvas_->set_alpha(new_alpha);
 }
 
 void GearsCanvasRenderingContext2D::GetGlobalCompositeOperation(
     JsCallContext *context) {
-  std::string16 op = canvas_->composite_operation();
+  std::string16 op = gears_canvas_->composite_operation();
   context->SetReturnValue(JSPARAM_STRING16, &op);
 }
 
@@ -287,7 +288,7 @@
   context->GetArguments(ARRAYSIZE(args), args);
   if (context->is_exception_set())
     return;
-  if (!canvas_->set_composite_operation(new_composite_op)) {
+  if (!gears_canvas_->set_composite_operation(new_composite_op)) {
     // HTML5 canvas-only composite operation.
     context->SetException(
         STRING16(L"This composite operation is implemented only in HTML5 
canvas"
@@ -298,8 +299,7 @@
 
 void GearsCanvasRenderingContext2D::GetFillStyle(
     JsCallContext *context) {
-  std::string16 fill_style = canvas_->fill_style();
-  context->SetReturnValue(JSPARAM_STRING16, &fill_style);
+  context->SetReturnValue(JSPARAM_STRING16, &fill_style_as_string_);
 }
 
 // TODO(nigeltao): Generate a better error if given a CanvasGradient or
@@ -316,7 +316,18 @@
   if (context->is_exception_set())
     return;
 
-  canvas_->set_fill_style(new_fill_style);
+  std::string new_fill_style_as_utf8;
+  if (!String16ToUTF8(new_fill_style, &new_fill_style_as_utf8)) {
+    return;
+  }
+
+  // SkParse::FindColor re-uses color's existing alpha value, if unspecified
+  // by the string, so we initialize color with alpha=255.
+  SkColor color = 0xFFFFFFFF;
+  if (SkParse::FindColor(new_fill_style_as_utf8.c_str(), &color)) {
+    fill_style_as_paint_.setColor(color);
+    fill_style_as_string_ = new_fill_style;
+  }
 }
 
 void GearsCanvasRenderingContext2D::ClearRect(JsCallContext *context) {
@@ -334,17 +345,21 @@
 }
 
 void GearsCanvasRenderingContext2D::FillRect(JsCallContext *context) {
-  int x, y, width, height;
-  JsArgument args[] = {
-    { JSPARAM_REQUIRED, JSPARAM_INT, &x },
-    { JSPARAM_REQUIRED, JSPARAM_INT, &y },
-    { JSPARAM_REQUIRED, JSPARAM_INT, &width },
-    { JSPARAM_REQUIRED, JSPARAM_INT, &height }
-  };
-  context->GetArguments(ARRAYSIZE(args), args);
-  if (context->is_exception_set())
-    return;
-  context->SetException(STRING16(L"Unimplemented"));
+  double x, y, width, height;
+  JsArgument args[] = {
+    { JSPARAM_REQUIRED, JSPARAM_DOUBLE, &x },
+    { JSPARAM_REQUIRED, JSPARAM_DOUBLE, &y },
+    { JSPARAM_REQUIRED, JSPARAM_DOUBLE, &width },
+    { JSPARAM_REQUIRED, JSPARAM_DOUBLE, &height }
+  };
+  context->GetArguments(ARRAYSIZE(args), args);
+  if (context->is_exception_set())
+    return;
+
+  SkRect rect;
+  rect.set(SkDoubleToScalar(x), SkDoubleToScalar(y),
+      SkDoubleToScalar(x + width), SkDoubleToScalar(y + height));
+  skia_canvas_->drawRect(rect, fill_style_as_paint_);
 }
 
 void GearsCanvasRenderingContext2D::StrokeRect(JsCallContext *context) {
==== 
//depot/googleclient/gears/opensource/gears/canvas/canvas_rendering_context_2d.h#13
 - 
/home/nigeltao/srcgears5/googleclient/gears/opensource/gears/canvas/canvas_rendering_context_2d.h
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/canvas/canvas_rendering_context_2d.h    
2009-02-13 13:24:46.000000000 +1100
+++ googleclient/gears/opensource/gears/canvas/canvas_rendering_context_2d.h    
2009-02-27 19:00:10.000000000 +1100
@@ -48,12 +48,6 @@
 
   GearsCanvasRenderingContext2D();
   virtual ~GearsCanvasRenderingContext2D();
-
-  // Initializes the canvas backreference from this object.
-  // This function must be called only once.
-  // This function is not exposed to Javascript and exists only for internal
-  // use.
-  void InitCanvasField(GearsCanvas *canvas);
 
   // Returns a backreference to the canvas this context was created from.
   // IN: -
@@ -179,6 +173,10 @@
   // OUT: -
   void PutImageData(JsCallContext *context);
 
+  // This function is not exposed to Javascript and exists only for internal
+  // use.
+  void SetCanvas(GearsCanvas *canvas, SkBitmap *bitmap);
+
  private:
   // Calls ClearRenderingContextReference() on canvas_, if canvas_ is not NULL.
   void ClearReferenceFromGearsCanvas();
@@ -186,7 +184,10 @@
   // Callback used to handle the 'JSEVENT_UNLOAD' event.
   virtual void HandleEvent(JsEventType event_type);
 
-  scoped_refptr<GearsCanvas> canvas_;
+  scoped_refptr<GearsCanvas> gears_canvas_;
+  scoped_ptr<SkCanvas> skia_canvas_;
+  std::string16 fill_style_as_string_;
+  SkPaint fill_style_as_paint_;
 
   scoped_ptr<JsEventMonitor> unload_monitor_;
 
==== //depot/googleclient/gears/opensource/gears/test/manual/canvas.html#1 - 
/home/nigeltao/srcgears5/googleclient/gears/opensource/gears/test/manual/canvas.html
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/test/manual/canvas.html 2009-02-27 
20:21:49.000000000 +1100
+++ googleclient/gears/opensource/gears/test/manual/canvas.html 2009-02-27 
20:30:03.000000000 +1100
@@ -11,17 +11,21 @@
 canvas.height = 80;
 
 var context = canvas.getContext('gears-2d');
-// TODO(nigeltao): Implement context.fillRect.
-
-var blob = canvas.toBlob();
-alert('blob.length = ' + blob.length);
+context.fillStyle = 'silver';
+context.fillRect(15, 25, 30, 30);
+context.rotate(0.3);
+context.fillStyle = '#3F00FF7F';
+context.fillRect(40,  0, 50, 50);
+context.rotate(-0.4);
+context.fillStyle = '#FF0000';
+context.fillRect(20, 20, 15, 15);
 
 var localServer = google.gears.factory.create('beta.localserver');
 localServer.removeStore("test_manual_canvas");
 var store = localServer.createStore("test_manual_canvas");
 
 var capturedUrl = parseInt(Math.random() * 1000) + '.png';
-store.captureBlob(blob, capturedUrl, 'image/png');
+store.captureBlob(canvas.toBlob(), capturedUrl);
 document.getElementById('outputImg').src = capturedUrl;
 
 
==== //depot/googleclient/gears/opensource/gears/tools/config.mk#103 - 
/home/nigeltao/srcgears5/googleclient/gears/opensource/gears/tools/config.mk 
====
# action=edit type=text
--- googleclient/gears/opensource/gears/tools/config.mk 2009-02-27 
18:44:43.000000000 +1100
+++ googleclient/gears/opensource/gears/tools/config.mk 2009-02-27 
19:52:48.000000000 +1100
@@ -182,7 +182,7 @@
 LIBPNG_CFLAGS += -I../third_party/zlib
 endif
 
-SKIA_CFLAGS += -I../third_party/skia/include/core 
-I../third_party/skia/include/images
+SKIA_CFLAGS += -I../third_party/skia/include/core 
-I../third_party/skia/include/images -I../third_party/skia/include/utils
 
 ZLIB_CFLAGS += -DNO_GZIP -DNO_GZCOMPRESS
 ifeq ($(OS),wince)
==== //depot/googleclient/gears/opensource/third_party/skia/README.google#5 - 
/home/nigeltao/srcgears5/googleclient/gears/opensource/third_party/skia/README.google
 ====
# action=edit type=text
--- googleclient/gears/opensource/third_party/skia/README.google        
2009-02-27 19:51:42.000000000 +1100
+++ googleclient/gears/opensource/third_party/skia/README.google        
2009-02-27 19:37:13.000000000 +1100
@@ -58,3 +58,8 @@
 skia/src/ports/gears_skia_win_fixes.cpp implemented empty stubs for a number
 of functions declared in Skia's .h files but are missing from Skia's Windows
 port (which is presumably a work-in-progress).
+
+
+skia/src/xml/SkParseColor.cpp line 20 disabled (with "#if 0" replacing "#ifdef
+SK_DEBUG") the code to regenerate the packed color-name table, to avoid a
+"CreateTable defined but not used" warning.
==== 
//depot/googleclient/gears/opensource/third_party/skia/src/xml/SkParseColor.cpp#1
 - 
/home/nigeltao/srcgears5/googleclient/gears/opensource/third_party/skia/src/xml/SkParseColor.cpp
 ====
# action=edit type=text
--- googleclient/gears/opensource/third_party/skia/src/xml/SkParseColor.cpp     
2009-02-27 19:51:43.000000000 +1100
+++ googleclient/gears/opensource/third_party/skia/src/xml/SkParseColor.cpp     
2009-02-27 19:38:34.000000000 +1100
@@ -17,7 +17,7 @@
 
 #include "SkParse.h"
 
-#ifdef SK_DEBUG
+#if 0
 #include "SkString.h"
 
     // compress names 6 chars per long (packed 5 bits/char )

Reply via email to