Changes the SkCanvas::readPixels API. Allows caller to read into prealloced bitmap pixels. Changes how clipping to device bounds is handled.

Review URL: http://codereview.appspot.com/5307077/



git-svn-id: http://skia.googlecode.com/svn/trunk@2584 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/device/xps/SkXPSDevice.h b/include/device/xps/SkXPSDevice.h
index 1fb9220..ed61ced 100644
--- a/include/device/xps/SkXPSDevice.h
+++ b/include/device/xps/SkXPSDevice.h
@@ -71,11 +71,6 @@
         return kVector_Capability;
     }
 
-    virtual bool readPixels(const SkIRect& srcRect,
-                            SkBitmap* bitmap) SK_OVERRIDE {
-        return false;
-    }
-
 protected:
     virtual void clear(SkColor color) SK_OVERRIDE;
 
@@ -146,6 +141,12 @@
         int x, int y,
         const SkPaint& paint) SK_OVERRIDE;
 
+    virtual bool onReadPixels(const SkBitmap* bitmap,
+                              int x,
+                              int y) SK_OVERRIDE {
+        return false;
+    }
+
 private:
     class TypefaceUse : ::SkNoncopyable {
     public: