Split SkDevice into SkBaseDevice and SkBitmapDevice
https://codereview.chromium.org/22978012/
git-svn-id: http://skia.googlecode.com/svn/trunk@10995 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h
index e64b83f..978dc1e 100644
--- a/include/pdf/SkPDFDevice.h
+++ b/include/pdf/SkPDFDevice.h
@@ -10,8 +10,8 @@
#ifndef SkPDFDevice_DEFINED
#define SkPDFDevice_DEFINED
+#include "SkBitmapDevice.h"
#include "SkCanvas.h"
-#include "SkDevice.h"
#include "SkPaint.h"
#include "SkPath.h"
#include "SkRect.h"
@@ -44,7 +44,7 @@
The drawing context for the PDF backend.
*/
-class SkPDFDevice : public SkDevice {
+class SkPDFDevice : public SkBitmapDevice {
public:
/** Create a PDF drawing context with the given width and height.
* 72 points/in means letter paper is 612x792.
@@ -107,7 +107,7 @@
const SkPoint texs[], const SkColor colors[],
SkXfermode* xmode, const uint16_t indices[],
int indexCount, const SkPaint& paint) SK_OVERRIDE;
- virtual void drawDevice(const SkDraw&, SkDevice*, int x, int y,
+ virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y,
const SkPaint&) SK_OVERRIDE;
virtual void onAttachToCanvas(SkCanvas* canvas) SK_OVERRIDE;
@@ -237,11 +237,11 @@
SkPDFDevice(const SkISize& layerSize, const SkClipStack& existingClipStack,
const SkRegion& existingClipRegion);
- // override from SkDevice
- virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config config,
- int width, int height,
- bool isOpaque,
- Usage usage) SK_OVERRIDE;
+ // override from SkBaseDevice
+ virtual SkBaseDevice* onCreateCompatibleDevice(SkBitmap::Config config,
+ int width, int height,
+ bool isOpaque,
+ Usage usage) SK_OVERRIDE;
void init();
void cleanUp(bool clearFontUsage);
@@ -310,7 +310,7 @@
void defineNamedDestination(SkData* nameData, const SkPoint& point,
const SkMatrix& matrix);
- typedef SkDevice INHERITED;
+ typedef SkBitmapDevice INHERITED;
};
#endif