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

Side by Side Diff: gm/tilemodes.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/thinstrokedrects.cpp ('k') | gm/tilemodes_scaled.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 "gm.h" 8 #include "gm.h"
9 #include "SkPath.h" 9 #include "SkPath.h"
10 #include "SkRegion.h" 10 #include "SkRegion.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 class Tiling2GM : public skiagm::GM { 194 class Tiling2GM : public skiagm::GM {
195 ShaderProc fProc; 195 ShaderProc fProc;
196 SkString fName; 196 SkString fName;
197 public: 197 public:
198 Tiling2GM(ShaderProc proc, const char name[]) : fProc(proc) { 198 Tiling2GM(ShaderProc proc, const char name[]) : fProc(proc) {
199 fName.printf("tilemode_%s", name); 199 fName.printf("tilemode_%s", name);
200 } 200 }
201 201
202 protected: 202 protected:
203 virtual uint32_t onGetFlags() const SK_OVERRIDE {
204 return kSkipTiled_Flag;
205 }
206
203 SkString onShortName() { 207 SkString onShortName() {
204 return fName; 208 return fName;
205 } 209 }
206 210
207 SkISize onISize() { return SkISize::Make(880, 560); } 211 SkISize onISize() { return SkISize::Make(880, 560); }
208 212
209 virtual void onDraw(SkCanvas* canvas) { 213 virtual void onDraw(SkCanvas* canvas) {
210 canvas->scale(SkIntToScalar(3)/2, SkIntToScalar(3)/2); 214 canvas->scale(SkIntToScalar(3)/2, SkIntToScalar(3)/2);
211 215
212 const SkScalar w = SkIntToScalar(gWidth); 216 const SkScalar w = SkIntToScalar(gWidth);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 private: 265 private:
262 typedef skiagm::GM INHERITED; 266 typedef skiagm::GM INHERITED;
263 }; 267 };
264 268
265 ////////////////////////////////////////////////////////////////////////////// 269 //////////////////////////////////////////////////////////////////////////////
266 270
267 DEF_GM( return new TilingGM(true); ) 271 DEF_GM( return new TilingGM(true); )
268 DEF_GM( return new TilingGM(false); ) 272 DEF_GM( return new TilingGM(false); )
269 DEF_GM( return new Tiling2GM(make_bm, "bitmap"); ) 273 DEF_GM( return new Tiling2GM(make_bm, "bitmap"); )
270 DEF_GM( return new Tiling2GM(make_grad, "gradient"); ) 274 DEF_GM( return new Tiling2GM(make_grad, "gradient"); )
OLDNEW
« no previous file with comments | « gm/thinstrokedrects.cpp ('k') | gm/tilemodes_scaled.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698