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

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

Issue 243853006: make drawText calls non-virtual, to ease SkFont and TextBlob (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: update SkRecord, don't infinitely recurse in SkBBoxRecord Created 6 years, 8 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
« no previous file with comments | « include/utils/SkDumpCanvas.h ('k') | include/utils/SkNWayCanvas.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 18 matching lines...) Expand all
29 virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE; 29 virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE;
30 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, 30 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
31 const SkPaint* paint) SK_OVERRIDE; 31 const SkPaint* paint) SK_OVERRIDE;
32 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, 32 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
33 const SkRect& dst, const SkPaint* paint, 33 const SkRect& dst, const SkPaint* paint,
34 DrawBitmapRectFlags flags) SK_OVERRIDE; 34 DrawBitmapRectFlags flags) SK_OVERRIDE;
35 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, 35 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m,
36 const SkPaint* paint) SK_OVERRIDE; 36 const SkPaint* paint) SK_OVERRIDE;
37 virtual void drawSprite(const SkBitmap& bitmap, int left, int top, 37 virtual void drawSprite(const SkBitmap& bitmap, int left, int top,
38 const SkPaint* paint) SK_OVERRIDE; 38 const SkPaint* paint) SK_OVERRIDE;
39 virtual void drawText(const void* text, size_t byteLength, SkScalar x,
40 SkScalar y, const SkPaint& paint) SK_OVERRIDE;
41 virtual void drawPosText(const void* text, size_t byteLength,
42 const SkPoint pos[], const SkPaint& paint) SK_OVERR IDE;
43 virtual void drawPosTextH(const void* text, size_t byteLength,
44 const SkScalar xpos[], SkScalar constY,
45 const SkPaint& paint) SK_OVERRIDE;
46 virtual void drawTextOnPath(const void* text, size_t byteLength,
47 const SkPath& path, const SkMatrix* matrix,
48 const SkPaint& paint) SK_OVERRIDE;
49 virtual void drawPicture(SkPicture&) SK_OVERRIDE; 39 virtual void drawPicture(SkPicture&) SK_OVERRIDE;
50 virtual void drawVertices(VertexMode vmode, int vertexCount, 40 virtual void drawVertices(VertexMode vmode, int vertexCount,
51 const SkPoint vertices[], const SkPoint texs[], 41 const SkPoint vertices[], const SkPoint texs[],
52 const SkColor colors[], SkXfermode* xmode, 42 const SkColor colors[], SkXfermode* xmode,
53 const uint16_t indices[], int indexCount, 43 const uint16_t indices[], int indexCount,
54 const SkPaint& paint) SK_OVERRIDE; 44 const SkPaint& paint) SK_OVERRIDE;
55 virtual void drawData(const void* data, size_t length) SK_OVERRIDE; 45 virtual void drawData(const void* data, size_t length) SK_OVERRIDE;
56 46
57 protected: 47 protected:
58 virtual void willSave(SaveFlags) SK_OVERRIDE; 48 virtual void willSave(SaveFlags) SK_OVERRIDE;
59 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF lags) SK_OVERRIDE; 49 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF lags) SK_OVERRIDE;
60 virtual void willRestore() SK_OVERRIDE; 50 virtual void willRestore() SK_OVERRIDE;
61 51
62 virtual void didConcat(const SkMatrix&) SK_OVERRIDE; 52 virtual void didConcat(const SkMatrix&) SK_OVERRIDE;
63 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE; 53 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE;
64 54
65 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK _OVERRIDE; 55 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK _OVERRIDE;
56 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS calar y,
57 const SkPaint&) SK_OVERRIDE;
58 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin t pos[],
59 const SkPaint&) SK_OVERRIDE;
60 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca lar xpos[],
61 SkScalar constY, const SkPaint&) SK_OVERRIDE;
62 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path,
63 const SkMatrix* matrix, const SkPaint&) SK_OVE RRIDE;
66 64
67 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 65 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
68 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE; 66 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE;
69 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 67 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
70 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; 68 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE;
71 69
72 private: 70 private:
73 lua_State* fL; 71 lua_State* fL;
74 SkString fFunc; 72 SkString fFunc;
75 73
76 void sendverb(const char verb[]); 74 void sendverb(const char verb[]);
77 75
78 typedef SkCanvas INHERITED; 76 typedef SkCanvas INHERITED;
79 }; 77 };
80 78
81 #endif 79 #endif
OLDNEW
« no previous file with comments | « include/utils/SkDumpCanvas.h ('k') | include/utils/SkNWayCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698