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

Side by Side Diff: include/utils/SkLuaCanvas.h

Issue 23484007: call drawRect to try GrAARectRenderer if the path is a rect (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: check for inverse fill Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkLuaCanvas_DEFINED 8 #ifndef SkLuaCanvas_DEFINED
9 #define SkLuaCanvas_DEFINED 9 #define SkLuaCanvas_DEFINED
10 10
(...skipping 24 matching lines...) Expand all
35 virtual bool clipRect(const SkRect&, SkRegion::Op, bool) SK_OVERRIDE; 35 virtual bool clipRect(const SkRect&, SkRegion::Op, bool) SK_OVERRIDE;
36 virtual bool clipRRect(const SkRRect&, SkRegion::Op, bool) SK_OVERRIDE; 36 virtual bool clipRRect(const SkRRect&, SkRegion::Op, bool) SK_OVERRIDE;
37 virtual bool clipPath(const SkPath&, SkRegion::Op, bool) SK_OVERRIDE; 37 virtual bool clipPath(const SkPath&, SkRegion::Op, bool) SK_OVERRIDE;
38 virtual bool clipRegion(const SkRegion& deviceRgn, 38 virtual bool clipRegion(const SkRegion& deviceRgn,
39 SkRegion::Op) SK_OVERRIDE; 39 SkRegion::Op) SK_OVERRIDE;
40 40
41 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; 41 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
42 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], 42 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
43 const SkPaint& paint) SK_OVERRIDE; 43 const SkPaint& paint) SK_OVERRIDE;
44 virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE; 44 virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
45 virtual void drawRect(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
46 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE; 45 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE;
47 virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE;
48 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, 46 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
49 const SkPaint* paint) SK_OVERRIDE; 47 const SkPaint* paint) SK_OVERRIDE;
50 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, 48 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
51 const SkRect& dst, const SkPaint* paint, 49 const SkRect& dst, const SkPaint* paint,
52 DrawBitmapRectFlags flags) SK_OVERRIDE; 50 DrawBitmapRectFlags flags) SK_OVERRIDE;
53 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, 51 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m,
54 const SkPaint* paint) SK_OVERRIDE; 52 const SkPaint* paint) SK_OVERRIDE;
55 virtual void drawSprite(const SkBitmap& bitmap, int left, int top, 53 virtual void drawSprite(const SkBitmap& bitmap, int left, int top,
56 const SkPaint* paint) SK_OVERRIDE; 54 const SkPaint* paint) SK_OVERRIDE;
57 virtual void drawText(const void* text, size_t byteLength, SkScalar x, 55 virtual void drawText(const void* text, size_t byteLength, SkScalar x,
58 SkScalar y, const SkPaint& paint) SK_OVERRIDE; 56 SkScalar y, const SkPaint& paint) SK_OVERRIDE;
59 virtual void drawPosText(const void* text, size_t byteLength, 57 virtual void drawPosText(const void* text, size_t byteLength,
60 const SkPoint pos[], const SkPaint& paint) SK_OVERR IDE; 58 const SkPoint pos[], const SkPaint& paint) SK_OVERR IDE;
61 virtual void drawPosTextH(const void* text, size_t byteLength, 59 virtual void drawPosTextH(const void* text, size_t byteLength,
62 const SkScalar xpos[], SkScalar constY, 60 const SkScalar xpos[], SkScalar constY,
63 const SkPaint& paint) SK_OVERRIDE; 61 const SkPaint& paint) SK_OVERRIDE;
64 virtual void drawTextOnPath(const void* text, size_t byteLength, 62 virtual void drawTextOnPath(const void* text, size_t byteLength,
65 const SkPath& path, const SkMatrix* matrix, 63 const SkPath& path, const SkMatrix* matrix,
66 const SkPaint& paint) SK_OVERRIDE; 64 const SkPaint& paint) SK_OVERRIDE;
67 virtual void drawPicture(SkPicture&) SK_OVERRIDE; 65 virtual void drawPicture(SkPicture&) SK_OVERRIDE;
68 virtual void drawVertices(VertexMode vmode, int vertexCount, 66 virtual void drawVertices(VertexMode vmode, int vertexCount,
69 const SkPoint vertices[], const SkPoint texs[], 67 const SkPoint vertices[], const SkPoint texs[],
70 const SkColor colors[], SkXfermode* xmode, 68 const SkColor colors[], SkXfermode* xmode,
71 const uint16_t indices[], int indexCount, 69 const uint16_t indices[], int indexCount,
72 const SkPaint& paint) SK_OVERRIDE; 70 const SkPaint& paint) SK_OVERRIDE;
73 virtual void drawData(const void* data, size_t length) SK_OVERRIDE; 71 virtual void drawData(const void* data, size_t length) SK_OVERRIDE;
74 72
73 protected:
74 virtual void onDrawRect(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
75 virtual void onDrawPath(const SkPath& path, const SkPaint& paint) SK_OVERRID E;
76
75 private: 77 private:
76 lua_State* fL; 78 lua_State* fL;
77 SkString fFunc; 79 SkString fFunc;
78 80
79 void sendverb(const char verb[]); 81 void sendverb(const char verb[]);
80 82
81 typedef SkCanvas INHERITED; 83 typedef SkCanvas INHERITED;
82 }; 84 };
83 85
84 #endif 86 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698