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

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

Issue 686853005: update slides (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 | « resources/slides_utils.lua ('k') | no next file » | 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 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1899 (SkTypeface::Style)style); 1899 (SkTypeface::Style)style);
1900 // SkDebugf("---- name <%s> style=%d, face=%p ref=%d\n", name, style, face, f ace->getRefCnt()); 1900 // SkDebugf("---- name <%s> style=%d, face=%p ref=%d\n", name, style, face, f ace->getRefCnt());
1901 if (NULL == face) { 1901 if (NULL == face) {
1902 face = SkTypeface::RefDefault(); 1902 face = SkTypeface::RefDefault();
1903 } 1903 }
1904 push_ref(L, face)->unref(); 1904 push_ref(L, face)->unref();
1905 return 1; 1905 return 1;
1906 } 1906 }
1907 1907
1908 static int lsk_newRasterSurface(lua_State* L) { 1908 static int lsk_newRasterSurface(lua_State* L) {
1909 int width = lua2int_def(L, 2, 0); 1909 int width = lua2int_def(L, 1, 0);
1910 int height = lua2int_def(L, 2, 0); 1910 int height = lua2int_def(L, 2, 0);
1911 SkImageInfo info = SkImageInfo::MakeN32Premul(width, height); 1911 SkImageInfo info = SkImageInfo::MakeN32Premul(width, height);
1912 SkSurface* surface = SkSurface::NewRaster(info); 1912 SkSurface* surface = SkSurface::NewRaster(info);
1913 if (NULL == surface) { 1913 if (NULL == surface) {
1914 lua_pushnil(L); 1914 lua_pushnil(L);
1915 } else { 1915 } else {
1916 push_ref(L, surface)->unref(); 1916 push_ref(L, surface)->unref();
1917 } 1917 }
1918 return 1; 1918 return 1;
1919 } 1919 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1982 REG_CLASS(L, SkSurface); 1982 REG_CLASS(L, SkSurface);
1983 REG_CLASS(L, SkTextBlob); 1983 REG_CLASS(L, SkTextBlob);
1984 REG_CLASS(L, SkTypeface); 1984 REG_CLASS(L, SkTypeface);
1985 } 1985 }
1986 1986
1987 extern "C" int luaopen_skia(lua_State* L); 1987 extern "C" int luaopen_skia(lua_State* L);
1988 extern "C" int luaopen_skia(lua_State* L) { 1988 extern "C" int luaopen_skia(lua_State* L) {
1989 SkLua::Load(L); 1989 SkLua::Load(L);
1990 return 0; 1990 return 0;
1991 } 1991 }
OLDNEW
« no previous file with comments | « resources/slides_utils.lua ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698