remove SkCanvas::createCompatibleDevice, and add SkCanvas::newSurface

BUG=skia:
R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13319 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/extractbitmap.cpp b/gm/extractbitmap.cpp
index efc5d35..6e7409d 100644
--- a/gm/extractbitmap.cpp
+++ b/gm/extractbitmap.cpp
@@ -1,15 +1,16 @@
-
 /*
  * Copyright 2011 Google Inc.
  *
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+
 #include "gm.h"
 #include "SkBitmap.h"
 #include "SkCanvas.h"
 #include "SkDevice.h"
 #include "SkString.h"
+#include "SkSurface.h"
 
 namespace skiagm {
 
@@ -71,24 +72,6 @@
             canvas->translate(0, SkIntToScalar(bitmap.height() + 20));
             canvas->drawBitmap(subset, 0, 0);
         }
-
-        // Now do the same but with a device bitmap as source image
-        SkAutoTUnref<SkBaseDevice> secondDevice(canvas->createCompatibleDevice(
-            SkBitmap::kARGB_8888_Config, bitmap.width(),
-            bitmap.height(), true));
-        SkCanvas secondCanvas(secondDevice.get());
-        secondCanvas.writePixels(bitmap, 0, 0);
-
-        SkBitmap deviceBitmap = secondDevice->accessBitmap(false);
-        SkBitmap deviceSubset;
-        deviceBitmap.extractSubset(&deviceSubset,
-             SkIRect::MakeXYWH(x, y, x, y));
-
-        canvas->translate(SkIntToScalar(120), SkIntToScalar(0));
-
-        canvas->drawBitmap(deviceBitmap, 0, 0);
-        canvas->drawBitmap(deviceSubset, 0, 0);
-
     }
 
 private: