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

Side by Side Diff: samplecode/SampleTextAlpha.cpp

Issue 12480002: Fixing some warnings on Linux (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « samplecode/SampleSlides.cpp ('k') | samplecode/SampleUnitMapper.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 SkDebugf("------ byte %x\n", fByte); 87 SkDebugf("------ byte %x\n", fByte);
88 } 88 }
89 89
90 if (false) { 90 if (false) {
91 fByte += 1; 91 fByte += 1;
92 fByte &= 0xFF; 92 fByte &= 0xFF;
93 this->inval(NULL); 93 this->inval(NULL);
94 } 94 }
95 } 95 }
96 96
97 virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y) { 97 virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y, unsigned) SK_OVERRIDE {
98 return new Click(this); 98 return new Click(this);
99 } 99 }
100 100
101 virtual bool onClick(Click* click) { 101 virtual bool onClick(Click* click) {
102 int y = click->fICurr.fY; 102 int y = click->fICurr.fY;
103 if (y < 0) { 103 if (y < 0) {
104 y = 0; 104 y = 0;
105 } else if (y > 255) { 105 } else if (y > 255) {
106 y = 255; 106 y = 255;
107 } 107 }
108 fByte = y; 108 fByte = y;
109 this->inval(NULL); 109 this->inval(NULL);
110 return true; 110 return true;
111 } 111 }
112 112
113 private: 113 private:
114 int fByte; 114 int fByte;
115 115
116 typedef SampleView INHERITED; 116 typedef SampleView INHERITED;
117 }; 117 };
118 118
119 ////////////////////////////////////////////////////////////////////////////// 119 //////////////////////////////////////////////////////////////////////////////
120 120
121 static SkView* MyFactory() { return new TextAlphaView; } 121 static SkView* MyFactory() { return new TextAlphaView; }
122 static SkViewRegister reg(MyFactory); 122 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleSlides.cpp ('k') | samplecode/SampleUnitMapper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698