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

Side by Side Diff: gm/imageblur.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/hittestpath.cpp ('k') | gm/imagefiltersbase.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 "SkBlurImageFilter.h" 9 #include "SkBlurImageFilter.h"
10 #include "SkRandom.h" 10 #include "SkRandom.h"
11 11
12 #define WIDTH 500 12 #define WIDTH 500
13 #define HEIGHT 500 13 #define HEIGHT 500
14 14
15 namespace skiagm { 15 namespace skiagm {
16 16
17 class ImageBlurGM : public GM { 17 class ImageBlurGM : public GM {
18 public: 18 public:
19 ImageBlurGM(SkScalar sigmaX, SkScalar sigmaY, const char* suffix) 19 ImageBlurGM(SkScalar sigmaX, SkScalar sigmaY, const char* suffix)
20 : fSigmaX(sigmaX), fSigmaY(sigmaY) { 20 : fSigmaX(sigmaX), fSigmaY(sigmaY) {
21 this->setBGColor(0xFF000000); 21 this->setBGColor(0xFF000000);
22 fName.printf("imageblur%s", suffix); 22 fName.printf("imageblur%s", suffix);
23 } 23 }
24 24
25 protected: 25 protected:
26 virtual uint32_t onGetFlags() const SK_OVERRIDE {
27 return kSkipTiled_Flag;
28 }
29
26 virtual SkString onShortName() { 30 virtual SkString onShortName() {
27 return fName; 31 return fName;
28 } 32 }
29 33
30 virtual SkISize onISize() { 34 virtual SkISize onISize() {
31 return make_isize(WIDTH, HEIGHT); 35 return make_isize(WIDTH, HEIGHT);
32 } 36 }
33 37
34 virtual void onDraw(SkCanvas* canvas) { 38 virtual void onDraw(SkCanvas* canvas) {
35 SkPaint paint; 39 SkPaint paint;
(...skipping 25 matching lines...) Expand all
61 65
62 ////////////////////////////////////////////////////////////////////////////// 66 //////////////////////////////////////////////////////////////////////////////
63 67
64 static GM* MyFactory1(void*) { return new ImageBlurGM(24.0f, 0.0f, ""); } 68 static GM* MyFactory1(void*) { return new ImageBlurGM(24.0f, 0.0f, ""); }
65 static GMRegistry reg1(MyFactory1); 69 static GMRegistry reg1(MyFactory1);
66 70
67 static GM* MyFactory2(void*) { return new ImageBlurGM(80.0f, 80.0f, "_large"); } 71 static GM* MyFactory2(void*) { return new ImageBlurGM(80.0f, 80.0f, "_large"); }
68 static GMRegistry reg2(MyFactory2); 72 static GMRegistry reg2(MyFactory2);
69 73
70 } 74 }
OLDNEW
« no previous file with comments | « gm/hittestpath.cpp ('k') | gm/imagefiltersbase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698