reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 1 | #ifndef SkGLDevice_SWLayer_DEFINED |
| 2 | #define SkGLDevice_SWLayer_DEFINED |
| 3 | |
| 4 | #include "SkGLDevice.h" |
| 5 | |
| 6 | class SkGLDevice_SWLayer : public SkGLDevice { |
| 7 | public: |
| 8 | SkGLDevice_SWLayer(const SkBitmap& bitmap); |
| 9 | virtual ~SkGLDevice_SWLayer(); |
| 10 | |
| 11 | // overrides from SkGLDevice |
| 12 | virtual TexOrientation bindDeviceAsTexture(); |
| 13 | |
| 14 | // overrides from SkDevice |
| 15 | virtual void drawPaint(const SkDraw&, const SkPaint& paint); |
| 16 | virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, size_t count, |
| 17 | const SkPoint[], const SkPaint& paint); |
| 18 | virtual void drawRect(const SkDraw&, const SkRect& r, |
| 19 | const SkPaint& paint); |
| 20 | virtual void drawPath(const SkDraw&, const SkPath& path, |
| 21 | const SkPaint& paint); |
| 22 | virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap, |
| 23 | const SkMatrix& matrix, const SkPaint& paint); |
| 24 | virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, |
| 25 | int x, int y, const SkPaint& paint); |
| 26 | virtual void drawText(const SkDraw&, const void* text, size_t len, |
| 27 | SkScalar x, SkScalar y, const SkPaint& paint); |
| 28 | virtual void drawPosText(const SkDraw&, const void* text, size_t len, |
| 29 | const SkScalar pos[], SkScalar constY, |
| 30 | int scalarsPerPos, const SkPaint& paint); |
| 31 | virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, |
| 32 | const SkPath& path, const SkMatrix* matrix, |
| 33 | const SkPaint& paint); |
| 34 | virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCount, |
| 35 | const SkPoint verts[], const SkPoint texs[], |
| 36 | const SkColor colors[], SkXfermode* xmode, |
| 37 | const uint16_t indices[], int indexCount, |
| 38 | const SkPaint& paint); |
| 39 | virtual void drawDevice(const SkDraw&, SkDevice*, int x, int y, |
| 40 | const SkPaint&); |
| 41 | |
| 42 | private: |
| 43 | GLuint fTextureID; |
| 44 | |
| 45 | typedef SkGLDevice INHERITED; |
| 46 | }; |
| 47 | |
| 48 | #endif |
| 49 | |