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

Side by Side Diff: gm/bitmapshader.cpp

Issue 169913003: replace SkBitmap::Config with SkColorType in gms (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « gm/bitmappremul.cpp ('k') | gm/blurrect.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 2013 Google Inc. 3 * Copyright 2013 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 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 10 matching lines...) Expand all
21 bm->eraseColor(SK_ColorRED); 21 bm->eraseColor(SK_ColorRED);
22 22
23 SkCanvas canvas(*bm); 23 SkCanvas canvas(*bm);
24 canvas.drawCircle(10, 10, 5, bluePaint); 24 canvas.drawCircle(10, 10, 5, bluePaint);
25 } 25 }
26 26
27 static void draw_mask(SkBitmap* bm) { 27 static void draw_mask(SkBitmap* bm) {
28 SkPaint circlePaint; 28 SkPaint circlePaint;
29 circlePaint.setColor(SK_ColorBLACK); 29 circlePaint.setColor(SK_ColorBLACK);
30 30
31 bm->allocConfigPixels(SkBitmap::kA8_Config, 20, 20); 31 bm->allocPixels(SkImageInfo::MakeA8(20, 20));
32 bm->eraseColor(SK_ColorTRANSPARENT); 32 bm->eraseColor(SK_ColorTRANSPARENT);
33 33
34 SkCanvas canvas(*bm); 34 SkCanvas canvas(*bm);
35 canvas.drawCircle(10, 10, 10, circlePaint); 35 canvas.drawCircle(10, 10, 10, circlePaint);
36 } 36 }
37 37
38 class BitmapShaderGM : public GM { 38 class BitmapShaderGM : public GM {
39 public: 39 public:
40 40
41 BitmapShaderGM() { 41 BitmapShaderGM() {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 typedef GM INHERITED; 93 typedef GM INHERITED;
94 }; 94 };
95 95
96 ////////////////////////////////////////////////////////////////////////////// 96 //////////////////////////////////////////////////////////////////////////////
97 97
98 static GM* MyFactory(void*) { return new BitmapShaderGM; } 98 static GM* MyFactory(void*) { return new BitmapShaderGM; }
99 static GMRegistry reg(MyFactory); 99 static GMRegistry reg(MyFactory);
100 100
101 } 101 }
OLDNEW
« no previous file with comments | « gm/bitmappremul.cpp ('k') | gm/blurrect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698