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

Side by Side Diff: src/effects/GrAlphaThresholdFragmentProcessor.h

Issue 2215323003: Start using RenderTargetProxy (omnibus) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 1 month 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/core/SkSpecialSurface.cpp ('k') | src/effects/SkAlphaThresholdFilter.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 2016 Google Inc. 2 * Copyright 2016 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 GrAlphaThresholdFragmentProcessor_DEFINED 8 #ifndef GrAlphaThresholdFragmentProcessor_DEFINED
9 #define GrAlphaThresholdFragmentProcessor_DEFINED 9 #define GrAlphaThresholdFragmentProcessor_DEFINED
10 10
11 #include "SkTypes.h" 11 #include "SkTypes.h"
12 12
13 #if SK_SUPPORT_GPU 13 #if SK_SUPPORT_GPU
14 14
15 #include "GrColorSpaceXform.h" 15 #include "GrColorSpaceXform.h"
16 #include "GrCoordTransform.h" 16 #include "GrCoordTransform.h"
17 #include "GrFragmentProcessor.h" 17 #include "GrFragmentProcessor.h"
18 #include "GrProcessorUnitTest.h" 18 #include "GrProcessorUnitTest.h"
19 19
20 class GrTextureProxy;
21
20 class GrAlphaThresholdFragmentProcessor : public GrFragmentProcessor { 22 class GrAlphaThresholdFragmentProcessor : public GrFragmentProcessor {
21 23
22 public: 24 public:
23 static sk_sp<GrFragmentProcessor> Make(GrTexture* texture, 25 static sk_sp<GrFragmentProcessor> Make(GrTexture* texture,
24 sk_sp<GrColorSpaceXform> colorSpaceXf orm, 26 sk_sp<GrColorSpaceXform> colorSpaceXf orm,
25 GrTexture* maskTexture, 27 GrTexture* maskTexture,
26 float innerThreshold, 28 float innerThreshold,
27 float outerThreshold, 29 float outerThreshold,
28 const SkIRect& bounds); 30 const SkIRect& bounds);
29 31
32 static sk_sp<GrFragmentProcessor> Make(GrTextureProxy* texture,
33 sk_sp<GrColorSpaceXform> colorSpaceXf orm,
34 GrTextureProxy* maskTexture,
35 float innerThreshold,
36 float outerThreshold,
37 const SkIRect& bounds);
38
30 const char* name() const override { return "Alpha Threshold"; } 39 const char* name() const override { return "Alpha Threshold"; }
31 40
32 float innerThreshold() const { return fInnerThreshold; } 41 float innerThreshold() const { return fInnerThreshold; }
33 float outerThreshold() const { return fOuterThreshold; } 42 float outerThreshold() const { return fOuterThreshold; }
34 43
35 GrColorSpaceXform* colorSpaceXform() const { return fColorSpaceXform.get(); } 44 GrColorSpaceXform* colorSpaceXform() const { return fColorSpaceXform.get(); }
36 45
37 private: 46 private:
38 GrAlphaThresholdFragmentProcessor(GrTexture* texture, 47 GrAlphaThresholdFragmentProcessor(GrTexture* texture,
39 sk_sp<GrColorSpaceXform> colorSpaceXform, 48 sk_sp<GrColorSpaceXform> colorSpaceXform,
(...skipping 19 matching lines...) Expand all
59 // Color space transform is for the image (not the mask) 68 // Color space transform is for the image (not the mask)
60 sk_sp<GrColorSpaceXform> fColorSpaceXform; 69 sk_sp<GrColorSpaceXform> fColorSpaceXform;
61 GrCoordTransform fMaskCoordTransform; 70 GrCoordTransform fMaskCoordTransform;
62 GrTextureAccess fMaskTextureAccess; 71 GrTextureAccess fMaskTextureAccess;
63 72
64 typedef GrFragmentProcessor INHERITED; 73 typedef GrFragmentProcessor INHERITED;
65 }; 74 };
66 75
67 #endif 76 #endif
68 #endif 77 #endif
OLDNEW
« no previous file with comments | « src/core/SkSpecialSurface.cpp ('k') | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698