OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef SkGpuDevice_DEFINED | 9 #ifndef SkGpuDevice_DEFINED |
10 #define SkGpuDevice_DEFINED | 10 #define SkGpuDevice_DEFINED |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 const SkPaint& paint, const SkMatrix* prePathMatrix, | 85 const SkPaint& paint, const SkMatrix* prePathMatrix, |
86 bool pathIsMutable) SK_OVERRIDE; | 86 bool pathIsMutable) SK_OVERRIDE; |
87 virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap, | 87 virtual void drawBitmap(const SkDraw&, const SkBitmap& bitmap, |
88 const SkMatrix&, const SkPaint&) SK_OVERRIDE; | 88 const SkMatrix&, const SkPaint&) SK_OVERRIDE; |
89 virtual void drawBitmapRect(const SkDraw&, const SkBitmap&, | 89 virtual void drawBitmapRect(const SkDraw&, const SkBitmap&, |
90 const SkRect* srcOrNull, const SkRect& dst, | 90 const SkRect* srcOrNull, const SkRect& dst, |
91 const SkPaint& paint, | 91 const SkPaint& paint, |
92 SkCanvas::DrawBitmapRectFlags flags) SK_OVERRIDE
; | 92 SkCanvas::DrawBitmapRectFlags flags) SK_OVERRIDE
; |
93 virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, | 93 virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, |
94 int x, int y, const SkPaint& paint) SK_OVERRIDE; | 94 int x, int y, const SkPaint& paint) SK_OVERRIDE; |
| 95 virtual void drawImage(const SkDraw&, const SkImage& image, |
| 96 int x, int y, const SkPaint& paint) SK_OVERRIDE; |
95 virtual void drawText(const SkDraw&, const void* text, size_t len, | 97 virtual void drawText(const SkDraw&, const void* text, size_t len, |
96 SkScalar x, SkScalar y, const SkPaint&) SK_OVERRIDE; | 98 SkScalar x, SkScalar y, const SkPaint&) SK_OVERRIDE; |
97 virtual void drawPosText(const SkDraw&, const void* text, size_t len, | 99 virtual void drawPosText(const SkDraw&, const void* text, size_t len, |
98 const SkScalar pos[], int scalarsPerPos, | 100 const SkScalar pos[], int scalarsPerPos, |
99 const SkPoint& offset, const SkPaint&) SK_OVERRIDE; | 101 const SkPoint& offset, const SkPaint&) SK_OVERRIDE; |
100 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, | 102 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, |
101 const SkPath& path, const SkMatrix* matrix, | 103 const SkPath& path, const SkMatrix* matrix, |
102 const SkPaint&) SK_OVERRIDE; | 104 const SkPaint&) SK_OVERRIDE; |
103 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou
nt, | 105 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou
nt, |
104 const SkPoint verts[], const SkPoint texs[], | 106 const SkPoint verts[], const SkPoint texs[], |
105 const SkColor colors[], SkXfermode* xmode, | 107 const SkColor colors[], SkXfermode* xmode, |
106 const uint16_t indices[], int indexCount, | 108 const uint16_t indices[], int indexCount, |
107 const SkPaint&) SK_OVERRIDE; | 109 const SkPaint&) SK_OVERRIDE; |
108 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, | 110 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, |
109 const SkPaint&) SK_OVERRIDE; | 111 const SkPaint&) SK_OVERRIDE; |
110 | 112 |
111 void flush() SK_OVERRIDE; | 113 void flush() SK_OVERRIDE; |
112 | 114 |
113 void onAttachToCanvas(SkCanvas* canvas) SK_OVERRIDE; | 115 void onAttachToCanvas(SkCanvas* canvas) SK_OVERRIDE; |
114 void onDetachFromCanvas() SK_OVERRIDE; | 116 void onDetachFromCanvas() SK_OVERRIDE; |
115 | 117 |
116 const SkBitmap& onAccessBitmap() SK_OVERRIDE; | 118 const SkBitmap& onAccessBitmap() SK_OVERRIDE; |
117 | 119 |
118 bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE; | 120 bool canHandleImageFilter(const SkImageFilter*) SK_OVERRIDE; |
119 virtual bool filterImage(const SkImageFilter*, const SkBitmap&, | 121 virtual bool filterImage(const SkImageFilter*, SkImage&, |
120 const SkImageFilter::Context&, | 122 const SkImageFilter::Context&, |
121 SkBitmap*, SkIPoint*) SK_OVERRIDE; | 123 SkAutoTUnref<SkImage>&, SkIPoint*) SK_OVERRIDE; |
122 | 124 |
123 bool filterTexture(GrContext*, GrTexture*, const SkImageFilter*, | 125 bool filterTexture(GrContext*, GrTexture*, const SkImageFilter*, |
124 const SkImageFilter::Context&, | 126 const SkImageFilter::Context&, |
125 SkBitmap* result, SkIPoint* offset); | 127 SkAutoTUnref<SkImage>& result, SkIPoint* offset); |
126 | 128 |
127 protected: | 129 protected: |
128 bool onReadPixels(const SkImageInfo&, void*, size_t, int, int) SK_OVERRIDE; | 130 bool onReadPixels(const SkImageInfo&, void*, size_t, int, int) SK_OVERRIDE; |
129 bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int) SK_OVE
RRIDE; | 131 bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int) SK_OVE
RRIDE; |
130 bool onShouldDisableLCD(const SkPaint&) const SK_OVERRIDE; | 132 bool onShouldDisableLCD(const SkPaint&) const SK_OVERRIDE; |
131 | 133 |
132 /** PRIVATE / EXPERIMENTAL -- do not call */ | 134 /** PRIVATE / EXPERIMENTAL -- do not call */ |
133 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* pic
ture, | 135 virtual bool EXPERIMENTAL_drawPicture(SkCanvas* canvas, const SkPicture* pic
ture, |
134 const SkMatrix*, const SkPaint*) SK_OV
ERRIDE; | 136 const SkMatrix*, const SkPaint*) SK_OV
ERRIDE; |
135 | 137 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 bool bicubic); | 201 bool bicubic); |
200 | 202 |
201 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); | 203 bool drawDashLine(const SkPoint pts[2], const SkPaint& paint); |
202 | 204 |
203 static SkPicture::AccelData::Key ComputeAccelDataKey(); | 205 static SkPicture::AccelData::Key ComputeAccelDataKey(); |
204 | 206 |
205 typedef SkBaseDevice INHERITED; | 207 typedef SkBaseDevice INHERITED; |
206 }; | 208 }; |
207 | 209 |
208 #endif | 210 #endif |
OLD | NEW |