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

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

Issue 313613004: Alter SkCanvas::drawPicture (devirtualize, take const SkPicture, take pointer) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add staging entry point for Chromium and Android Created 6 years, 6 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
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 drawPicture(SkPicture&) SK_OVERRIDE;
40 virtual void drawVertices(VertexMode vmode, int vertexCount, 39 virtual void drawVertices(VertexMode vmode, int vertexCount,
41 const SkPoint vertices[], const SkPoint texs[], 40 const SkPoint vertices[], const SkPoint texs[],
42 const SkColor colors[], SkXfermode* xmode, 41 const SkColor colors[], SkXfermode* xmode,
43 const uint16_t indices[], int indexCount, 42 const uint16_t indices[], int indexCount,
44 const SkPaint& paint) SK_OVERRIDE; 43 const SkPaint& paint) SK_OVERRIDE;
45 virtual void drawData(const void* data, size_t length) SK_OVERRIDE; 44 virtual void drawData(const void* data, size_t length) SK_OVERRIDE;
46 45
47 protected: 46 protected:
48 virtual void willSave(SaveFlags) SK_OVERRIDE; 47 virtual void willSave(SaveFlags) SK_OVERRIDE;
49 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF lags) SK_OVERRIDE; 48 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF lags) SK_OVERRIDE;
(...skipping 10 matching lines...) Expand all
60 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca lar xpos[], 59 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca lar xpos[],
61 SkScalar constY, const SkPaint&) SK_OVERRIDE; 60 SkScalar constY, const SkPaint&) SK_OVERRIDE;
62 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path, 61 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path,
63 const SkMatrix* matrix, const SkPaint&) SK_OVE RRIDE; 62 const SkMatrix* matrix, const SkPaint&) SK_OVE RRIDE;
64 63
65 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 64 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
66 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE; 65 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE;
67 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 66 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
68 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; 67 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE;
69 68
69 virtual void onDrawPicture(const SkPicture*) SK_OVERRIDE;
70
70 private: 71 private:
71 lua_State* fL; 72 lua_State* fL;
72 SkString fFunc; 73 SkString fFunc;
73 74
74 void sendverb(const char verb[]); 75 void sendverb(const char verb[]);
75 76
76 typedef SkCanvas INHERITED; 77 typedef SkCanvas INHERITED;
77 }; 78 };
78 79
79 #endif 80 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698