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

Side by Side Diff: gm/tinybitmap.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/tileimagefilter.cpp ('k') | gm/twopointradial.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 "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkShader.h" 10 #include "SkShader.h"
(...skipping 22 matching lines...) Expand all
33 public: 33 public:
34 TinyBitmapGM() { 34 TinyBitmapGM() {
35 this->setBGColor(0xFFDDDDDD); 35 this->setBGColor(0xFFDDDDDD);
36 } 36 }
37 37
38 protected: 38 protected:
39 SkString onShortName() { 39 SkString onShortName() {
40 return SkString("tinybitmap"); 40 return SkString("tinybitmap");
41 } 41 }
42 42
43 virtual SkISize onISize() { return make_isize(100, 100); } 43 virtual SkISize onISize() { return SkISize::Make(100, 100); }
44 44
45 virtual void onDraw(SkCanvas* canvas) { 45 virtual void onDraw(SkCanvas* canvas) {
46 SkBitmap bm = make_bitmap(); 46 SkBitmap bm = make_bitmap();
47 SkShader* s = 47 SkShader* s =
48 SkShader::CreateBitmapShader(bm, SkShader::kRepeat_TileMode, 48 SkShader::CreateBitmapShader(bm, SkShader::kRepeat_TileMode,
49 SkShader::kMirror_TileMode); 49 SkShader::kMirror_TileMode);
50 SkPaint paint; 50 SkPaint paint;
51 paint.setAlpha(0x80); 51 paint.setAlpha(0x80);
52 paint.setShader(s)->unref(); 52 paint.setShader(s)->unref();
53 canvas->drawPaint(paint); 53 canvas->drawPaint(paint);
54 } 54 }
55 55
56 private: 56 private:
57 typedef GM INHERITED; 57 typedef GM INHERITED;
58 }; 58 };
59 59
60 ////////////////////////////////////////////////////////////////////////////// 60 //////////////////////////////////////////////////////////////////////////////
61 61
62 static GM* MyFactory(void*) { return new TinyBitmapGM; } 62 static GM* MyFactory(void*) { return new TinyBitmapGM; }
63 static GMRegistry reg(MyFactory); 63 static GMRegistry reg(MyFactory);
64 64
65 } 65 }
OLDNEW
« no previous file with comments | « gm/tileimagefilter.cpp ('k') | gm/twopointradial.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698