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

Unified Diff: skia/ext/vector_platform_device_skia.h

Issue 7633040: CL removing inheritance of SkDevice from PlatformDevice. Flavours of PlatformDevice classes now ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
« no previous file with comments | « skia/ext/vector_platform_device_emf_win.cc ('k') | skia/ext/vector_platform_device_skia.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/vector_platform_device_skia.h
===================================================================
--- skia/ext/vector_platform_device_skia.h (revision 98225)
+++ skia/ext/vector_platform_device_skia.h (working copy)
@@ -22,13 +22,13 @@
class BitmapPlatformDevice;
-class VectorPlatformDeviceSkia : public PlatformDevice {
+class VectorPlatformDeviceSkia : public PlatformDevice, public SkPDFDevice {
public:
- SK_API VectorPlatformDeviceSkia(SkPDFDevice* pdf_device);
+ SK_API VectorPlatformDeviceSkia(const SkISize& pageSize,
+ const SkISize& contentSize,
+ const SkMatrix& initialTransform);
virtual ~VectorPlatformDeviceSkia();
- SkPDFDevice* PdfDevice() { return pdf_device_.get(); }
-
// PlatformDevice methods.
virtual bool IsNativeFontRenderingAllowed();
@@ -40,56 +40,12 @@
virtual void DrawToNativeContext(CGContext* context, int x, int y,
const CGRect* src_rect);
virtual CGContextRef GetBitmapContext();
+#elif defined(OS_LINUX)
+ virtual void DrawToNativeContext(PlatformSurface surface, int x, int y,
+ const PlatformRect* src_rect);
#endif
- // SkDevice methods.
- virtual uint32_t getDeviceCapabilities();
- virtual int width() const;
- virtual int height() const;
- virtual void setMatrixClip(const SkMatrix& matrix, const SkRegion& region,
- const SkClipStack& stack);
- virtual bool readPixels(const SkIRect& srcRect, SkBitmap* bitmap);
-
- virtual void drawPaint(const SkDraw& draw, const SkPaint& paint);
- virtual void drawPoints(const SkDraw& draw, SkCanvas::PointMode mode,
- size_t count, const SkPoint[], const SkPaint& paint);
- virtual void drawRect(const SkDraw& draw, const SkRect& rect,
- const SkPaint& paint);
- virtual void drawPath(const SkDraw& draw, const SkPath& path,
- const SkPaint& paint, const SkMatrix* prePathMatrix,
- bool pathIsMutable);
- virtual void drawBitmap(const SkDraw& draw, const SkBitmap& bitmap,
- const SkIRect* srcRectOrNull, const SkMatrix& matrix,
- const SkPaint& paint);
- virtual void drawSprite(const SkDraw& draw, const SkBitmap& bitmap,
- int x, int y, const SkPaint& paint);
- virtual void drawText(const SkDraw& draw, const void* text, size_t len,
- SkScalar x, SkScalar y, const SkPaint& paint);
- virtual void drawPosText(const SkDraw& draw, const void* text, size_t len,
- const SkScalar pos[], SkScalar constY,
- int scalarsPerPos, const SkPaint& paint);
- virtual void drawTextOnPath(const SkDraw& draw, const void* text, size_t len,
- const SkPath& path, const SkMatrix* matrix,
- const SkPaint& paint);
- virtual void drawVertices(const SkDraw& draw, SkCanvas::VertexMode,
- int vertexCount, const SkPoint verts[],
- const SkPoint texs[], const SkColor colors[],
- SkXfermode* xmode, const uint16_t indices[],
- int indexCount, const SkPaint& paint);
- virtual void drawDevice(const SkDraw& draw, SkDevice*, int x, int y,
- const SkPaint&);
-
- // Sets the drawing area for the device. Subsequent draw calls are
- // directed to the specific drawing area (margin or content area).
- SK_API void setDrawingArea(SkPDFDevice::DrawingArea area);
-
- protected:
- virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config, int width,
- int height, bool isOpaque,
- Usage usage);
-
private:
- SkRefPtr<SkPDFDevice> pdf_device_;
SkRefPtr<BitmapPlatformDevice> raster_surface_;
DISALLOW_COPY_AND_ASSIGN(VectorPlatformDeviceSkia);
« no previous file with comments | « skia/ext/vector_platform_device_emf_win.cc ('k') | skia/ext/vector_platform_device_skia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698