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

Side by Side Diff: gm/drawbitmaprect.cpp

Issue 281383013: skiagm::make_isize -> SkISize::Make (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/distantclip.cpp ('k') | gm/emptypath.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 "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 DrawBitmapRectGM() { 79 DrawBitmapRectGM() {
80 } 80 }
81 81
82 SkBitmap fLargeBitmap; 82 SkBitmap fLargeBitmap;
83 83
84 protected: 84 protected:
85 SkString onShortName() { 85 SkString onShortName() {
86 return SkString("drawbitmaprect"); 86 return SkString("drawbitmaprect");
87 } 87 }
88 88
89 SkISize onISize() { return make_isize(gSize, gSize); } 89 SkISize onISize() { return SkISize::Make(gSize, gSize); }
90 90
91 virtual void onDraw(SkCanvas* canvas) { 91 virtual void onDraw(SkCanvas* canvas) {
92 static const int kBmpSize = 2048; 92 static const int kBmpSize = 2048;
93 if (fLargeBitmap.isNull()) { 93 if (fLargeBitmap.isNull()) {
94 makebm(&fLargeBitmap, kBmpSize, kBmpSize); 94 makebm(&fLargeBitmap, kBmpSize, kBmpSize);
95 } 95 }
96 SkRect dstRect = { 0, 0, SkIntToScalar(64), SkIntToScalar(64)}; 96 SkRect dstRect = { 0, 0, SkIntToScalar(64), SkIntToScalar(64)};
97 static const int kMaxSrcRectSize = 1 << (SkNextLog2(kBmpSize) + 2); 97 static const int kMaxSrcRectSize = 1 << (SkNextLog2(kBmpSize) + 2);
98 98
99 static const int kPadX = 30; 99 static const int kPadX = 30;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 private: 177 private:
178 typedef GM INHERITED; 178 typedef GM INHERITED;
179 }; 179 };
180 180
181 ////////////////////////////////////////////////////////////////////////////// 181 //////////////////////////////////////////////////////////////////////////////
182 182
183 static GM* MyFactory(void*) { return new DrawBitmapRectGM; } 183 static GM* MyFactory(void*) { return new DrawBitmapRectGM; }
184 static GMRegistry reg(MyFactory); 184 static GMRegistry reg(MyFactory);
185 } 185 }
OLDNEW
« no previous file with comments | « gm/distantclip.cpp ('k') | gm/emptypath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698