|
26 | 26 | #include <SkTDArray.h> |
27 | 27 | #include <SkTSearch.h> |
28 | 28 |
|
| 29 | +#include <cutils/compiler.h> |
| 30 | + |
29 | 31 | #include "DisplayListLogBuffer.h" |
30 | 32 | #include "OpenGLRenderer.h" |
31 | 33 | #include "utils/Functor.h" |
@@ -58,7 +60,7 @@ class DisplayListRenderer; |
58 | 60 | class DisplayList { |
59 | 61 | public: |
60 | 62 | DisplayList(const DisplayListRenderer& recorder); |
61 | | - ~DisplayList(); |
| 63 | + ANDROID_API ~DisplayList(); |
62 | 64 |
|
63 | 65 | // IMPORTANT: Update the intialization of OP_NAMES in the .cpp file |
64 | 66 | // when modifying this file |
@@ -107,13 +109,13 @@ class DisplayList { |
107 | 109 |
|
108 | 110 | void initFromDisplayListRenderer(const DisplayListRenderer& recorder, bool reusing = false); |
109 | 111 |
|
110 | | - size_t getSize(); |
| 112 | + ANDROID_API size_t getSize(); |
111 | 113 |
|
112 | 114 | bool replay(OpenGLRenderer& renderer, Rect& dirty, uint32_t level = 0); |
113 | 115 |
|
114 | 116 | void output(OpenGLRenderer& renderer, uint32_t level = 0); |
115 | 117 |
|
116 | | - static void outputLogBuffer(int fd); |
| 118 | + ANDROID_API static void outputLogBuffer(int fd); |
117 | 119 |
|
118 | 120 | void setRenderable(bool renderable) { |
119 | 121 | mIsRenderable = renderable; |
@@ -230,75 +232,76 @@ class DisplayList { |
230 | 232 | */ |
231 | 233 | class DisplayListRenderer: public OpenGLRenderer { |
232 | 234 | public: |
233 | | - DisplayListRenderer(); |
234 | | - ~DisplayListRenderer(); |
| 235 | + ANDROID_API DisplayListRenderer(); |
| 236 | + virtual ~DisplayListRenderer(); |
235 | 237 |
|
236 | | - DisplayList* getDisplayList(DisplayList* displayList); |
| 238 | + ANDROID_API DisplayList* getDisplayList(DisplayList* displayList); |
237 | 239 |
|
238 | | - void setViewport(int width, int height); |
239 | | - void prepareDirty(float left, float top, float right, float bottom, bool opaque); |
240 | | - void finish(); |
| 240 | + virtual void setViewport(int width, int height); |
| 241 | + virtual void prepareDirty(float left, float top, float right, float bottom, bool opaque); |
| 242 | + virtual void finish(); |
241 | 243 |
|
242 | | - bool callDrawGLFunction(Functor *functor, Rect& dirty); |
| 244 | + virtual bool callDrawGLFunction(Functor *functor, Rect& dirty); |
243 | 245 |
|
244 | | - void interrupt(); |
245 | | - void resume(); |
| 246 | + virtual void interrupt(); |
| 247 | + virtual void resume(); |
246 | 248 |
|
247 | | - int save(int flags); |
248 | | - void restore(); |
249 | | - void restoreToCount(int saveCount); |
| 249 | + virtual int save(int flags); |
| 250 | + virtual void restore(); |
| 251 | + virtual void restoreToCount(int saveCount); |
250 | 252 |
|
251 | | - int saveLayer(float left, float top, float right, float bottom, |
| 253 | + virtual int saveLayer(float left, float top, float right, float bottom, |
252 | 254 | SkPaint* p, int flags); |
253 | | - int saveLayerAlpha(float left, float top, float right, float bottom, |
| 255 | + virtual int saveLayerAlpha(float left, float top, float right, float bottom, |
254 | 256 | int alpha, int flags); |
255 | 257 |
|
256 | | - void translate(float dx, float dy); |
257 | | - void rotate(float degrees); |
258 | | - void scale(float sx, float sy); |
259 | | - void skew(float sx, float sy); |
| 258 | + virtual void translate(float dx, float dy); |
| 259 | + virtual void rotate(float degrees); |
| 260 | + virtual void scale(float sx, float sy); |
| 261 | + virtual void skew(float sx, float sy); |
260 | 262 |
|
261 | | - void setMatrix(SkMatrix* matrix); |
262 | | - void concatMatrix(SkMatrix* matrix); |
| 263 | + virtual void setMatrix(SkMatrix* matrix); |
| 264 | + virtual void concatMatrix(SkMatrix* matrix); |
263 | 265 |
|
264 | | - bool clipRect(float left, float top, float right, float bottom, SkRegion::Op op); |
| 266 | + virtual bool clipRect(float left, float top, float right, float bottom, SkRegion::Op op); |
265 | 267 |
|
266 | | - bool drawDisplayList(DisplayList* displayList, uint32_t width, uint32_t height, |
| 268 | + virtual bool drawDisplayList(DisplayList* displayList, uint32_t width, uint32_t height, |
267 | 269 | Rect& dirty, uint32_t level = 0); |
268 | | - void drawLayer(Layer* layer, float x, float y, SkPaint* paint); |
269 | | - void drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint); |
270 | | - void drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint); |
271 | | - void drawBitmap(SkBitmap* bitmap, float srcLeft, float srcTop, |
| 270 | + virtual void drawLayer(Layer* layer, float x, float y, SkPaint* paint); |
| 271 | + virtual void drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint); |
| 272 | + virtual void drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint); |
| 273 | + virtual void drawBitmap(SkBitmap* bitmap, float srcLeft, float srcTop, |
272 | 274 | float srcRight, float srcBottom, float dstLeft, float dstTop, |
273 | 275 | float dstRight, float dstBottom, SkPaint* paint); |
274 | | - void drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight, |
| 276 | + virtual void drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight, |
275 | 277 | float* vertices, int* colors, SkPaint* paint); |
276 | | - void drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int32_t* yDivs, |
| 278 | + virtual void drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int32_t* yDivs, |
277 | 279 | const uint32_t* colors, uint32_t width, uint32_t height, int8_t numColors, |
278 | 280 | float left, float top, float right, float bottom, SkPaint* paint); |
279 | | - void drawColor(int color, SkXfermode::Mode mode); |
280 | | - void drawRect(float left, float top, float right, float bottom, SkPaint* paint); |
281 | | - void drawRoundRect(float left, float top, float right, float bottom, |
| 281 | + virtual void drawColor(int color, SkXfermode::Mode mode); |
| 282 | + virtual void drawRect(float left, float top, float right, float bottom, SkPaint* paint); |
| 283 | + virtual void drawRoundRect(float left, float top, float right, float bottom, |
282 | 284 | float rx, float ry, SkPaint* paint); |
283 | | - void drawCircle(float x, float y, float radius, SkPaint* paint); |
284 | | - void drawOval(float left, float top, float right, float bottom, SkPaint* paint); |
285 | | - void drawArc(float left, float top, float right, float bottom, |
| 285 | + virtual void drawCircle(float x, float y, float radius, SkPaint* paint); |
| 286 | + virtual void drawOval(float left, float top, float right, float bottom, SkPaint* paint); |
| 287 | + virtual void drawArc(float left, float top, float right, float bottom, |
286 | 288 | float startAngle, float sweepAngle, bool useCenter, SkPaint* paint); |
287 | | - void drawPath(SkPath* path, SkPaint* paint); |
288 | | - void drawLines(float* points, int count, SkPaint* paint); |
289 | | - void drawPoints(float* points, int count, SkPaint* paint); |
290 | | - void drawText(const char* text, int bytesCount, int count, float x, float y, SkPaint* paint); |
| 289 | + virtual void drawPath(SkPath* path, SkPaint* paint); |
| 290 | + virtual void drawLines(float* points, int count, SkPaint* paint); |
| 291 | + virtual void drawPoints(float* points, int count, SkPaint* paint); |
| 292 | + virtual void drawText(const char* text, int bytesCount, int count, float x, float y, |
| 293 | + SkPaint* paint); |
291 | 294 |
|
292 | | - void resetShader(); |
293 | | - void setupShader(SkiaShader* shader); |
| 295 | + virtual void resetShader(); |
| 296 | + virtual void setupShader(SkiaShader* shader); |
294 | 297 |
|
295 | | - void resetColorFilter(); |
296 | | - void setupColorFilter(SkiaColorFilter* filter); |
| 298 | + virtual void resetColorFilter(); |
| 299 | + virtual void setupColorFilter(SkiaColorFilter* filter); |
297 | 300 |
|
298 | | - void resetShadow(); |
299 | | - void setupShadow(float radius, float dx, float dy, int color); |
| 301 | + virtual void resetShadow(); |
| 302 | + virtual void setupShadow(float radius, float dx, float dy, int color); |
300 | 303 |
|
301 | | - void reset(); |
| 304 | + ANDROID_API void reset(); |
302 | 305 |
|
303 | 306 | const SkWriter32& writeStream() const { |
304 | 307 | return mWriter; |
|
0 commit comments