Override drawRRect in fake SkBitmapDevices.

Recent changes to SkBitmapDevice modified ::drawRRect() to take
an optimized drawing case. Some subclasses of SkBitmapDevice were
depending on the old behavior of calling ::drawPath(). Since they
do not draw, attempting to take the drawing path can cause problems.
For these subclasses, call drawPath() in the subclass.

Corresponding change in chromium at https://codereview.chromium.org/58933005

BUG:11648093
Change-Id: I4dc18d06c4bb586cb188084b9f0cd592cab24f3b
diff --git a/skia/ext/analysis_canvas.cc b/skia/ext/analysis_canvas.cc
index a2d397c..5476bda 100644
--- a/skia/ext/analysis_canvas.cc
+++ b/skia/ext/analysis_canvas.cc
@@ -182,6 +182,16 @@
   is_transparent_ = false;
 }
 
+void AnalysisDevice::drawRRect(const SkDraw& draw,
+                               const SkRRect& rr,
+                               const SkPaint& paint) {
+  // This should add the SkRRect to an SkPath, and call
+  // drawPath, but since drawPath ignores the SkPath, just
+  // do the same work here.
+  is_solid_color_ = false;
+  is_transparent_ = false;
+}
+
 void AnalysisDevice::drawPath(const SkDraw& draw,
                               const SkPath& path,
                               const SkPaint& paint,
diff --git a/skia/ext/analysis_canvas.h b/skia/ext/analysis_canvas.h
index 5db1540..1709251 100644
--- a/skia/ext/analysis_canvas.h
+++ b/skia/ext/analysis_canvas.h
@@ -81,6 +81,9 @@
   virtual void drawRect(const SkDraw& draw,
                         const SkRect& rect,
                         const SkPaint& paint) OVERRIDE;
+  virtual void drawRRect(const SkDraw& draw,
+                         const SkRRect& rr,
+                         const SkPaint& paint) OVERRIDE;
   virtual void drawOval(const SkDraw& draw,
                         const SkRect& oval,
                         const SkPaint& paint) OVERRIDE;
diff --git a/skia/ext/vector_platform_device_emf_win.cc b/skia/ext/vector_platform_device_emf_win.cc
index 958ff8f..97334d2 100644
--- a/skia/ext/vector_platform_device_emf_win.cc
+++ b/skia/ext/vector_platform_device_emf_win.cc
@@ -211,6 +211,13 @@
   Cleanup();
 }
 
+void VectorPlatformDeviceEmf::drawRRect(const SkDraw& draw, const SkRRect& rr,
+                                        const SkPaint& paint) {
+  SkPath path;
+  path.addRRect(rr);
+  this->drawPath(draw, path, paint, NULL, true);
+}
+
 void VectorPlatformDeviceEmf::drawPath(const SkDraw& draw,
                                        const SkPath& path,
                                        const SkPaint& paint,
diff --git a/skia/ext/vector_platform_device_emf_win.h b/skia/ext/vector_platform_device_emf_win.h
index c0deeec..de09be5 100644
--- a/skia/ext/vector_platform_device_emf_win.h
+++ b/skia/ext/vector_platform_device_emf_win.h
@@ -40,6 +40,8 @@
                           const SkPaint& paint) OVERRIDE;
   virtual void drawRect(const SkDraw& draw, const SkRect& r,
                         const SkPaint& paint) OVERRIDE;
+  virtual void drawRRect(const SkDraw&, const SkRRect& rr,
+                         const SkPaint& paint) OVERRIDE;
   virtual void drawPath(const SkDraw& draw, const SkPath& path,
                         const SkPaint& paint,
                         const SkMatrix* prePathMatrix = NULL,