Chromium Code Reviews| Index: gm/extractbitmap.cpp |
| diff --git a/gm/extractbitmap.cpp b/gm/extractbitmap.cpp |
| index efc5d3531a4a9ea8e27a5ff984bc69b5832836fb..6e7409da2de45c03b646bf6d6b595b3372e9ffa5 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" |
|
scroggo
2014/02/05 16:41:12
Did you mean to call newSurface in this file? It c
|
| namespace skiagm { |
| @@ -71,24 +72,6 @@ protected: |
| 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: |