diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-11-02 19:34:16 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-11-02 19:34:16 +0000 |
commit | 1a8ddf0a35bfb6c21a1184f81d2fdd50053acf31 (patch) | |
tree | 6c1148f08fe38ca8bcca95ae47472ed4f6910fc0 /include/pdf/SkPDFDevice.h | |
parent | c8e51782f89ba79497578c1f683b7eb471c34bc0 (diff) |
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
Diffstat (limited to 'include/pdf/SkPDFDevice.h')
-rw-r--r-- | include/pdf/SkPDFDevice.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h index 9e985e7702..b25e39a7d0 100644 --- a/include/pdf/SkPDFDevice.h +++ b/include/pdf/SkPDFDevice.h @@ -66,10 +66,6 @@ public: virtual void clear(SkColor color); - virtual bool readPixels(const SkIRect& srcRect, SkBitmap* bitmap) { - return false; - } - /** These are called inside the per-device-layer loop for each draw call. When these are called, we have already applied any saveLayer operations, and are handling any looping from the paint, and any effects from the @@ -160,6 +156,13 @@ public: const SkPDFGlyphSetMap& getFontGlyphUsage() const { return *(fFontGlyphUsage.get()); } + +protected: + virtual bool onReadPixels(const SkBitmap* bitmap, + int x, int y) SK_OVERRIDE { + return false; + } + private: // TODO(vandebo): push most of SkPDFDevice's state into a core object in |