OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 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 | 8 |
9 // This test only works with the GPU backend. | 9 // This test only works with the GPU backend. |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 YUVtoRGBEffect() { | 32 YUVtoRGBEffect() { |
33 this->setBGColor(0xFFFFFFFF); | 33 this->setBGColor(0xFFFFFFFF); |
34 } | 34 } |
35 | 35 |
36 protected: | 36 protected: |
37 SkString onShortName() override { | 37 SkString onShortName() override { |
38 return SkString("yuv_to_rgb_effect"); | 38 return SkString("yuv_to_rgb_effect"); |
39 } | 39 } |
40 | 40 |
41 SkISize onISize() override { | 41 SkISize onISize() override { |
42 return SkISize::Make(238, 84); | 42 return SkISize::Make(238, 120); |
43 } | 43 } |
44 | 44 |
45 void onOnceBeforeDraw() override { | 45 void onOnceBeforeDraw() override { |
46 SkImageInfo yinfo = SkImageInfo::MakeA8(YSIZE, YSIZE); | 46 SkImageInfo yinfo = SkImageInfo::MakeA8(YSIZE, YSIZE); |
47 fBmp[0].allocPixels(yinfo); | 47 fBmp[0].allocPixels(yinfo); |
48 SkImageInfo uinfo = SkImageInfo::MakeA8(USIZE, USIZE); | 48 SkImageInfo uinfo = SkImageInfo::MakeA8(USIZE, USIZE); |
49 fBmp[1].allocPixels(uinfo); | 49 fBmp[1].allocPixels(uinfo); |
50 SkImageInfo vinfo = SkImageInfo::MakeA8(VSIZE, VSIZE); | 50 SkImageInfo vinfo = SkImageInfo::MakeA8(VSIZE, VSIZE); |
51 fBmp[2].allocPixels(vinfo); | 51 fBmp[2].allocPixels(vinfo); |
52 unsigned char* pixels[3]; | 52 unsigned char* pixels[3]; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 private: | 137 private: |
138 SkBitmap fBmp[3]; | 138 SkBitmap fBmp[3]; |
139 | 139 |
140 typedef GM INHERITED; | 140 typedef GM INHERITED; |
141 }; | 141 }; |
142 | 142 |
143 DEF_GM( return SkNEW(YUVtoRGBEffect); ) | 143 DEF_GM( return SkNEW(YUVtoRGBEffect); ) |
144 } | 144 } |
145 | 145 |
146 #endif | 146 #endif |
OLD | NEW |