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

Unified Diff: include/gpu/GrBackendProcessorFactory.h

Issue 660563003: More effect->processor cleanup (Closed) Base URL: https://skia.googlesource.com/skia.git@comments
Patch Set: more Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/gpu/GrProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrBackendProcessorFactory.h
diff --git a/include/gpu/GrBackendProcessorFactory.h b/include/gpu/GrBackendProcessorFactory.h
index b51a474739938ff3cc8327903eae0067ec0fc628..6544b307a71159b78f01f281e82f21ee90cfa8e3 100644
--- a/include/gpu/GrBackendProcessorFactory.h
+++ b/include/gpu/GrBackendProcessorFactory.h
@@ -19,8 +19,8 @@ class GrGLCaps;
class GrProcessor;
/**
- * Used by effects to build their keys. It incorporates each per-processor key into a larger shader
- * key.
+ * Used by processors to build their keys. It incorporates each per-processor key into a larger shader
+ * key.
*/
class GrProcessorKeyBuilder {
public:
@@ -45,7 +45,7 @@ public:
private:
SkTArray<uint8_t, true>* fData; // unowned ptr to the larger key.
- int fCount; // number of uint32_ts added to fData by the effect.
+ int fCount; // number of uint32_ts added to fData by the processor.
};
/**
@@ -59,41 +59,42 @@ public:
SkASSERT(0 == reinterpret_cast<intptr_t>(key) % sizeof(uint32_t));
}
- /** Gets the uint32_t values that the effect inserted into the key. */
+ /** Gets the uint32_t values that the processor inserted into the key. */
uint32_t get32(int index) const {
SkASSERT(index >=0 && index < fCount);
return fKey[index];
}
- /** Gets the number of uint32_t values that the effect inserted into the key. */
+ /** Gets the number of uint32_t values that the processor inserted into the key. */
int count32() const { return fCount; }
private:
const uint32_t* fKey; // unowned ptr into the larger key.
- int fCount; // number of uint32_ts inserted by the effect into its key.
+ int fCount; // number of uint32_ts inserted by the processor into its key.
};
/**
* Given a GrProcessor of a particular type, creates the corresponding graphics-backend-specific
- * effect object. It also tracks equivalence of shaders generated via a key. The factory for an
- * effect is accessed via GrProcessor::getFactory(). Each factory instance is assigned an ID at
+ * processor object. It also tracks equivalence of shaders generated via a key. The factory for an
+ * processor is accessed via GrProcessor::getFactory(). Each factory instance is assigned an ID at
* construction. The ID of GrProcessor::getFactory() is used as a type identifier. Thus, a
* GrProcessor subclass must always return the same object from getFactory() and that factory object
* must be unique to the GrProcessor subclass (and unique from any further derived subclasses).
*
* Rather than subclassing this class themselves, it is recommended that GrProcessor authors use
- * the templated subclass GrTBackendEffectFactory by writing their getFactory() method as:
+ * the templated subclass GrTBackendProcessorFactory by writing their getFactory() method as:
*
- * const GrBackendEffectFactory& MyEffect::getFactory() const {
- * return GrTBackendEffectFactory<MyEffect>::getInstance();
+ * const GrBackendProcessorFactory& MyProcessor::getFactory() const {
+ * return GrTBackendProcessorFactory<MyProcessor>::getInstance();
* }
*
- * Using GrTBackendEffectFactory places a few constraints on the effect. See that class's comments.
+ * Using GrTBackendProcessorFactory places a few constraints on the processor. See that class's
+ * comments.
*/
class GrBackendProcessorFactory : SkNoncopyable {
public:
/**
- * Generates an effect's key. The key is based on the aspects of the GrProcessor object's
+ * Generates an processor's key. The key is based on the aspects of the GrProcessor object's
* configuration that affect GLSL code generation. Two GrProcessor instances that would cause
* this->createGLInstance()->emitCode() to produce different code must produce different keys.
*/
@@ -101,13 +102,13 @@ public:
GrProcessorKeyBuilder*) const = 0;
/**
- * Produces a human-reable name for the effect.
+ * Produces a human-reable name for the v.
*/
virtual const char* name() const = 0;
/**
* A unique value for every instance of this factory. It is automatically incorporated into the
- * effect's key. This allows keys generated by getGLProcessorKey() to only be unique within a
+ * processor's key. This allows keys generated by getGLProcessorKey() to only be unique within a
* GrProcessor subclass and not necessarily across subclasses.
*/
uint32_t effectClassID() const { return fEffectClassID; }
« no previous file with comments | « no previous file | include/gpu/GrProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698