add surfaceprops to SkWindow, and 'D' to toggle distancefieldfonts

BUG=skia:

Review URL: https://codereview.chromium.org/631943002
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index 6ca67bc..1b766b0 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -275,7 +275,8 @@
                                      SampleWindow* win) SK_OVERRIDE {
 #if SK_SUPPORT_GPU
         if (IsGpuDeviceType(dType) && fCurContext) {
-            return SkSurface::NewRenderTargetDirect(fCurRenderTarget);
+            SkSurfaceProps props(win->getSurfaceProps());
+            return SkSurface::NewRenderTargetDirect(fCurRenderTarget, &props);
         }
 #endif
         return NULL;
@@ -1715,6 +1716,9 @@
             post_event_to_sink(SkNEW_ARGS(SkEvent, (gUpdateWindowTitleEvtName)), this);
             this->inval(NULL);
             break;
+        case 'D':
+            toggleDistanceFieldFonts();
+            break;
         case 'f':
             // only
             toggleFPS();
@@ -1812,6 +1816,15 @@
     this->inval(NULL);
 }
 
+void SampleWindow::toggleDistanceFieldFonts() {
+    SkSurfaceProps props = this->getSurfaceProps();
+    uint32_t flags = props.flags() ^ SkSurfaceProps::kUseDistanceFieldFonts_Flag;
+    this->setSurfaceProps(SkSurfaceProps(flags, props.pixelGeometry()));
+
+    this->updateTitle();
+    this->inval(NULL);
+}
+
 #include "SkDumpCanvas.h"
 
 bool SampleWindow::onHandleKey(SkKey key) {
@@ -2023,6 +2036,9 @@
     if (fPerspAnim) {
         title.prepend("<K> ");
     }
+    if (this->getSurfaceProps().flags() & SkSurfaceProps::kUseDistanceFieldFonts_Flag) {
+        title.prepend("<DFF> ");
+    }
 
     title.prepend(trystate_str(fLCDState, "LCD ", "lcd "));
     title.prepend(trystate_str(fAAState, "AA ", "aa "));