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

Side by Side Diff: gm/verylargebitmap.cpp

Issue 1240753003: Revert[2] of guard to remove DrawBitmapRectFlags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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/tallstretchedbitmaps.cpp ('k') | gyp/skia_for_android_framework_defines.gypi » ('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 2012 Google Inc. 2 * Copyright 2012 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 "SkGradientShader.h" 10 #include "SkGradientShader.h"
(...skipping 27 matching lines...) Expand all
38 r.set(ir); 38 r.set(ir);
39 39
40 canvas->save(); 40 canvas->save();
41 canvas->clipRect(r); 41 canvas->clipRect(r);
42 canvas->drawBitmap(bm, 0, 0, NULL); 42 canvas->drawBitmap(bm, 0, 0, NULL);
43 canvas->restore(); 43 canvas->restore();
44 canvas->drawRect(r, paint); 44 canvas->drawRect(r, paint);
45 45
46 r.offset(SkIntToScalar(150), 0); 46 r.offset(SkIntToScalar(150), 0);
47 // exercises extract bitmap, but not shader 47 // exercises extract bitmap, but not shader
48 canvas->drawBitmapRect(bm, &ir, r, NULL); 48 canvas->drawBitmapRect(bm, ir, r, NULL);
49 canvas->drawRect(r, paint); 49 canvas->drawRect(r, paint);
50 50
51 r.offset(SkIntToScalar(150), 0); 51 r.offset(SkIntToScalar(150), 0);
52 // exercises bitmapshader 52 // exercises bitmapshader
53 canvas->drawBitmapRect(bm, NULL, r, NULL); 53 canvas->drawBitmapRect(bm, NULL, r, NULL);
54 canvas->drawRect(r, paint); 54 canvas->drawRect(r, paint);
55 } 55 }
56 56
57 class VeryLargeBitmapGM : public skiagm::GM { 57 class VeryLargeBitmapGM : public skiagm::GM {
58 public: 58 public:
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 private: 102 private:
103 typedef skiagm::GM INHERITED; 103 typedef skiagm::GM INHERITED;
104 }; 104 };
105 105
106 ////////////////////////////////////////////////////////////////////////////// 106 //////////////////////////////////////////////////////////////////////////////
107 107
108 static skiagm::GM* MyFactory(void*) { return new VeryLargeBitmapGM; } 108 static skiagm::GM* MyFactory(void*) { return new VeryLargeBitmapGM; }
109 static skiagm::GMRegistry reg(MyFactory); 109 static skiagm::GMRegistry reg(MyFactory);
OLDNEW
« no previous file with comments | « gm/tallstretchedbitmaps.cpp ('k') | gyp/skia_for_android_framework_defines.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698