Spell correct some comments.
Unreviewed git-svn-id: http://skia.googlecode.com/svn/trunk@5951 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
04685d29b1
commit
1e269b5a08
@ -81,7 +81,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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,
|
* if you have lost the associated GPU context, and thus internal texture,
|
||||||
* buffer, etc. references/IDs are now invalid. Should be called even when
|
* buffer, etc. references/IDs are now invalid. Should be called even when
|
||||||
* GrContext is no longer going to be used for two reasons:
|
* GrContext is no longer going to be used for two reasons:
|
||||||
@ -101,7 +101,7 @@ public:
|
|||||||
void contextDestroyed();
|
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.
|
* pressure.
|
||||||
*/
|
*/
|
||||||
void freeGpuResources();
|
void freeGpuResources();
|
||||||
@ -118,7 +118,7 @@ public:
|
|||||||
* Create a new entry, based on the specified key and texture, and return
|
* Create a new entry, based on the specified key and texture, and return
|
||||||
* a "locked" texture. Must call be balanced with an unlockTexture() call.
|
* 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
|
* the cache entry used. (e.g. different versions may exist
|
||||||
* for different wrap modes on GPUs with limited NPOT
|
* for different wrap modes on GPUs with limited NPOT
|
||||||
* texture support). NULL implies clamp wrap modes.
|
* texture support). NULL implies clamp wrap modes.
|
||||||
@ -145,7 +145,7 @@ public:
|
|||||||
*
|
*
|
||||||
* @param desc Description of the texture properties.
|
* @param desc Description of the texture properties.
|
||||||
* @param cacheData Cache-specific properties (e.g., texture gen ID)
|
* @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
|
* the cache entry used. (e.g. different versions may exist
|
||||||
* for different wrap modes on GPUs with limited NPOT
|
* for different wrap modes on GPUs with limited NPOT
|
||||||
* texture support). NULL implies clamp wrap modes.
|
* texture support). NULL implies clamp wrap modes.
|
||||||
@ -190,7 +190,7 @@ public:
|
|||||||
*
|
*
|
||||||
* Textures created by createAndLockTexture() hide the complications of
|
* Textures created by createAndLockTexture() hide the complications of
|
||||||
* tiling non-power-of-two textures on APIs that don't support this (e.g.
|
* 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
|
* such an API will create gaps in the tiling pattern. This includes clamp
|
||||||
* mode. (This may be addressed in a future update.)
|
* mode. (This may be addressed in a future update.)
|
||||||
*/
|
*/
|
||||||
@ -252,13 +252,13 @@ public:
|
|||||||
void setTextureCacheLimits(int maxTextures, size_t maxTextureBytes);
|
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;
|
int getMaxTextureSize() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the max width or height of a render target supported by the
|
* Return the max width or height of a render target supported by the
|
||||||
* current gpu
|
* current GPU.
|
||||||
*/
|
*/
|
||||||
int getMaxRenderTargetSize() const;
|
int getMaxRenderTargetSize() const;
|
||||||
|
|
||||||
@ -528,7 +528,7 @@ public:
|
|||||||
uint32_t pixelOpsFlags = 0);
|
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.
|
* rectangle.
|
||||||
* @param target the render target to write into. NULL means the current render target.
|
* @param target the render target to write into. NULL means the current render target.
|
||||||
* @param left left edge of the rectangle to write (inclusive)
|
* @param left left edge of the rectangle to write (inclusive)
|
||||||
@ -598,7 +598,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolves a render target that has MSAA. The intermediate MSAA buffer is
|
* 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
|
* GrRenderTarget::asTexture()). Any pending draws to the render target will
|
||||||
* be executed before the resolve.
|
* be executed before the resolve.
|
||||||
*
|
*
|
||||||
@ -617,7 +617,7 @@ public:
|
|||||||
* @param rect The destination rectangle.
|
* @param rect The destination rectangle.
|
||||||
* @param sigmaX The blur's standard deviation in X.
|
* @param sigmaX The blur's standard deviation in X.
|
||||||
* @param sigmaY The blur's standard deviation in Y.
|
* @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.
|
* new texture. It is the caller's responsibility to unref this texture.
|
||||||
*/
|
*/
|
||||||
GrTexture* gaussianBlur(GrTexture* srcTexture,
|
GrTexture* gaussianBlur(GrTexture* srcTexture,
|
||||||
@ -840,9 +840,8 @@ public:
|
|||||||
const GrIndexBuffer* getQuadIndexBuffer() const;
|
const GrIndexBuffer* getQuadIndexBuffer() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stencil buffers add themselves to the cache using
|
* Stencil buffers add themselves to the cache using addStencilBuffer. findStencilBuffer is
|
||||||
* addStencilBuffer. findStencilBuffer is called to check the
|
* called to check the cache for a SB that matches an RT's criteria.
|
||||||
* cache for a SB that matches an RT's criteria.
|
|
||||||
*/
|
*/
|
||||||
void addStencilBuffer(GrStencilBuffer* sb);
|
void addStencilBuffer(GrStencilBuffer* sb);
|
||||||
GrStencilBuffer* findStencilBuffer(int width, int height, int sampleCnt);
|
GrStencilBuffer* findStencilBuffer(int width, int height, int sampleCnt);
|
||||||
@ -924,9 +923,8 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets and locks a scratch texture from a descriptor using
|
* Gets and locks a scratch texture from a descriptor using either exact or approximate criteria.
|
||||||
* either exact or approximate criteria. Unlocks texture in
|
* Unlocks texture in the destructor.
|
||||||
* the destructor.
|
|
||||||
*/
|
*/
|
||||||
class GrAutoScratchTexture : ::GrNoncopyable {
|
class GrAutoScratchTexture : ::GrNoncopyable {
|
||||||
public:
|
public:
|
||||||
|
@ -94,7 +94,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the GrDrawState based on a GrPaint. Note that GrDrawState
|
* 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
|
* GrPaint equivalents are not modified. GrPaint has fewer stages than
|
||||||
* GrDrawState. The extra GrDrawState stages are disabled.
|
* GrDrawState. The extra GrDrawState stages are disabled.
|
||||||
*/
|
*/
|
||||||
@ -324,7 +324,7 @@ public:
|
|||||||
////
|
////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the blending function coeffecients.
|
* Sets the blending function coefficients.
|
||||||
*
|
*
|
||||||
* The blend function will be:
|
* The blend function will be:
|
||||||
* D' = sat(S*srcCoef + D*dstCoef)
|
* D' = sat(S*srcCoef + D*dstCoef)
|
||||||
@ -333,8 +333,8 @@ public:
|
|||||||
* color, and D' is the new destination color that will be written. sat()
|
* color, and D' is the new destination color that will be written. sat()
|
||||||
* is the saturation function.
|
* is the saturation function.
|
||||||
*
|
*
|
||||||
* @param srcCoef coeffecient applied to the src color.
|
* @param srcCoef coefficient applied to the src color.
|
||||||
* @param dstCoef coeffecient applied to the dst color.
|
* @param dstCoef coefficient applied to the dst color.
|
||||||
*/
|
*/
|
||||||
void setBlendFunc(GrBlendCoeff srcCoeff, GrBlendCoeff dstCoeff) {
|
void setBlendFunc(GrBlendCoeff srcCoeff, GrBlendCoeff dstCoeff) {
|
||||||
fSrcBlend = srcCoeff;
|
fSrcBlend = srcCoeff;
|
||||||
@ -376,7 +376,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the blending function constant referenced by the following blending
|
* Sets the blending function constant referenced by the following blending
|
||||||
* coeffecients:
|
* coefficients:
|
||||||
* kConstC_GrBlendCoeff
|
* kConstC_GrBlendCoeff
|
||||||
* kIConstC_GrBlendCoeff
|
* kIConstC_GrBlendCoeff
|
||||||
* kConstA_GrBlendCoeff
|
* kConstA_GrBlendCoeff
|
||||||
@ -660,7 +660,7 @@ public:
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// @name Edge AA
|
// @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
|
// edges are specified as per-vertex data, vertices that are shared by
|
||||||
// multiple edges must be split.
|
// multiple edges must be split.
|
||||||
//
|
//
|
||||||
@ -753,7 +753,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Enable render state settings.
|
* 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) {
|
void enableState(uint32_t stateBits) {
|
||||||
fFlagBits |= stateBits;
|
fFlagBits |= stateBits;
|
||||||
@ -762,7 +762,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Disable render state settings.
|
* 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) {
|
void disableState(uint32_t stateBits) {
|
||||||
fFlagBits &= ~(stateBits);
|
fFlagBits &= ~(stateBits);
|
||||||
@ -771,7 +771,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Enable or disable stateBits based on a boolean.
|
* 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
|
* @param enable if true enable stateBits, otherwise disable
|
||||||
*/
|
*/
|
||||||
void setState(uint32_t stateBits, bool enable) {
|
void setState(uint32_t stateBits, bool enable) {
|
||||||
@ -915,7 +915,7 @@ public:
|
|||||||
|
|
||||||
private:
|
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;
|
GrColor fColor;
|
||||||
GrMatrix fViewMatrix;
|
GrMatrix fViewMatrix;
|
||||||
GrRenderTarget* fRenderTarget;
|
GrRenderTarget* fRenderTarget;
|
||||||
|
Loading…
Reference in New Issue
Block a user