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

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

Issue 1314923002: GLProgramsTest can now randomly create a tree of GrFragmentProcessors instead of a linear pipeline (Closed) Base URL: https://skia.googlesource.com/skia@cs3_testcreate
Patch Set: nits by Josh 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
« no previous file with comments | « no previous file | src/core/SkComposeShader.cpp » ('j') | tests/GLProgramsTest.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 Context* onCreateContext(const ContextRec&, void*) const override; 77 Context* onCreateContext(const ContextRec&, void*) const override;
78 78
79 private: 79 private:
80 SkShader* fShaderA; 80 SkShader* fShaderA;
81 SkShader* fShaderB; 81 SkShader* fShaderB;
82 SkXfermode* fMode; 82 SkXfermode* fMode;
83 83
84 typedef SkShader INHERITED; 84 typedef SkShader INHERITED;
85 }; 85 };
86 86
87 #if SK_SUPPORT_GPU
88
89 #include "SkString.h"
90 #include "../gpu/GrFragmentProcessor.h"
91
92 /////////////////////////////////////////////////////////////////////
93
94 class GrComposeEffect : public GrFragmentProcessor {
95 public:
96
97 static GrFragmentProcessor* Create(const GrFragmentProcessor* fpA,
98 const GrFragmentProcessor* fpB,
99 SkXfermode::Mode mode);
100 const char* name() const override {return fName.c_str(); }
tomhudson 2015/08/25 19:29:24 Teensy-tiny nit: space before return.
wangyix 2015/08/25 21:34:09 Done.
101 void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) c onst override;
102
103 SkXfermode::Mode getMode() const { return fMode; }
104 int getShaderAChildIndex() const { return fShaderAChildIndex; }
105 int getShaderBChildIndex() const { return fShaderBChildIndex; }
106
107 protected:
108 bool onIsEqual(const GrFragmentProcessor&) const override;
109 void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
110
111 private:
112 GrComposeEffect(const GrFragmentProcessor* fpA, const GrFragmentProcessor* f pB,
113 SkXfermode::Mode mode);
114
115 GrGLFragmentProcessor* onCreateGLInstance() const override;
116
117 SkString fName;
118 int fShaderAChildIndex;
119 int fShaderBChildIndex;
120 SkXfermode::Mode fMode;
121
122 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
123
124 typedef GrFragmentProcessor INHERITED;
125 };
126
87 #endif 127 #endif
128
129 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkComposeShader.cpp » ('j') | tests/GLProgramsTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698