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

Side by Side Diff: include/core/SkComposeShader.h

Issue 1306163005: Added function CreateFrom2Procs() in new namespace GrXfermodeFragmentProcessor (Closed) Base URL: https://skia.googlesource.com/skia@cs3_testcreate
Patch Set: added mode <= kLastCoeffMode checks Created 5 years, 3 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 9
10 #ifndef SkComposeShader_DEFINED 10 #ifndef SkComposeShader_DEFINED
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 Context* onCreateContext(const ContextRec&, void*) const override; 81 Context* onCreateContext(const ContextRec&, void*) const override;
82 82
83 private: 83 private:
84 SkShader* fShaderA; 84 SkShader* fShaderA;
85 SkShader* fShaderB; 85 SkShader* fShaderB;
86 SkXfermode* fMode; 86 SkXfermode* fMode;
87 87
88 typedef SkShader INHERITED; 88 typedef SkShader INHERITED;
89 }; 89 };
90 90
91 #if SK_SUPPORT_GPU
bsalomon 2015/09/08 15:10:57 I don't think we should be exposing this object vi
wangyix 2015/09/09 17:32:35 GrComposeEffect::onCreateGLInstance() needs GrGLCo
bsalomon 2015/09/09 17:34:56 move it there too?
wangyix 2015/09/09 17:41:08 Is it weird to have GL-specific stuff in GrXfermod
92
93 #include "SkString.h"
tomhudson 2015/09/02 20:02:36 Move the #includes to the top, please.
egdaniel 2015/09/02 20:12:44 So I'm not sure what our official style is, but it
94 #include "../gpu/GrFragmentProcessor.h"
95
96 /////////////////////////////////////////////////////////////////////
97
98 class GrComposeEffect : public GrFragmentProcessor {
99 public:
100 GrComposeEffect(const GrFragmentProcessor* fpA, const GrFragmentProcessor* f pB,
101 SkXfermode::Mode mode);
102 const char* name() const override { return "ComposeShader"; }
103 void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) c onst override;
104
105 SkXfermode::Mode getMode() const { return fMode; }
106
107 protected:
108 bool onIsEqual(const GrFragmentProcessor&) const override;
109 void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
110
111 private:
112 GrGLFragmentProcessor* onCreateGLInstance() const override;
113
114 SkXfermode::Mode fMode;
115
116 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
117
118 typedef GrFragmentProcessor INHERITED;
119 };
91 #endif 120 #endif
121
122 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698