Add pathops and capture stderr so we can get SkDebugf output.
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 28 Apr 2014 14:56:32 +0000 (14:56 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 28 Apr 2014 14:56:32 +0000 (14:56 +0000)
BUG=skia:
R=mtklein@google.com

Author: jcgregorio@google.com

Review URL: https://codereview.chromium.org/252863002

git-svn-id: http://skia.googlecode.com/svn/trunk@14402 2bbb7eff-a529-9590-31e7-b0007b416f81

experimental/webtry/templates/template.cpp
experimental/webtry/webtry.go
gyp/webtry.gyp

index bef525e..6d7bb74 100644 (file)
@@ -1,6 +1,6 @@
 // To regenerate this list of includes run the following command from skia/include:
 //
-//     find core effects  -maxdepth 1 -name "*.h" | sed "s#^[^\/]*\/##g" | sed "s/\(.*\)/#include \"\1\"/" | sort
+//     find core effects pathops  -maxdepth 1 -name "*.h" | sed "s#^[^\/]*\/##g" | sed "s/\(.*\)/#include \"\1\"/" | sort
 //
 #include "Sk1DPathEffect.h"
 #include "Sk2DPathEffect.h"
@@ -9,6 +9,7 @@
 #include "SkAnnotation.h"
 #include "SkArithmeticMode.h"
 #include "SkAvoidXfermode.h"
+#include "SkBBHFactory.h"
 #include "SkBicubicImageFilter.h"
 #include "SkBitmapDevice.h"
 #include "SkBitmap.h"
 #include "SkPathEffect.h"
 #include "SkPath.h"
 #include "SkPathMeasure.h"
+#include "SkPathOps.h"
 #include "SkPathRef.h"
 #include "SkPerlinNoiseShader.h"
 #include "SkPicture.h"
 #include "SkPictureImageFilter.h"
+#include "SkPictureRecorder.h"
 #include "SkPixelRef.h"
 #include "SkPixelXorXfermode.h"
 #include "SkPoint.h"
 #include "SkRefCnt.h"
 #include "SkRegion.h"
 #include "SkRRect.h"
+#include "SkRTreePicture.h"
 #include "SkScalar.h"
 #include "SkShader.h"
 #include "SkSize.h"
index 8e02a75..6aa186c 100644 (file)
@@ -258,8 +258,7 @@ type response struct {
 }
 
 // doCmd executes the given command line string in either the out/Debug
-// directory or the inout directory. Returns the stdout, and stderr in the case
-// of a non-zero exit code.
+// directory or the inout directory. Returns the stdout and stderr.
 func doCmd(commandLine string, moveToDebug bool) (string, error) {
        log.Printf("Command: %q\n", commandLine)
        programAndArgs := strings.SplitN(commandLine, " ", 2)
@@ -283,21 +282,13 @@ func doCmd(commandLine string, moveToDebug bool) (string, error) {
                cmd.Dir = abs
        }
        log.Printf("Run in directory: %q\n", cmd.Dir)
-       var stdOut bytes.Buffer
-       cmd.Stdout = &stdOut
-       var stdErr bytes.Buffer
-       cmd.Stderr = &stdErr
-       cmd.Start()
-       err = cmd.Wait()
-       message := stdOut.String()
-       log.Printf("StdOut: %s\n", message)
+       message, err := cmd.CombinedOutput()
+       log.Printf("StdOut + StdErr: %s\n", string(message))
        if err != nil {
                log.Printf("Exit status: %s\n", err.Error())
-               log.Printf("StdErr: %s\n", stdErr.String())
-               message += stdErr.String()
-               return message, fmt.Errorf("Failed to run command.")
+               return string(message), fmt.Errorf("Failed to run command.")
        }
-       return message, nil
+       return string(message), nil
 }
 
 // reportError formats an HTTP error response and also logs the detailed error message.
index 1f476f3..63f71b9 100644 (file)
@@ -7,6 +7,7 @@
       'include_dirs' : [
         '../src/core',
         '../src/images',
+        '../src/pathops',
         ],
        'sources': [
          '../experimental/webtry/result.cpp',