OLD | NEW |
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(sk_tool_utils::color_to_565(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 SkISize onISize() override { | 30 virtual SkISize onISize() override { |
31 return SkISize::Make(520, 160); | 31 return SkISize::Make(520, 160); |
32 } | 32 } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 fLooper = looperBuilder.detachLooper(); | 94 fLooper = looperBuilder.detachLooper(); |
95 } | 95 } |
96 | 96 |
97 typedef GM INHERITED; | 97 typedef GM INHERITED; |
98 }; | 98 }; |
99 | 99 |
100 ////////////////////////////////////////////////////////////////////////////// | 100 ////////////////////////////////////////////////////////////////////////////// |
101 | 101 |
102 static skiagm::GM* MyFactory(void*) { return new DrawLooperGM; } | 102 static skiagm::GM* MyFactory(void*) { return new DrawLooperGM; } |
103 static skiagm::GMRegistry reg(MyFactory); | 103 static skiagm::GMRegistry reg(MyFactory); |
OLD | NEW |