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

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

Issue 196343015: Add nine patch type to SkRRect. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix inf loop in tests Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/effects/GrRRectEffect.cpp ('k') | src/utils/debugger/SkObjectParser.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 9
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 1201
1202 /////////////////////////////////////////////////////////////////////////////// 1202 ///////////////////////////////////////////////////////////////////////////////
1203 1203
1204 static const char* rrect_type(const SkRRect& rr) { 1204 static const char* rrect_type(const SkRRect& rr) {
1205 switch (rr.getType()) { 1205 switch (rr.getType()) {
1206 case SkRRect::kUnknown_Type: return "unknown"; 1206 case SkRRect::kUnknown_Type: return "unknown";
1207 case SkRRect::kEmpty_Type: return "empty"; 1207 case SkRRect::kEmpty_Type: return "empty";
1208 case SkRRect::kRect_Type: return "rect"; 1208 case SkRRect::kRect_Type: return "rect";
1209 case SkRRect::kOval_Type: return "oval"; 1209 case SkRRect::kOval_Type: return "oval";
1210 case SkRRect::kSimple_Type: return "simple"; 1210 case SkRRect::kSimple_Type: return "simple";
1211 case SkRRect::kNinePatch_Type: return "nine-patch";
1211 case SkRRect::kComplex_Type: return "complex"; 1212 case SkRRect::kComplex_Type: return "complex";
1212 } 1213 }
1213 SkDEBUGFAIL("never get here"); 1214 SkDEBUGFAIL("never get here");
1214 return ""; 1215 return "";
1215 } 1216 }
1216 1217
1217 static int lrrect_rect(lua_State* L) { 1218 static int lrrect_rect(lua_State* L) {
1218 SkLua(L).pushRect(get_obj<SkRRect>(L, 1)->rect()); 1219 SkLua(L).pushRect(get_obj<SkRRect>(L, 1)->rect());
1219 return 1; 1220 return 1;
1220 } 1221 }
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 REG_CLASS(L, SkShader); 1425 REG_CLASS(L, SkShader);
1425 REG_CLASS(L, SkTypeface); 1426 REG_CLASS(L, SkTypeface);
1426 REG_CLASS(L, SkMatrix); 1427 REG_CLASS(L, SkMatrix);
1427 } 1428 }
1428 1429
1429 extern "C" int luaopen_skia(lua_State* L); 1430 extern "C" int luaopen_skia(lua_State* L);
1430 extern "C" int luaopen_skia(lua_State* L) { 1431 extern "C" int luaopen_skia(lua_State* L) {
1431 SkLua::Load(L); 1432 SkLua::Load(L);
1432 return 0; 1433 return 0;
1433 } 1434 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrRRectEffect.cpp ('k') | src/utils/debugger/SkObjectParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698