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

Side by Side Diff: gm/bitmaprecttest.cpp

Issue 1272713005: flag to use const& instead of const* for src-rect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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/bitmaprect.cpp ('k') | gm/bleed.cpp » ('j') | gm/image.cpp » ('J')
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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPath.h" 10 #include "SkPath.h"
(...skipping 25 matching lines...) Expand all
36 // 36 //
37 static void test_bitmaprect(SkCanvas* canvas) { 37 static void test_bitmaprect(SkCanvas* canvas) {
38 SkBitmap bm; 38 SkBitmap bm;
39 make_bm(&bm); 39 make_bm(&bm);
40 40
41 canvas->drawBitmap(bm, 150, 45, NULL); 41 canvas->drawBitmap(bm, 150, 45, NULL);
42 42
43 SkScalar scale = 0.472560018f; 43 SkScalar scale = 0.472560018f;
44 canvas->save(); 44 canvas->save();
45 canvas->scale(scale, scale); 45 canvas->scale(scale, scale);
46 canvas->drawBitmapRect(bm, SkRect::MakeXYWH(100, 100, 128, 128)); 46 canvas->drawBitmapRect(bm, SkRect::MakeXYWH(100, 100, 128, 128), nullptr);
47 canvas->restore(); 47 canvas->restore();
48 48
49 canvas->scale(-1, 1); 49 canvas->scale(-1, 1);
50 canvas->drawBitmap(bm, -310, 45, NULL); 50 canvas->drawBitmap(bm, -310, 45, NULL);
51 } 51 }
52 52
53 class BitmapRectTestGM : public skiagm::GM { 53 class BitmapRectTestGM : public skiagm::GM {
54 public: 54 public:
55 BitmapRectTestGM() { 55 BitmapRectTestGM() {
56 56
(...skipping 12 matching lines...) Expand all
69 test_bitmaprect(canvas); 69 test_bitmaprect(canvas);
70 } 70 }
71 71
72 private: 72 private:
73 typedef skiagm::GM INHERITED; 73 typedef skiagm::GM INHERITED;
74 }; 74 };
75 75
76 ////////////////////////////////////////////////////////////////////////////// 76 //////////////////////////////////////////////////////////////////////////////
77 77
78 DEF_GM( return new BitmapRectTestGM; ) 78 DEF_GM( return new BitmapRectTestGM; )
OLDNEW
« no previous file with comments | « gm/bitmaprect.cpp ('k') | gm/bleed.cpp » ('j') | gm/image.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698