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

Side by Side Diff: gm/bitmapfilters.cpp

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « gm/bitmapcopy.cpp ('k') | gm/bitmaprect.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 "gm.h" 8 #include "gm.h"
9 #include "sk_tool_utils.h" 9 #include "sk_tool_utils.h"
10 10
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 paint.setAntiAlias(true); 124 paint.setAntiAlias(true);
125 paint.setColor(SK_ColorBLUE); 125 paint.setColor(SK_ColorBLUE);
126 paint.setStyle(SkPaint::kStroke_Style); 126 paint.setStyle(SkPaint::kStroke_Style);
127 paint.setStrokeWidth(20); 127 paint.setStrokeWidth(20);
128 128
129 canvas.drawCircle(50, 50, 39, paint); 129 canvas.drawCircle(50, 50, 39, paint);
130 canvas.flush(); 130 canvas.flush();
131 131
132 fBitmap.extractAlpha(&fAlpha); 132 fBitmap.extractAlpha(&fAlpha);
133 } 133 }
134 134
135 public: 135 public:
136 SkBitmap fBitmap, fAlpha; 136 SkBitmap fBitmap, fAlpha;
137 137
138 protected: 138 protected:
139 SkString onShortName() override { 139 SkString onShortName() override {
140 return SkString("extractalpha"); 140 return SkString("extractalpha");
141 } 141 }
142 142
143 SkISize onISize() override { 143 SkISize onISize() override {
144 return SkISize::Make(540, 330); 144 return SkISize::Make(540, 330);
145 } 145 }
146 146
147 void onDraw(SkCanvas* canvas) override { 147 void onDraw(SkCanvas* canvas) override {
148 SkPaint paint; 148 SkPaint paint;
149 paint.setAntiAlias(true); 149 paint.setAntiAlias(true);
150 paint.setFilterQuality(kLow_SkFilterQuality); 150 paint.setFilterQuality(kLow_SkFilterQuality);
151 paint.setColor(SK_ColorRED); 151 paint.setColor(SK_ColorRED);
152 152
153 canvas->drawBitmap(fBitmap, 10, 10, &paint); // should stay blue (ign ore paint's color) 153 canvas->drawBitmap(fBitmap, 10, 10, &paint); // should stay blue (ign ore paint's color)
154 canvas->drawBitmap(fAlpha, 120, 10, &paint); // should draw red 154 canvas->drawBitmap(fAlpha, 120, 10, &paint); // should draw red
155 } 155 }
156 156
157 private: 157 private:
158 typedef skiagm::GM INHERITED; 158 typedef skiagm::GM INHERITED;
159 }; 159 };
160 DEF_GM( return new TestExtractAlphaGM; ) 160 DEF_GM( return new TestExtractAlphaGM; )
161
OLDNEW
« no previous file with comments | « gm/bitmapcopy.cpp ('k') | gm/bitmaprect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698