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

Side by Side Diff: site/user/sample/hello.md

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web Created 5 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 | « site/dev/contrib/style.md ('k') | src/animator/SkAnimate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Creating a Skia "Hello World!" 1 Creating a Skia "Hello World!"
2 ============================== 2 ==============================
3 3
4 This tutorial will guide you through the steps to create a Hello World Desktop 4 This tutorial will guide you through the steps to create a Hello World Desktop
5 application in Skia. 5 application in Skia.
6 6
7 Who this tutorial is for: 7 Who this tutorial is for:
8 ------------------------- 8 -------------------------
9 9
10 This will be useful to you if you want to create a window that can receive 10 This will be useful to you if you want to create a window that can receive
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 HelloTutorial(SkExampleWindow* window) 66 HelloTutorial(SkExampleWindow* window)
67 : SkExample(window) 67 : SkExample(window)
68 { 68 {
69 fName = "Tutorial"; // This is how Skia will find your example. 69 fName = "Tutorial"; // This is how Skia will find your example.
70 70
71 fWindow->setupBackend(SkExampleWindow::kGPU_DeviceType); 71 fWindow->setupBackend(SkExampleWindow::kGPU_DeviceType);
72 // Another option is the CPU backend: fWindow->setupBackend(kRaster_ DeviceType); 72 // Another option is the CPU backend: fWindow->setupBackend(kRaster_ DeviceType);
73 } 73 }
74 74
75 protected: 75 protected:
76 void draw(SkCanvas* canvas) SK_OVERRIDE { 76 void draw(SkCanvas* canvas) override {
77 // Clear background 77 // Clear background
78 canvas->drawColor(SK_ColorWHITE); 78 canvas->drawColor(SK_ColorWHITE);
79 79
80 SkPaint paint; 80 SkPaint paint;
81 // Draw a message with a nice black paint. 81 // Draw a message with a nice black paint.
82 paint.setFlags(SkPaint::kAntiAlias_Flag); 82 paint.setFlags(SkPaint::kAntiAlias_Flag);
83 paint.setColor(SK_ColorBLACK); 83 paint.setColor(SK_ColorBLACK);
84 paint.setTextSize(SkIntToScalar(20)); 84 paint.setTextSize(SkIntToScalar(20));
85 85
86 static const char message[] = "Hello World!"; 86 static const char message[] = "Hello World!";
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 $> out/Release/SkiaExamples --match Tutorial 121 $> out/Release/SkiaExamples --match Tutorial
122 122
123 Step 5: How to iterate through multiple examples 123 Step 5: How to iterate through multiple examples
124 ------------------------------------------------ 124 ------------------------------------------------
125 125
126 If you did not specify an example with the `--match` flag, or if your match 126 If you did not specify an example with the `--match` flag, or if your match
127 string matches more than one example, you can use the *n* key to iterate 127 string matches more than one example, you can use the *n* key to iterate
128 through all of the examples registered. 128 through all of the examples registered.
129 129
OLDNEW
« no previous file with comments | « site/dev/contrib/style.md ('k') | src/animator/SkAnimate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698