Baby step in making SkGpuDevice no longer derive from SkBitmapDevice

https://codereview.chromium.org/23641008/



git-svn-id: http://skia.googlecode.com/svn/trunk/src@11311 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/SkGpuDevice.cpp b/gpu/SkGpuDevice.cpp
index ea8a06e..a5c261c 100644
--- a/gpu/SkGpuDevice.cpp
+++ b/gpu/SkGpuDevice.cpp
@@ -569,6 +569,23 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
+void SkGpuDevice::getGlobalBounds(SkIRect* bounds) const {
+    if (NULL != bounds) {
+        const SkIPoint& origin = this->getOrigin();
+        bounds->setXYWH(origin.x(), origin.y(),
+                        this->width(), this->height());
+    }
+}
+
+SkBitmap::Config SkGpuDevice::config() const {
+    if (NULL == fRenderTarget) {
+        return SkBitmap::kNo_Config;
+    }
+
+    bool isOpaque;
+    return grConfig2skConfig(fRenderTarget->config(), &isOpaque);
+}
+
 void SkGpuDevice::clear(SkColor color) {
     SkIRect rect = SkIRect::MakeWH(this->width(), this->height());
     fContext->clear(&rect, SkColor2GrColor(color), fRenderTarget);
@@ -1554,7 +1571,7 @@
     // drawDevice is defined to be in device coords.
     CHECK_SHOULD_DRAW(draw, true);
 
-    GrRenderTarget* devRT = device->accessRenderTarget();
+    GrRenderTarget* devRT = dev->accessRenderTarget();
     GrTexture* devTex;
     if (NULL == (devTex = devRT->asTexture())) {
         return;