Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(472)

Unified Diff: include/pdf/SkPDFDevice.h

Issue 354133002: change gpudevice and pdfdevice to inherit from basedevice (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: include/pdf/SkPDFDevice.h
diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h
index e250a6de4f0658da5f887a30d38d9394d3e30753..c63c80f6ab6177e2ca324965b9c50c010d2e23f1 100644
--- a/include/pdf/SkPDFDevice.h
+++ b/include/pdf/SkPDFDevice.h
@@ -10,7 +10,7 @@
#ifndef SkPDFDevice_DEFINED
#define SkPDFDevice_DEFINED
-#include "SkBitmapDevice.h"
+#include "SkDevice.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkPaint.h"
@@ -45,7 +45,7 @@ struct NamedDestination;
The drawing context for the PDF backend.
*/
-class SkPDFDevice : public SkBitmapDevice {
+class SkPDFDevice : public SkBaseDevice {
public:
/** Create a PDF drawing context with the given width and height.
* 72 points/in means letter paper is 612x792.
@@ -82,8 +82,8 @@ public:
size_t count, const SkPoint[],
const SkPaint& paint) SK_OVERRIDE;
virtual void drawRect(const SkDraw&, const SkRect& r, const SkPaint& paint);
- virtual void drawRRect(const SkDraw&, const SkRRect& rr,
- const SkPaint& paint) SK_OVERRIDE;
+ virtual void drawOval(const SkDraw&, const SkRect& oval, const SkPaint& paint) SK_OVERRIDE;
+ virtual void drawRRect(const SkDraw&, const SkRRect& rr, const SkPaint& paint) SK_OVERRIDE;
virtual void drawPath(const SkDraw&, const SkPath& origpath,
const SkPaint& paint, const SkMatrix* prePathMatrix,
bool pathIsMutable) SK_OVERRIDE;
@@ -208,6 +208,7 @@ public:
}
protected:
+ virtual const SkBitmap& onAccessBitmap() SK_OVERRIDE;
virtual bool allowImageFilter(const SkImageFilter*) SK_OVERRIDE;
private:
@@ -248,6 +249,8 @@ private:
SkPicture::EncodeBitmap fEncoder;
SkScalar fRasterDpi;
+ SkBitmap fLegacyBitmap;
+
SkPDFDevice(const SkISize& layerSize, const SkClipStack& existingClipStack,
const SkRegion& existingClipRegion);
@@ -323,7 +326,7 @@ private:
void defineNamedDestination(SkData* nameData, const SkPoint& point,
const SkMatrix& matrix);
- typedef SkBitmapDevice INHERITED;
+ typedef SkBaseDevice INHERITED;
// TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to create
// an SkPDFDevice

Powered by Google App Engine
This is Rietveld 408576698