Roll external/skia 68c8156cd..047ae2743 (1 commits)

https://skia.googlesource.com/skia.git/+log/68c8156cd..047ae2743

2017-12-27 fmalita@chromium.org [sksg] Initial Path support

The AutoRoll server is located here: https://android-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

Test: Presubmit checks will test this change.
Change-Id: I205d1bccabbd997ea588edc4ea7f5e80fadb42c6
Exempt-From-Owner-Approval: The autoroll bot does not require owner approval.
diff --git a/Android.bp b/Android.bp
index 1f6473e..af76e63 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1055,6 +1055,7 @@
         "experimental/sksg/SkSGPaintNode.cpp",
         "experimental/sksg/SkSGRenderNode.cpp",
         "experimental/sksg/effects/SkSGTransform.cpp",
+        "experimental/sksg/geometry/SkSGPath.cpp",
         "experimental/sksg/geometry/SkSGRect.cpp",
         "experimental/sksg/paint/SkSGColor.cpp",
         "experimental/svg/model/SkSVGAttribute.cpp",
@@ -1963,6 +1964,7 @@
         "experimental/sksg/SkSGPaintNode.cpp",
         "experimental/sksg/SkSGRenderNode.cpp",
         "experimental/sksg/effects/SkSGTransform.cpp",
+        "experimental/sksg/geometry/SkSGPath.cpp",
         "experimental/sksg/geometry/SkSGRect.cpp",
         "experimental/sksg/paint/SkSGColor.cpp",
         "experimental/svg/model/SkSVGAttribute.cpp",
diff --git a/BUILD.gn b/BUILD.gn
index 69bcb68..31537cf 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1369,6 +1369,7 @@
       "experimental/sksg/SkSGPaintNode.cpp",
       "experimental/sksg/SkSGRenderNode.cpp",
       "experimental/sksg/effects/SkSGTransform.cpp",
+      "experimental/sksg/geometry/SkSGPath.cpp",
       "experimental/sksg/geometry/SkSGRect.cpp",
       "experimental/sksg/paint/SkSGColor.cpp",
     ]
diff --git a/experimental/sksg/geometry/SkSGPath.cpp b/experimental/sksg/geometry/SkSGPath.cpp
new file mode 100644
index 0000000..8a1550a
--- /dev/null
+++ b/experimental/sksg/geometry/SkSGPath.cpp
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2017 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkSGPath.h"
+
+#include "SkCanvas.h"
+#include "SkPaint.h"
+
+namespace sksg {
+
+Path::Path(const SkPath& path) : fPath(path) {}
+
+void Path::onDraw(SkCanvas* canvas, const SkPaint& paint) const {
+    canvas->drawPath(fPath, paint);
+}
+
+SkRect Path::onComputeBounds() const {
+    return fPath.computeTightBounds();
+}
+
+} // namespace sksg
diff --git a/experimental/sksg/geometry/SkSGPath.h b/experimental/sksg/geometry/SkSGPath.h
new file mode 100644
index 0000000..42c5618
--- /dev/null
+++ b/experimental/sksg/geometry/SkSGPath.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2017 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkSGPath_DEFINED
+#define SkSGPath_DEFINED
+
+#include "SkSGGeometryNode.h"
+
+#include "SkPath.h"
+
+class SkCanvas;
+class SkPaint;
+
+namespace sksg {
+
+/**
+ * Concrete Geometry node, wrapping an SkPath.
+ */
+class Path : public GeometryNode {
+public:
+    static sk_sp<Path> Make()                { return sk_sp<Path>(new Path(SkPath())); }
+    static sk_sp<Path> Make(const SkPath& r) { return sk_sp<Path>(new Path(r)); }
+
+    SG_ATTRIBUTE(Path, SkPath, fPath)
+
+protected:
+    void onDraw(SkCanvas*, const SkPaint&) const override;
+
+    SkRect onComputeBounds() const override;
+
+private:
+    explicit Path(const SkPath&);
+
+    SkPath fPath;
+};
+
+} // namespace sksg
+
+#endif // SkSGPath_DEFINED