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

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

Issue 1287023009: Added tree structure to GrGLFragmentProcessor, i.e. GL instances (Closed) Base URL: https://skia.googlesource.com/skia@cs3_isequal_nonrecursive
Patch Set: moved onSetData from public to protected, onCreateGLInstance from public to private in subclasses Created 5 years, 4 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/GrCustomXfermode.cpp ('k') | src/gpu/effects/GrDitherEffect.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 2015 Google Inc. 2 * Copyright 2015 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 GrCustomXfermodePriv_DEFINED 8 #ifndef GrCustomXfermodePriv_DEFINED
9 #define GrCustomXfermodePriv_DEFINED 9 #define GrCustomXfermodePriv_DEFINED
10 10
(...skipping 11 matching lines...) Expand all
22 class GrTexture; 22 class GrTexture;
23 23
24 /////////////////////////////////////////////////////////////////////////////// 24 ///////////////////////////////////////////////////////////////////////////////
25 // Fragment Processor 25 // Fragment Processor
26 /////////////////////////////////////////////////////////////////////////////// 26 ///////////////////////////////////////////////////////////////////////////////
27 27
28 class GrCustomXferFP : public GrFragmentProcessor { 28 class GrCustomXferFP : public GrFragmentProcessor {
29 public: 29 public:
30 GrCustomXferFP(GrProcessorDataManager*, SkXfermode::Mode mode, GrTexture* ba ckground); 30 GrCustomXferFP(GrProcessorDataManager*, SkXfermode::Mode mode, GrTexture* ba ckground);
31 31
32 GrGLFragmentProcessor* createGLInstance() const override;
33
34 const char* name() const override { return "Custom Xfermode"; } 32 const char* name() const override { return "Custom Xfermode"; }
35 33
36 SkXfermode::Mode mode() const { return fMode; } 34 SkXfermode::Mode mode() const { return fMode; }
37 const GrTextureAccess& backgroundAccess() const { return fBackgroundAccess; } 35 const GrTextureAccess& backgroundAccess() const { return fBackgroundAccess; }
38 36
39 private: 37 private:
38 GrGLFragmentProcessor* onCreateGLInstance() const override;
39
40 void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) c onst override; 40 void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) c onst override;
41 41
42 bool onIsEqual(const GrFragmentProcessor& other) const override; 42 bool onIsEqual(const GrFragmentProcessor& other) const override;
43 43
44 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; 44 void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
45 45
46 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 46 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
47 47
48 SkXfermode::Mode fMode; 48 SkXfermode::Mode fMode;
49 GrCoordTransform fBackgroundTransform; 49 GrCoordTransform fBackgroundTransform;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 GR_DECLARE_XP_FACTORY_TEST; 87 GR_DECLARE_XP_FACTORY_TEST;
88 88
89 SkXfermode::Mode fMode; 89 SkXfermode::Mode fMode;
90 GrBlendEquation fHWBlendEquation; 90 GrBlendEquation fHWBlendEquation;
91 91
92 typedef GrXPFactory INHERITED; 92 typedef GrXPFactory INHERITED;
93 }; 93 };
94 #endif 94 #endif
95 95
OLDNEW
« no previous file with comments | « src/gpu/effects/GrCustomXfermode.cpp ('k') | src/gpu/effects/GrDitherEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698