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

Side by Side Diff: gm/drawlooper.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/downsamplebitmap.cpp ('k') | gm/dropshadowimagefilter.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 2011 Google Inc. 2 * Copyright 2011 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 "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
11 #include "SkCanvas.h" 11 #include "SkCanvas.h"
12 #include "SkGraphics.h" 12 #include "SkGraphics.h"
13 #include "SkLayerDrawLooper.h" 13 #include "SkLayerDrawLooper.h"
14 #include "SkRandom.h" 14 #include "SkRandom.h"
15 15
16 #define WIDTH 200 16 #define WIDTH 200
17 #define HEIGHT 200 17 #define HEIGHT 200
18 18
19 class DrawLooperGM : public skiagm::GM { 19 class DrawLooperGM : public skiagm::GM {
20 public: 20 public:
21 DrawLooperGM() : fLooper(NULL) { 21 DrawLooperGM() : fLooper(NULL) {
22 this->setBGColor(0xFFDDDDDD); 22 this->setBGColor(0xFFDDDDDD);
23 } 23 }
24 24
25 virtual ~DrawLooperGM() { 25 virtual ~DrawLooperGM() {
26 SkSafeUnref(fLooper); 26 SkSafeUnref(fLooper);
27 } 27 }
28 28
29 protected: 29 protected:
30 virtual uint32_t onGetFlags() const SK_OVERRIDE {
31 return kSkipTiled_Flag;
32 }
33
30 virtual SkISize onISize() { 34 virtual SkISize onISize() {
31 return SkISize::Make(520, 160); 35 return SkISize::Make(520, 160);
32 } 36 }
33 37
34 virtual SkString onShortName() SK_OVERRIDE { 38 virtual SkString onShortName() SK_OVERRIDE {
35 return SkString("drawlooper"); 39 return SkString("drawlooper");
36 } 40 }
37 41
38 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 42 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
39 this->init(); 43 this->init();
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 fLooper = looperBuilder.detachLooper(); 97 fLooper = looperBuilder.detachLooper();
94 } 98 }
95 99
96 typedef GM INHERITED; 100 typedef GM INHERITED;
97 }; 101 };
98 102
99 ////////////////////////////////////////////////////////////////////////////// 103 //////////////////////////////////////////////////////////////////////////////
100 104
101 static skiagm::GM* MyFactory(void*) { return new DrawLooperGM; } 105 static skiagm::GM* MyFactory(void*) { return new DrawLooperGM; }
102 static skiagm::GMRegistry reg(MyFactory); 106 static skiagm::GMRegistry reg(MyFactory);
OLDNEW
« no previous file with comments | « gm/downsamplebitmap.cpp ('k') | gm/dropshadowimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698