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

Side by Side Diff: gm/lighting.cpp

Issue 256373002: Turn on quilt mode in DM. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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/lerpmode.cpp ('k') | gm/linepaths.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 10
11 #define WIDTH 330 11 #define WIDTH 330
12 #define HEIGHT 440 12 #define HEIGHT 440
13 13
14 namespace skiagm { 14 namespace skiagm {
15 15
16 class ImageLightingGM : public GM { 16 class ImageLightingGM : public GM {
17 public: 17 public:
18 ImageLightingGM() : fInitialized(false) { 18 ImageLightingGM() : fInitialized(false) {
19 this->setBGColor(0xFF000000); 19 this->setBGColor(0xFF000000);
20 } 20 }
21 21
22 protected: 22 protected:
23 virtual uint32_t onGetFlags() const SK_OVERRIDE {
24 return kSkipTiled_Flag;
25 }
26
23 virtual SkString onShortName() { 27 virtual SkString onShortName() {
24 return SkString("lighting"); 28 return SkString("lighting");
25 } 29 }
26 30
27 void make_bitmap() { 31 void make_bitmap() {
28 fBitmap.allocN32Pixels(100, 100); 32 fBitmap.allocN32Pixels(100, 100);
29 SkCanvas canvas(fBitmap); 33 SkCanvas canvas(fBitmap);
30 canvas.clear(0x00000000); 34 canvas.clear(0x00000000);
31 SkPaint paint; 35 SkPaint paint;
32 paint.setAntiAlias(true); 36 paint.setAntiAlias(true);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 SkBitmap fBitmap; 121 SkBitmap fBitmap;
118 bool fInitialized; 122 bool fInitialized;
119 }; 123 };
120 124
121 ////////////////////////////////////////////////////////////////////////////// 125 //////////////////////////////////////////////////////////////////////////////
122 126
123 static GM* MyFactory(void*) { return new ImageLightingGM; } 127 static GM* MyFactory(void*) { return new ImageLightingGM; }
124 static GMRegistry reg(MyFactory); 128 static GMRegistry reg(MyFactory);
125 129
126 } 130 }
OLDNEW
« no previous file with comments | « gm/lerpmode.cpp ('k') | gm/linepaths.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698