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

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

Issue 499413002: SkTextBlob plumbing (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: review comments Created 6 years, 3 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
« no previous file with comments | « include/utils/SkDumpCanvas.h ('k') | include/utils/SkLuaCanvas.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 SkLua_DEFINED 8 #ifndef SkLua_DEFINED
9 #define SkLua_DEFINED 9 #define SkLua_DEFINED
10 10
11 #include "SkClipStack.h" 11 #include "SkClipStack.h"
12 #include "SkColor.h" 12 #include "SkColor.h"
13 #include "SkPathEffect.h" 13 #include "SkPathEffect.h"
14 #include "SkScalar.h" 14 #include "SkScalar.h"
15 #include "SkString.h" 15 #include "SkString.h"
16 16
17 struct lua_State; 17 struct lua_State;
18 18
19 class SkCanvas; 19 class SkCanvas;
20 class SkMatrix; 20 class SkMatrix;
21 class SkPaint; 21 class SkPaint;
22 class SkPath; 22 class SkPath;
23 struct SkRect; 23 struct SkRect;
24 class SkRRect; 24 class SkRRect;
25 class SkTextBlob;
25 26
26 #define SkScalarToLua(x) SkScalarToDouble(x) 27 #define SkScalarToLua(x) SkScalarToDouble(x)
27 #define SkLuaToScalar(x) SkDoubleToScalar(x) 28 #define SkLuaToScalar(x) SkDoubleToScalar(x)
28 29
29 class SkLua { 30 class SkLua {
30 public: 31 public:
31 static void Load(lua_State*); 32 static void Load(lua_State*);
32 33
33 SkLua(const char termCode[] = NULL); // creates a new L, will close it 34 SkLua(const char termCode[] = NULL); // creates a new L, will close it
34 SkLua(lua_State*); // uses L, will not close it 35 SkLua(lua_State*); // uses L, will not close it
(...skipping 18 matching lines...) Expand all
53 void pushScalar(SkScalar, const char tableKey[] = NULL); 54 void pushScalar(SkScalar, const char tableKey[] = NULL);
54 void pushRect(const SkRect&, const char tableKey[] = NULL); 55 void pushRect(const SkRect&, const char tableKey[] = NULL);
55 void pushRRect(const SkRRect&, const char tableKey[] = NULL); 56 void pushRRect(const SkRRect&, const char tableKey[] = NULL);
56 void pushDash(const SkPathEffect::DashInfo&, const char tableKey[] = NULL); 57 void pushDash(const SkPathEffect::DashInfo&, const char tableKey[] = NULL);
57 void pushMatrix(const SkMatrix&, const char tableKey[] = NULL); 58 void pushMatrix(const SkMatrix&, const char tableKey[] = NULL);
58 void pushPaint(const SkPaint&, const char tableKey[] = NULL); 59 void pushPaint(const SkPaint&, const char tableKey[] = NULL);
59 void pushPath(const SkPath&, const char tableKey[] = NULL); 60 void pushPath(const SkPath&, const char tableKey[] = NULL);
60 void pushCanvas(SkCanvas*, const char tableKey[] = NULL); 61 void pushCanvas(SkCanvas*, const char tableKey[] = NULL);
61 void pushClipStack(const SkClipStack&, const char tableKey[] = NULL); 62 void pushClipStack(const SkClipStack&, const char tableKey[] = NULL);
62 void pushClipStackElement(const SkClipStack::Element& element, const char ta bleKey[] = NULL); 63 void pushClipStackElement(const SkClipStack::Element& element, const char ta bleKey[] = NULL);
64 void pushTextBlob(const SkTextBlob*, const char tableKey[] = NULL);
63 65
64 // This SkCanvas lua methods is declared here to benefit from SkLua's friend ship with SkCanvas. 66 // This SkCanvas lua methods is declared here to benefit from SkLua's friend ship with SkCanvas.
65 static int lcanvas_getReducedClipStack(lua_State* L); 67 static int lcanvas_getReducedClipStack(lua_State* L);
66 68
67 private: 69 private:
68 lua_State* fL; 70 lua_State* fL;
69 SkString fTermCode; 71 SkString fTermCode;
70 bool fWeOwnL; 72 bool fWeOwnL;
71 }; 73 };
72 74
73 #endif 75 #endif
OLDNEW
« no previous file with comments | « include/utils/SkDumpCanvas.h ('k') | include/utils/SkLuaCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698