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

Side by Side Diff: gm/offsetimagefilter.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/ninepatchstretch.cpp ('k') | gm/ovals.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 "SkOffsetImageFilter.h" 9 #include "SkOffsetImageFilter.h"
10 #include "SkBitmapSource.h" 10 #include "SkBitmapSource.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 canvas.drawRect(SkRect::MakeXYWH(0, 0, 8, 8), darkPaint); 53 canvas.drawRect(SkRect::MakeXYWH(0, 0, 8, 8), darkPaint);
54 canvas.drawRect(SkRect::MakeXYWH(8, 0, 8, 8), lightPaint); 54 canvas.drawRect(SkRect::MakeXYWH(8, 0, 8, 8), lightPaint);
55 canvas.drawRect(SkRect::MakeXYWH(0, 8, 8, 8), lightPaint); 55 canvas.drawRect(SkRect::MakeXYWH(0, 8, 8, 8), lightPaint);
56 canvas.drawRect(SkRect::MakeXYWH(8, 8, 8, 8), darkPaint); 56 canvas.drawRect(SkRect::MakeXYWH(8, 8, 8, 8), darkPaint);
57 canvas.restore(); 57 canvas.restore();
58 } 58 }
59 } 59 }
60 } 60 }
61 61
62 virtual SkISize onISize() { 62 virtual SkISize onISize() {
63 return make_isize(WIDTH, HEIGHT); 63 return SkISize::Make(WIDTH, HEIGHT);
64 } 64 }
65 65
66 void drawClippedBitmap(SkCanvas* canvas, const SkBitmap& bitmap, const SkPai nt& paint, SkScalar scale, const SkIRect& cropRect) { 66 void drawClippedBitmap(SkCanvas* canvas, const SkBitmap& bitmap, const SkPai nt& paint, SkScalar scale, const SkIRect& cropRect) {
67 canvas->save(); 67 canvas->save();
68 SkRect clipRect = SkRect::MakeWH( 68 SkRect clipRect = SkRect::MakeWH(
69 SkIntToScalar(bitmap.width()), SkIntToScalar(bitmap.height())); 69 SkIntToScalar(bitmap.width()), SkIntToScalar(bitmap.height()));
70 canvas->clipRect(clipRect); 70 canvas->clipRect(clipRect);
71 canvas->scale(scale, scale); 71 canvas->scale(scale, scale);
72 canvas->drawBitmap(bitmap, 0, 0, &paint); 72 canvas->drawBitmap(bitmap, 0, 0, &paint);
73 canvas->restore(); 73 canvas->restore();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 SkBitmap fBitmap, fCheckerboard; 123 SkBitmap fBitmap, fCheckerboard;
124 bool fInitialized; 124 bool fInitialized;
125 }; 125 };
126 126
127 ////////////////////////////////////////////////////////////////////////////// 127 //////////////////////////////////////////////////////////////////////////////
128 128
129 static GM* MyFactory(void*) { return new OffsetImageFilterGM; } 129 static GM* MyFactory(void*) { return new OffsetImageFilterGM; }
130 static GMRegistry reg(MyFactory); 130 static GMRegistry reg(MyFactory);
131 131
132 } 132 }
OLDNEW
« no previous file with comments | « gm/ninepatchstretch.cpp ('k') | gm/ovals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698