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

Side by Side Diff: tools/lua/lua_pictures.cpp

Issue 313613004: Alter SkCanvas::drawPicture (devirtualize, take const SkPicture, take pointer) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add staging entry point for Chromium and Android Created 6 years, 6 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
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 "LazyDecodeBitmap.h" 8 #include "LazyDecodeBitmap.h"
9 #include "SkLua.h" 9 #include "SkLua.h"
10 #include "SkLuaCanvas.h" 10 #include "SkLuaCanvas.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 SkDebugf("scraping %s %s\n", path, moduloStr.c_str()); 151 SkDebugf("scraping %s %s\n", path, moduloStr.c_str());
152 } 152 }
153 153
154 SkAutoTUnref<SkPicture> pic(load_picture(path)); 154 SkAutoTUnref<SkPicture> pic(load_picture(path));
155 if (pic.get()) { 155 if (pic.get()) {
156 SkAutoTUnref<SkLuaCanvas> canvas( 156 SkAutoTUnref<SkLuaCanvas> canvas(
157 new SkLuaCanvas(pic->width(), pic->height(), 157 new SkLuaCanvas(pic->width(), pic->height(),
158 L.get(), gAccumulateFunc)); 158 L.get(), gAccumulateFunc));
159 159
160 call_canvas(L.get(), canvas.get(), path, gStartCanvasFunc); 160 call_canvas(L.get(), canvas.get(), path, gStartCanvasFunc);
161 canvas->drawPicture(*pic); 161 canvas->drawPicture(pic);
162 call_canvas(L.get(), canvas.get(), path, gEndCanvasFunc); 162 call_canvas(L.get(), canvas.get(), path, gEndCanvasFunc);
163 163
164 } else { 164 } else {
165 SkDebugf("failed to load\n"); 165 SkDebugf("failed to load\n");
166 } 166 }
167 } 167 }
168 } 168 }
169 return 0; 169 return 0;
170 } 170 }
171 171
172 #if !defined SK_BUILD_FOR_IOS 172 #if !defined SK_BUILD_FOR_IOS
173 int main(int argc, char * const argv[]) { 173 int main(int argc, char * const argv[]) {
174 return tool_main(argc, (char**) argv); 174 return tool_main(argc, (char**) argv);
175 } 175 }
176 #endif 176 #endif
OLDNEW
« include/core/SkCanvas.h ('K') | « tools/PictureRenderer.cpp ('k') | tools/pinspect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698