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

Side by Side Diff: gm/yuvtorgbeffect.cpp

Issue 1241723005: Add Rec709 YUV color space support to GrYUVtoRGBEffect. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Tricksy floatses. 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 | « no previous file | include/core/SkImageInfo.h » ('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 /* 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
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
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
OLDNEW
« no previous file with comments | « no previous file | include/core/SkImageInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698