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

Side by Side Diff: gm/gradient_matrix.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/gradientDirtyLaundry.cpp ('k') | gm/gradients.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 2013 Google Inc. 2 * Copyright 2013 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 "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkColor.h" 9 #include "SkColor.h"
10 #include "SkGradientShader.h" 10 #include "SkGradientShader.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 namespace skiagm { 114 namespace skiagm {
115 115
116 class GradientMatrixGM : public GM { 116 class GradientMatrixGM : public GM {
117 public: 117 public:
118 GradientMatrixGM() { 118 GradientMatrixGM() {
119 this->setBGColor(0xFFDDDDDD); 119 this->setBGColor(0xFFDDDDDD);
120 } 120 }
121 121
122 protected: 122 protected:
123 virtual uint32_t onGetFlags() const SK_OVERRIDE {
124 return kSkipTiled_Flag;
125 }
126
123 SkString onShortName() SK_OVERRIDE { 127 SkString onShortName() SK_OVERRIDE {
124 return SkString("gradient_matrix"); 128 return SkString("gradient_matrix");
125 } 129 }
126 130
127 virtual SkISize onISize() SK_OVERRIDE { 131 virtual SkISize onISize() SK_OVERRIDE {
128 return SkISize::Make(800, 800); 132 return SkISize::Make(800, 800);
129 } 133 }
130 134
131 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 135 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
132 draw_gradients(canvas, &make_linear_gradient, 136 draw_gradients(canvas, &make_linear_gradient,
133 linearPts, SK_ARRAY_COUNT(linearPts)); 137 linearPts, SK_ARRAY_COUNT(linearPts));
134 138
135 canvas->translate(0, TESTGRID_Y); 139 canvas->translate(0, TESTGRID_Y);
136 140
137 draw_gradients(canvas, &make_radial_gradient, 141 draw_gradients(canvas, &make_radial_gradient,
138 radialPts, SK_ARRAY_COUNT(radialPts)); 142 radialPts, SK_ARRAY_COUNT(radialPts));
139 } 143 }
140 144
141 private: 145 private:
142 typedef GM INHERITED; 146 typedef GM INHERITED;
143 }; 147 };
144 148
145 DEF_GM( return new GradientMatrixGM; ) 149 DEF_GM( return new GradientMatrixGM; )
146 } 150 }
OLDNEW
« no previous file with comments | « gm/gradientDirtyLaundry.cpp ('k') | gm/gradients.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698