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

Side by Side Diff: gm/lighting.cpp

Issue 1240843005: make drawbitmaprect lighting lumafilter matrixconvolution srcmode gm portable (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/drawbitmaprect.cpp ('k') | gm/lumafilter.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 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 "SkLightingImageFilter.h" 9 #include "SkLightingImageFilter.h"
10 #include "SkOffsetImageFilter.h" 10 #include "SkOffsetImageFilter.h"
(...skipping 15 matching lines...) Expand all
26 SkString onShortName() override { 26 SkString onShortName() override {
27 return SkString("lighting"); 27 return SkString("lighting");
28 } 28 }
29 29
30 void make_bitmap() { 30 void make_bitmap() {
31 fBitmap.allocN32Pixels(100, 100); 31 fBitmap.allocN32Pixels(100, 100);
32 SkCanvas canvas(fBitmap); 32 SkCanvas canvas(fBitmap);
33 canvas.clear(0x00000000); 33 canvas.clear(0x00000000);
34 SkPaint paint; 34 SkPaint paint;
35 paint.setAntiAlias(true); 35 paint.setAntiAlias(true);
36 sk_tool_utils::set_portable_typeface(&paint); 36 sk_tool_utils::set_portable_typeface_always(&paint);
37 paint.setColor(0xFFFFFFFF); 37 paint.setColor(0xFFFFFFFF);
38 paint.setTextSize(SkIntToScalar(96)); 38 paint.setTextSize(SkIntToScalar(96));
39 const char* str = "e"; 39 const char* str = "e";
40 canvas.drawText(str, strlen(str), SkIntToScalar(20), SkIntToScalar(70), paint); 40 canvas.drawText(str, strlen(str), SkIntToScalar(20), SkIntToScalar(70), paint);
41 } 41 }
42 42
43 SkISize onISize() override { 43 SkISize onISize() override {
44 return SkISize::Make(WIDTH, HEIGHT); 44 return SkISize::Make(WIDTH, HEIGHT);
45 } 45 }
46 46
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 SkBitmap fBitmap; 167 SkBitmap fBitmap;
168 bool fInitialized; 168 bool fInitialized;
169 }; 169 };
170 170
171 ////////////////////////////////////////////////////////////////////////////// 171 //////////////////////////////////////////////////////////////////////////////
172 172
173 static GM* MyFactory(void*) { return new ImageLightingGM; } 173 static GM* MyFactory(void*) { return new ImageLightingGM; }
174 static GMRegistry reg(MyFactory); 174 static GMRegistry reg(MyFactory);
175 175
176 } 176 }
OLDNEW
« no previous file with comments | « gm/drawbitmaprect.cpp ('k') | gm/lumafilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698