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

Side by Side Diff: src/utils/SkLua.cpp

Issue 1014533004: SkPaint::FilterLevel -> SkFilterQuality (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | « src/ports/SkFontHost_FreeType_common.cpp ('k') | src/utils/debugger/SkDebugCanvas.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 #include "SkLua.h" 8 #include "SkLua.h"
9 9
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 static int lpaint_setTypeface(lua_State* L) { 920 static int lpaint_setTypeface(lua_State* L) {
921 get_obj<SkPaint>(L, 1)->setTypeface(get_ref<SkTypeface>(L, 2)); 921 get_obj<SkPaint>(L, 1)->setTypeface(get_ref<SkTypeface>(L, 2));
922 return 0; 922 return 0;
923 } 923 }
924 924
925 static int lpaint_getHinting(lua_State* L) { 925 static int lpaint_getHinting(lua_State* L) {
926 SkLua(L).pushU32(get_obj<SkPaint>(L, 1)->getHinting()); 926 SkLua(L).pushU32(get_obj<SkPaint>(L, 1)->getHinting());
927 return 1; 927 return 1;
928 } 928 }
929 929
930 static int lpaint_getFilterLevel(lua_State* L) { 930 static int lpaint_getFilterQuality(lua_State* L) {
931 SkLua(L).pushU32(get_obj<SkPaint>(L, 1)->getFilterLevel()); 931 SkLua(L).pushU32(get_obj<SkPaint>(L, 1)->getFilterQuality());
932 return 1; 932 return 1;
933 } 933 }
934 934
935 static int lpaint_setFilterLevel(lua_State* L) { 935 static int lpaint_setFilterQuality(lua_State* L) {
936 int level = lua2int_def(L, 2, -1); 936 int level = lua2int_def(L, 2, -1);
937 if (level >= 0 && level <= 3) { 937 if (level >= 0 && level <= 3) {
938 get_obj<SkPaint>(L, 1)->setFilterLevel((SkPaint::FilterLevel)level); 938 get_obj<SkPaint>(L, 1)->setFilterQuality((SkFilterQuality)level);
939 } 939 }
940 return 0; 940 return 0;
941 } 941 }
942 942
943 static int lpaint_getFontID(lua_State* L) { 943 static int lpaint_getFontID(lua_State* L) {
944 SkTypeface* face = get_obj<SkPaint>(L, 1)->getTypeface(); 944 SkTypeface* face = get_obj<SkPaint>(L, 1)->getTypeface();
945 SkLua(L).pushU32(SkTypeface::UniqueID(face)); 945 SkLua(L).pushU32(SkTypeface::UniqueID(face));
946 return 1; 946 return 1;
947 } 947 }
948 948
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 static int lpaint_gc(lua_State* L) { 1124 static int lpaint_gc(lua_State* L) {
1125 get_obj<SkPaint>(L, 1)->~SkPaint(); 1125 get_obj<SkPaint>(L, 1)->~SkPaint();
1126 return 0; 1126 return 0;
1127 } 1127 }
1128 1128
1129 static const struct luaL_Reg gSkPaint_Methods[] = { 1129 static const struct luaL_Reg gSkPaint_Methods[] = {
1130 { "isAntiAlias", lpaint_isAntiAlias }, 1130 { "isAntiAlias", lpaint_isAntiAlias },
1131 { "setAntiAlias", lpaint_setAntiAlias }, 1131 { "setAntiAlias", lpaint_setAntiAlias },
1132 { "isDither", lpaint_isDither }, 1132 { "isDither", lpaint_isDither },
1133 { "setDither", lpaint_setDither }, 1133 { "setDither", lpaint_setDither },
1134 { "getFilterLevel", lpaint_getFilterLevel }, 1134 { "getFilterQuality", lpaint_getFilterQuality },
1135 { "setFilterLevel", lpaint_setFilterLevel }, 1135 { "setFilterQuality", lpaint_setFilterQuality },
1136 { "isUnderlineText", lpaint_isUnderlineText }, 1136 { "isUnderlineText", lpaint_isUnderlineText },
1137 { "isStrikeThruText", lpaint_isStrikeThruText }, 1137 { "isStrikeThruText", lpaint_isStrikeThruText },
1138 { "isFakeBoldText", lpaint_isFakeBoldText }, 1138 { "isFakeBoldText", lpaint_isFakeBoldText },
1139 { "isLinearText", lpaint_isLinearText }, 1139 { "isLinearText", lpaint_isLinearText },
1140 { "isSubpixelText", lpaint_isSubpixelText }, 1140 { "isSubpixelText", lpaint_isSubpixelText },
1141 { "setSubpixelText", lpaint_setSubpixelText }, 1141 { "setSubpixelText", lpaint_setSubpixelText },
1142 { "isDevKernText", lpaint_isDevKernText }, 1142 { "isDevKernText", lpaint_isDevKernText },
1143 { "isLCDRenderText", lpaint_isLCDRenderText }, 1143 { "isLCDRenderText", lpaint_isLCDRenderText },
1144 { "setLCDRenderText", lpaint_setLCDRenderText }, 1144 { "setLCDRenderText", lpaint_setLCDRenderText },
1145 { "isEmbeddedBitmapText", lpaint_isEmbeddedBitmapText }, 1145 { "isEmbeddedBitmapText", lpaint_isEmbeddedBitmapText },
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
2064 REG_CLASS(L, SkSurface); 2064 REG_CLASS(L, SkSurface);
2065 REG_CLASS(L, SkTextBlob); 2065 REG_CLASS(L, SkTextBlob);
2066 REG_CLASS(L, SkTypeface); 2066 REG_CLASS(L, SkTypeface);
2067 } 2067 }
2068 2068
2069 extern "C" int luaopen_skia(lua_State* L); 2069 extern "C" int luaopen_skia(lua_State* L);
2070 extern "C" int luaopen_skia(lua_State* L) { 2070 extern "C" int luaopen_skia(lua_State* L) {
2071 SkLua::Load(L); 2071 SkLua::Load(L);
2072 return 0; 2072 return 0;
2073 } 2073 }
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_FreeType_common.cpp ('k') | src/utils/debugger/SkDebugCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698