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

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

Issue 147683003: fix more 64bit warnings (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 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 | « src/ports/SkImageDecoder_CG.cpp ('k') | src/utils/SkLuaCanvas.cpp » ('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 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 SkLua(L).pushRect(get_obj<SkRRect>(L, 1)->rect()); 1022 SkLua(L).pushRect(get_obj<SkRRect>(L, 1)->rect());
1023 return 1; 1023 return 1;
1024 } 1024 }
1025 1025
1026 static int lrrect_type(lua_State* L) { 1026 static int lrrect_type(lua_State* L) {
1027 lua_pushstring(L, rrect_type(*get_obj<SkRRect>(L, 1))); 1027 lua_pushstring(L, rrect_type(*get_obj<SkRRect>(L, 1)));
1028 return 1; 1028 return 1;
1029 } 1029 }
1030 1030
1031 static int lrrect_radii(lua_State* L) { 1031 static int lrrect_radii(lua_State* L) {
1032 int corner = lua_tointeger(L, 2); 1032 int corner = SkToInt(lua_tointeger(L, 2));
1033 SkVector v; 1033 SkVector v;
1034 if (corner < 0 || corner > 3) { 1034 if (corner < 0 || corner > 3) {
1035 SkDebugf("bad corner index %d", corner); 1035 SkDebugf("bad corner index %d", corner);
1036 v.set(0, 0); 1036 v.set(0, 0);
1037 } else { 1037 } else {
1038 v = get_obj<SkRRect>(L, 1)->radii((SkRRect::Corner)corner); 1038 v = get_obj<SkRRect>(L, 1)->radii((SkRRect::Corner)corner);
1039 } 1039 }
1040 lua_pushnumber(L, v.fX); 1040 lua_pushnumber(L, v.fX);
1041 lua_pushnumber(L, v.fY); 1041 lua_pushnumber(L, v.fY);
1042 return 2; 1042 return 2;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 REG_CLASS(L, SkShader); 1228 REG_CLASS(L, SkShader);
1229 REG_CLASS(L, SkTypeface); 1229 REG_CLASS(L, SkTypeface);
1230 REG_CLASS(L, SkMatrix); 1230 REG_CLASS(L, SkMatrix);
1231 } 1231 }
1232 1232
1233 extern "C" int luaopen_skia(lua_State* L); 1233 extern "C" int luaopen_skia(lua_State* L);
1234 extern "C" int luaopen_skia(lua_State* L) { 1234 extern "C" int luaopen_skia(lua_State* L) {
1235 SkLua::Load(L); 1235 SkLua::Load(L);
1236 return 0; 1236 return 0;
1237 } 1237 }
OLDNEW
« no previous file with comments | « src/ports/SkImageDecoder_CG.cpp ('k') | src/utils/SkLuaCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698