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

Side by Side Diff: gm/imagefiltersbase.cpp

Issue 256373002: Turn on quilt mode in DM. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 7 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/imageblur.cpp ('k') | gm/imagefiltersclipped.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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkColorFilter.h" 10 #include "SkColorFilter.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 &paint); 154 &paint);
155 } 155 }
156 156
157 /////////////////////////////////////////////////////////////////////////////// 157 ///////////////////////////////////////////////////////////////////////////////
158 158
159 class ImageFiltersBaseGM : public skiagm::GM { 159 class ImageFiltersBaseGM : public skiagm::GM {
160 public: 160 public:
161 ImageFiltersBaseGM () {} 161 ImageFiltersBaseGM () {}
162 162
163 protected: 163 protected:
164
165 virtual SkString onShortName() { 164 virtual SkString onShortName() {
166 return SkString("imagefiltersbase"); 165 return SkString("imagefiltersbase");
167 } 166 }
168 167
169 virtual SkISize onISize() { return SkISize::Make(700, 500); } 168 virtual SkISize onISize() { return SkISize::Make(700, 500); }
170 169
171 void draw_frame(SkCanvas* canvas, const SkRect& r) { 170 void draw_frame(SkCanvas* canvas, const SkRect& r) {
172 SkPaint paint; 171 SkPaint paint;
173 paint.setStyle(SkPaint::kStroke_Style); 172 paint.setStyle(SkPaint::kStroke_Style);
174 paint.setColor(SK_ColorRED); 173 paint.setColor(SK_ColorRED);
175 canvas->drawRect(r, paint); 174 canvas->drawRect(r, paint);
176 } 175 }
177 176
178 virtual uint32_t onGetFlags() const { 177 virtual uint32_t onGetFlags() const {
179 // Because of the use of drawSprite, this test is excluded 178 // Because of the use of drawSprite, this test is excluded
180 // from scaled replay tests because drawSprite ignores the 179 // from scaled replay tests because drawSprite ignores the
181 // reciprocal scale that is applied at record time, which is 180 // reciprocal scale that is applied at record time, which is
182 // the intended behavior of drawSprite. 181 // the intended behavior of drawSprite.
183 return kSkipScaledReplay_Flag; 182 return kSkipScaledReplay_Flag | kSkipTiled_Flag;
184 } 183 }
185 184
186 virtual void onDraw(SkCanvas* canvas) { 185 virtual void onDraw(SkCanvas* canvas) {
187 void (*drawProc[])(SkCanvas*, const SkRect&, SkImageFilter*) = { 186 void (*drawProc[])(SkCanvas*, const SkRect&, SkImageFilter*) = {
188 draw_paint, 187 draw_paint,
189 draw_line, draw_rect, draw_path, draw_text, 188 draw_line, draw_rect, draw_path, draw_text,
190 draw_bitmap, 189 draw_bitmap,
191 draw_sprite 190 draw_sprite
192 }; 191 };
193 192
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 226 }
228 227
229 private: 228 private:
230 typedef GM INHERITED; 229 typedef GM INHERITED;
231 }; 230 };
232 231
233 /////////////////////////////////////////////////////////////////////////////// 232 ///////////////////////////////////////////////////////////////////////////////
234 233
235 static skiagm::GM* MyFactory(void*) { return new ImageFiltersBaseGM; } 234 static skiagm::GM* MyFactory(void*) { return new ImageFiltersBaseGM; }
236 static skiagm::GMRegistry reg(MyFactory); 235 static skiagm::GMRegistry reg(MyFactory);
OLDNEW
« no previous file with comments | « gm/imageblur.cpp ('k') | gm/imagefiltersclipped.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698