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

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

Issue 137833016: add SkCanvas constructor that explicitly creates no_config with dimensions (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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/utils/SkDumpCanvas.cpp ('k') | src/utils/SkNWayCanvas.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 "SkLuaCanvas.h" 8 #include "SkLuaCanvas.h"
9 #include "SkLua.h" 9 #include "SkLua.h"
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 67
68 /////////////////////////////////////////////////////////////////////////////// 68 ///////////////////////////////////////////////////////////////////////////////
69 69
70 void SkLuaCanvas::pushThis() { 70 void SkLuaCanvas::pushThis() {
71 SkLua(fL).pushCanvas(this); 71 SkLua(fL).pushCanvas(this);
72 } 72 }
73 73
74 /////////////////////////////////////////////////////////////////////////////// 74 ///////////////////////////////////////////////////////////////////////////////
75 75
76 static SkBitmap make_bm(int width, int height) {
77 SkBitmap bm;
78 bm.setConfig(SkBitmap::kNo_Config, width, height);
79 return bm;
80 }
81
82 SkLuaCanvas::SkLuaCanvas(int width, int height, lua_State* L, const char func[]) 76 SkLuaCanvas::SkLuaCanvas(int width, int height, lua_State* L, const char func[])
83 : INHERITED(make_bm(width, height)) 77 : INHERITED(width, height)
84 , fL(L) 78 , fL(L)
85 , fFunc(func) { 79 , fFunc(func) {
86 } 80 }
87 81
88 SkLuaCanvas::~SkLuaCanvas() {} 82 SkLuaCanvas::~SkLuaCanvas() {}
89 83
90 int SkLuaCanvas::save(SaveFlags flags) { 84 int SkLuaCanvas::save(SaveFlags flags) {
91 AUTO_LUA("save"); 85 AUTO_LUA("save");
92 return this->INHERITED::save(flags); 86 return this->INHERITED::save(flags);
93 } 87 }
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 const SkColor colors[], SkXfermode* xmode, 275 const SkColor colors[], SkXfermode* xmode,
282 const uint16_t indices[], int indexCount, 276 const uint16_t indices[], int indexCount,
283 const SkPaint& paint) { 277 const SkPaint& paint) {
284 AUTO_LUA("drawVertices"); 278 AUTO_LUA("drawVertices");
285 lua.pushPaint(paint, "paint"); 279 lua.pushPaint(paint, "paint");
286 } 280 }
287 281
288 void SkLuaCanvas::drawData(const void* data, size_t length) { 282 void SkLuaCanvas::drawData(const void* data, size_t length) {
289 AUTO_LUA("drawData"); 283 AUTO_LUA("drawData");
290 } 284 }
OLDNEW
« no previous file with comments | « src/utils/SkDumpCanvas.cpp ('k') | src/utils/SkNWayCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698