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

Side by Side Diff: tools/skhello.cpp

Issue 670453002: Remove image decoder and encoder autoregistration (Closed) Base URL: https://skia.googlesource.com/skia.git@separate-image-decoder-01-skpicture
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 | « tools/skdiff_main.cpp ('k') | tools/skimage_main.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 2011 Google Inc. 2 * Copyright 2011 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 "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkCommandLineFlags.h" 9 #include "SkCommandLineFlags.h"
10 #include "SkData.h" 10 #include "SkData.h"
11 #include "SkDocument.h" 11 #include "SkDocument.h"
12 #include "SkForceLinking.h"
13 #include "SkGraphics.h" 12 #include "SkGraphics.h"
14 #include "SkSurface.h" 13 #include "SkSurface.h"
15 #include "SkImage.h" 14 #include "SkImage.h"
16 #include "SkStream.h" 15 #include "SkStream.h"
17 #include "SkString.h" 16 #include "SkString.h"
18 17
19 __SK_FORCE_IMAGE_DECODER_LINKING;
20
21 DEFINE_string2(outFile, o, "skhello", "The filename to write the image."); 18 DEFINE_string2(outFile, o, "skhello", "The filename to write the image.");
22 DEFINE_string2(text, t, "Hello", "The string to write."); 19 DEFINE_string2(text, t, "Hello", "The string to write.");
23 20
24 static void doDraw(SkCanvas* canvas, const SkPaint& paint, const char text[]) { 21 static void doDraw(SkCanvas* canvas, const SkPaint& paint, const char text[]) {
25 SkRect bounds; 22 SkRect bounds;
26 canvas->getClipBounds(&bounds); 23 canvas->getClipBounds(&bounds);
27 24
28 canvas->drawColor(SK_ColorWHITE); 25 canvas->drawColor(SK_ColorWHITE);
29 canvas->drawText(text, strlen(text), 26 canvas->drawText(text, strlen(text),
30 bounds.centerX(), bounds.centerY(), 27 bounds.centerX(), bounds.centerY(),
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 98 }
102 } 99 }
103 return 0; 100 return 0;
104 } 101 }
105 102
106 #if !defined SK_BUILD_FOR_IOS 103 #if !defined SK_BUILD_FOR_IOS
107 int main(int argc, char * const argv[]) { 104 int main(int argc, char * const argv[]) {
108 return tool_main(argc, (char**) argv); 105 return tool_main(argc, (char**) argv);
109 } 106 }
110 #endif 107 #endif
OLDNEW
« no previous file with comments | « tools/skdiff_main.cpp ('k') | tools/skimage_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698