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

Side by Side Diff: src/gpu/effects/GrYUVEffect.h

Issue 2041113004: sk_sp for gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Reserve correctly. Created 4 years, 6 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 | « src/gpu/effects/GrXfermodeFragmentProcessor.cpp ('k') | src/gpu/effects/GrYUVEffect.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 2014 Google Inc. 2 * Copyright 2014 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 #ifndef GrYUVEffect_DEFINED 8 #ifndef GrYUVEffect_DEFINED
9 #define GrYUVEffect_DEFINED 9 #define GrYUVEffect_DEFINED
10 10
11 #include "SkImageInfo.h" 11 #include "SkImageInfo.h"
12 12
13 class GrFragmentProcessor; 13 class GrFragmentProcessor;
14 class GrTexture; 14 class GrTexture;
15 15
16 namespace GrYUVEffect { 16 namespace GrYUVEffect {
17 /** 17 /**
18 * Creates an effect that performs color conversion from YUV to RGB. The inp ut textures are 18 * Creates an effect that performs color conversion from YUV to RGB. The inp ut textures are
19 * assumed to be kA8_GrPixelConfig. 19 * assumed to be kA8_GrPixelConfig.
20 */ 20 */
21 const GrFragmentProcessor* CreateYUVToRGB(GrTexture* yTexture, GrTexture* uT exture, 21 sk_sp<GrFragmentProcessor> MakeYUVToRGB(GrTexture* yTexture, GrTexture* uTex ture,
22 GrTexture* vTexture, const SkISize sizes[3], 22 GrTexture* vTexture, const SkISize s izes[3],
23 SkYUVColorSpace colorSpace); 23 SkYUVColorSpace colorSpace);
24 24
25 /** 25 /**
26 * Creates a processor that performs color conversion from the passed in pro cessor's RGB 26 * Creates a processor that performs color conversion from the passed in pro cessor's RGB
27 * channels to Y, U ,and V channels. The output color is (y, u, v, a) where a is the passed in 27 * channels to Y, U ,and V channels. The output color is (y, u, v, a) where a is the passed in
28 * processor's alpha output. 28 * processor's alpha output.
29 */ 29 */
30 const GrFragmentProcessor* CreateRGBToYUV(const GrFragmentProcessor*, 30 sk_sp<GrFragmentProcessor> MakeRGBToYUV(sk_sp<GrFragmentProcessor>,
31 SkYUVColorSpace colorSpace); 31 SkYUVColorSpace colorSpace);
32 32
33 /** 33 /**
34 * Creates a processor that performs color conversion from the passed in pro cessor's RGB 34 * Creates a processor that performs color conversion from the passed in pro cessor's RGB
35 * channels to U and V channels. The output color is (u, v, 0, a) where a is the passed in 35 * channels to U and V channels. The output color is (u, v, 0, a) where a is the passed in
36 * processor's alpha output. 36 * processor's alpha output.
37 */ 37 */
38 const GrFragmentProcessor* CreateRGBToUV(const GrFragmentProcessor*, 38 sk_sp<GrFragmentProcessor> MakeRGBToUV(sk_sp<GrFragmentProcessor>,
39 SkYUVColorSpace colorSpace); 39 SkYUVColorSpace colorSpace);
40 /** 40 /**
41 * Creates a processor that performs color conversion from the passed in fra gment processors's 41 * Creates a processor that performs color conversion from the passed in fra gment processors's
42 * RGB channels to Y, U, or V (replicated across all four output color chann els). The alpha 42 * RGB channels to Y, U, or V (replicated across all four output color chann els). The alpha
43 * output of the passed in fragment processor is ignored. 43 * output of the passed in fragment processor is ignored.
44 */ 44 */
45 const GrFragmentProcessor* CreateRGBToY(const GrFragmentProcessor*, SkYUVCol orSpace colorSpace); 45 sk_sp<GrFragmentProcessor> MakeRGBToY(sk_sp<GrFragmentProcessor>, SkYUVColor Space colorSpace);
46 const GrFragmentProcessor* CreateRGBToU(const GrFragmentProcessor*, SkYUVCol orSpace colorSpace); 46 sk_sp<GrFragmentProcessor> MakeRGBToU(sk_sp<GrFragmentProcessor>, SkYUVColor Space colorSpace);
47 const GrFragmentProcessor* CreateRGBToV(const GrFragmentProcessor*, SkYUVCol orSpace colorSpace); 47 sk_sp<GrFragmentProcessor> MakeRGBToV(sk_sp<GrFragmentProcessor>, SkYUVColor Space colorSpace);
48 }; 48 };
49 49
50 #endif 50 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrXfermodeFragmentProcessor.cpp ('k') | src/gpu/effects/GrYUVEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698