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

Side by Side Diff: gm/displacement.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/deviceproperties.cpp ('k') | gm/distantclip.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 "gm.h" 8 #include "gm.h"
9 #include "SkDisplacementMapEffect.h" 9 #include "SkDisplacementMapEffect.h"
10 #include "SkBitmapSource.h" 10 #include "SkBitmapSource.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 canvas.drawRect(SkRect::MakeXYWH(0, 0, 8, 8), darkPaint); 58 canvas.drawRect(SkRect::MakeXYWH(0, 0, 8, 8), darkPaint);
59 canvas.drawRect(SkRect::MakeXYWH(8, 0, 8, 8), lightPaint); 59 canvas.drawRect(SkRect::MakeXYWH(8, 0, 8, 8), lightPaint);
60 canvas.drawRect(SkRect::MakeXYWH(0, 8, 8, 8), lightPaint); 60 canvas.drawRect(SkRect::MakeXYWH(0, 8, 8, 8), lightPaint);
61 canvas.drawRect(SkRect::MakeXYWH(8, 8, 8, 8), darkPaint); 61 canvas.drawRect(SkRect::MakeXYWH(8, 8, 8, 8), darkPaint);
62 canvas.restore(); 62 canvas.restore();
63 } 63 }
64 } 64 }
65 } 65 }
66 66
67 virtual SkISize onISize() { 67 virtual SkISize onISize() {
68 return make_isize(500, 500); 68 return SkISize::Make(500, 500);
69 } 69 }
70 70
71 void drawClippedBitmap(SkCanvas* canvas, int x, int y, const SkPaint& paint) { 71 void drawClippedBitmap(SkCanvas* canvas, int x, int y, const SkPaint& paint) {
72 canvas->save(); 72 canvas->save();
73 canvas->translate(SkIntToScalar(x), SkIntToScalar(y)); 73 canvas->translate(SkIntToScalar(x), SkIntToScalar(y));
74 canvas->clipRect(SkRect::MakeWH(SkIntToScalar(fBitmap.width()), SkIntToS calar(fBitmap.height()))); 74 canvas->clipRect(SkRect::MakeWH(SkIntToScalar(fBitmap.width()), SkIntToS calar(fBitmap.height())));
75 canvas->drawBitmap(fBitmap, 0, 0, &paint); 75 canvas->drawBitmap(fBitmap, 0, 0, &paint);
76 canvas->restore(); 76 canvas->restore();
77 } 77 }
78 78
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 SkBitmap fBitmap, fCheckerboard, fSmall, fLarge, fLargeW, fLargeH; 220 SkBitmap fBitmap, fCheckerboard, fSmall, fLarge, fLargeW, fLargeH;
221 bool fInitialized; 221 bool fInitialized;
222 }; 222 };
223 223
224 ////////////////////////////////////////////////////////////////////////////// 224 //////////////////////////////////////////////////////////////////////////////
225 225
226 static GM* MyFactory(void*) { return new DisplacementMapGM; } 226 static GM* MyFactory(void*) { return new DisplacementMapGM; }
227 static GMRegistry reg(MyFactory); 227 static GMRegistry reg(MyFactory);
228 228
229 } 229 }
OLDNEW
« no previous file with comments | « gm/deviceproperties.cpp ('k') | gm/distantclip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698