}
/**
- * Abandons all gpu resources, assumes 3D API state is unknown. Call this
+ * Abandons all GPU resources, assumes 3D API state is unknown. Call this
* if you have lost the associated GPU context, and thus internal texture,
* buffer, etc. references/IDs are now invalid. Should be called even when
* GrContext is no longer going to be used for two reasons:
void contextDestroyed();
/**
- * Frees gpu created by the context. Can be called to reduce GPU memory
+ * Frees GPU created by the context. Can be called to reduce GPU memory
* pressure.
*/
void freeGpuResources();
* Create a new entry, based on the specified key and texture, and return
* a "locked" texture. Must call be balanced with an unlockTexture() call.
*
- * @param params The tex params used to draw a texture may help determine
+ * @param params The texture params used to draw a texture may help determine
* the cache entry used. (e.g. different versions may exist
* for different wrap modes on GPUs with limited NPOT
* texture support). NULL implies clamp wrap modes.
*
* @param desc Description of the texture properties.
* @param cacheData Cache-specific properties (e.g., texture gen ID)
- * @param params The tex params used to draw a texture may help determine
+ * @param params The texture params used to draw a texture may help determine
* the cache entry used. (e.g. different versions may exist
* for different wrap modes on GPUs with limited NPOT
* texture support). NULL implies clamp wrap modes.
*
* Textures created by createAndLockTexture() hide the complications of
* tiling non-power-of-two textures on APIs that don't support this (e.g.
- * unextended GLES2). Tiling a npot texture created by lockScratchTexture on
+ * unextended GLES2). Tiling a NPOT texture created by lockScratchTexture on
* such an API will create gaps in the tiling pattern. This includes clamp
* mode. (This may be addressed in a future update.)
*/
void setTextureCacheLimits(int maxTextures, size_t maxTextureBytes);
/**
- * Return the max width or height of a texture supported by the current gpu
+ * Return the max width or height of a texture supported by the current GPU.
*/
int getMaxTextureSize() const;
/**
* Return the max width or height of a render target supported by the
- * current gpu
+ * current GPU.
*/
int getMaxRenderTargetSize() const;
uint32_t pixelOpsFlags = 0);
/**
- * Copy the src pixels [buffer, rowbytes, pixelconfig] into a render target at the specified
+ * Copy the src pixels [buffer, row bytes, pixel config] into a render target at the specified
* rectangle.
* @param target the render target to write into. NULL means the current render target.
* @param left left edge of the rectangle to write (inclusive)
/**
* Resolves a render target that has MSAA. The intermediate MSAA buffer is
- * downsampled to the associated GrTexture (accessible via
+ * down-sampled to the associated GrTexture (accessible via
* GrRenderTarget::asTexture()). Any pending draws to the render target will
* be executed before the resolve.
*
* @param rect The destination rectangle.
* @param sigmaX The blur's standard deviation in X.
* @param sigmaY The blur's standard deviation in Y.
- * @return the blurred texture, which may be srcTexture ref'ed, or a
+ * @return the blurred texture, which may be srcTexture reffed, or a
* new texture. It is the caller's responsibility to unref this texture.
*/
GrTexture* gaussianBlur(GrTexture* srcTexture,
const GrIndexBuffer* getQuadIndexBuffer() const;
/**
- * Stencil buffers add themselves to the cache using
- * addStencilBuffer. findStencilBuffer is called to check the
- * cache for a SB that matches an RT's criteria.
+ * Stencil buffers add themselves to the cache using addStencilBuffer. findStencilBuffer is
+ * called to check the cache for a SB that matches an RT's criteria.
*/
void addStencilBuffer(GrStencilBuffer* sb);
GrStencilBuffer* findStencilBuffer(int width, int height, int sampleCnt);
};
/**
- * Gets and locks a scratch texture from a descriptor using
- * either exact or approximate criteria. Unlocks texture in
- * the destructor.
+ * Gets and locks a scratch texture from a descriptor using either exact or approximate criteria.
+ * Unlocks texture in the destructor.
*/
class GrAutoScratchTexture : ::GrNoncopyable {
public:
/**
* Initializes the GrDrawState based on a GrPaint. Note that GrDrawState
- * encompases more than GrPaint. Aspects of GrDrawState that have no
+ * encompasses more than GrPaint. Aspects of GrDrawState that have no
* GrPaint equivalents are not modified. GrPaint has fewer stages than
* GrDrawState. The extra GrDrawState stages are disabled.
*/
////
/**
- * Sets the blending function coeffecients.
+ * Sets the blending function coefficients.
*
* The blend function will be:
* D' = sat(S*srcCoef + D*dstCoef)
* color, and D' is the new destination color that will be written. sat()
* is the saturation function.
*
- * @param srcCoef coeffecient applied to the src color.
- * @param dstCoef coeffecient applied to the dst color.
+ * @param srcCoef coefficient applied to the src color.
+ * @param dstCoef coefficient applied to the dst color.
*/
void setBlendFunc(GrBlendCoeff srcCoeff, GrBlendCoeff dstCoeff) {
fSrcBlend = srcCoeff;
/**
* Sets the blending function constant referenced by the following blending
- * coeffecients:
+ * coefficients:
* kConstC_GrBlendCoeff
* kIConstC_GrBlendCoeff
* kConstA_GrBlendCoeff
///////////////////////////////////////////////////////////////////////////
// @name Edge AA
- // Edge equations can be specified to perform antialiasing. Because the
+ // Edge equations can be specified to perform anti-aliasing. Because the
// edges are specified as per-vertex data, vertices that are shared by
// multiple edges must be split.
//
/**
* Enable render state settings.
*
- * @param stateBits bitfield of StateBits specifing the states to enable
+ * @param stateBits bitfield of StateBits specifying the states to enable
*/
void enableState(uint32_t stateBits) {
fFlagBits |= stateBits;
/**
* Disable render state settings.
*
- * @param stateBits bitfield of StateBits specifing the states to disable
+ * @param stateBits bitfield of StateBits specifying the states to disable
*/
void disableState(uint32_t stateBits) {
fFlagBits &= ~(stateBits);
/**
* Enable or disable stateBits based on a boolean.
*
- * @param stateBits bitfield of StateBits to enable or disablt
+ * @param stateBits bitfield of StateBits to enable or disable
* @param enable if true enable stateBits, otherwise disable
*/
void setState(uint32_t stateBits, bool enable) {
private:
- // These fields are roughly sorted by decreasing liklihood of being different in op==
+ // These fields are roughly sorted by decreasing likelihood of being different in op==
GrColor fColor;
GrMatrix fViewMatrix;
GrRenderTarget* fRenderTarget;