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

Side by Side Diff: experimental/webtry/template.cpp

Issue 195143004: First pass at a web app that lets you run Skia code and see the results. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove stray png 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
« no previous file with comments | « experimental/webtry/server.py ('k') | gyp/everything.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #include "SkCanvas.h"
2 #include "SkGraphics.h"
3 #include "SkImageEncoder.h"
4 #include "SkImageInfo.h"
5 #include "SkForceLinking.h"
6
7 int main() {
8 SkForceLinking(false);
9 SkGraphics::Init();
10
11 SkImageInfo info = SkImageInfo::MakeN32(300, 300, kPremul_SkAlphaType);
12 SkBitmap bitmap;
13 bitmap.setConfig(info);
14 bitmap.allocPixels();
15 SkCanvas c(bitmap);
16 c.drawColor(SK_ColorWHITE);
17
18 $usercode
19
20 if (!SkImageEncoder::EncodeFile("foo.png", bitmap, SkImageEncoder::kPNG_Type , 100)) {
21 printf("Failed to encode\n");
22 }
23 }
OLDNEW
« no previous file with comments | « experimental/webtry/server.py ('k') | gyp/everything.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698