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

Side by Side Diff: gm/drawbitmaprect.cpp

Issue 1240843005: make drawbitmaprect lighting lumafilter matrixconvolution srcmode gm portable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | gm/lighting.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 "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 SkRect::MakeWH(gSize * SK_Scalar1, 156 SkRect::MakeWH(gSize * SK_Scalar1,
157 gSize * SK_Scalar1), 157 gSize * SK_Scalar1),
158 &paint); 158 &paint);
159 canvas->translate(SK_Scalar1 * kPadX / 2, 159 canvas->translate(SK_Scalar1 * kPadX / 2,
160 SK_Scalar1 * kPadY / 2); 160 SK_Scalar1 * kPadY / 2);
161 SkPaint blackPaint; 161 SkPaint blackPaint;
162 SkScalar titleHeight = SK_Scalar1 * 24; 162 SkScalar titleHeight = SK_Scalar1 * 24;
163 blackPaint.setColor(SK_ColorBLACK); 163 blackPaint.setColor(SK_ColorBLACK);
164 blackPaint.setTextSize(titleHeight); 164 blackPaint.setTextSize(titleHeight);
165 blackPaint.setAntiAlias(true); 165 blackPaint.setAntiAlias(true);
166 sk_tool_utils::set_portable_typeface(&blackPaint); 166 sk_tool_utils::set_portable_typeface_always(&blackPaint);
167 SkString title; 167 SkString title;
168 title.printf("Bitmap size: %d x %d", gBmpSize, gBmpSize); 168 title.printf("Bitmap size: %d x %d", gBmpSize, gBmpSize);
169 canvas->drawText(title.c_str(), title.size(), 0, 169 canvas->drawText(title.c_str(), title.size(), 0,
170 titleHeight, blackPaint); 170 titleHeight, blackPaint);
171 171
172 canvas->translate(0, SK_Scalar1 * kPadY / 2 + titleHeight); 172 canvas->translate(0, SK_Scalar1 * kPadY / 2 + titleHeight);
173 int rowCount = 0; 173 int rowCount = 0;
174 canvas->save(); 174 canvas->save();
175 for (int w = 1; w <= kMaxSrcRectSize; w *= 4) { 175 for (int w = 1; w <= kMaxSrcRectSize; w *= 4) {
176 for (int h = 1; h <= kMaxSrcRectSize; h *= 4) { 176 for (int h = 1; h <= kMaxSrcRectSize; h *= 4) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 225 }
226 } 226 }
227 227
228 private: 228 private:
229 typedef skiagm::GM INHERITED; 229 typedef skiagm::GM INHERITED;
230 }; 230 };
231 231
232 DEF_GM( return new DrawBitmapRectGM(canvasproc, NULL); ) 232 DEF_GM( return new DrawBitmapRectGM(canvasproc, NULL); )
233 DEF_GM( return new DrawBitmapRectGM(imageproc, "-imagerect"); ) 233 DEF_GM( return new DrawBitmapRectGM(imageproc, "-imagerect"); )
234 DEF_GM( return new DrawBitmapRectGM(imagescaleproc, "-imagescale"); ) 234 DEF_GM( return new DrawBitmapRectGM(imagescaleproc, "-imagescale"); )
OLDNEW
« no previous file with comments | « no previous file | gm/lighting.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698