aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/effects')
-rw-r--r--src/gpu/effects/GrColorTableEffect.h2
-rw-r--r--src/gpu/effects/GrConvolutionEffect.cpp2
-rw-r--r--src/gpu/effects/GrConvolutionEffect.h2
-rw-r--r--src/gpu/effects/GrTextureStripAtlas.cpp16
-rw-r--r--src/gpu/effects/GrTextureStripAtlas.h32
5 files changed, 27 insertions, 27 deletions
diff --git a/src/gpu/effects/GrColorTableEffect.h b/src/gpu/effects/GrColorTableEffect.h
index de86768ca3..f79e586579 100644
--- a/src/gpu/effects/GrColorTableEffect.h
+++ b/src/gpu/effects/GrColorTableEffect.h
@@ -16,7 +16,7 @@ class GrGLColorTableEffect;
/**
* LUT-based color transformation effect. This class implements the Gr
* counterpart to the SkTable_ColorFilter effect. A 256 * 4 (single-channel)
- * LUT is used to transform the input colors of the image.
+ * LUT is used to transform the input colors of the image.
*/
class GrColorTableEffect : public GrSingleTextureEffect {
diff --git a/src/gpu/effects/GrConvolutionEffect.cpp b/src/gpu/effects/GrConvolutionEffect.cpp
index 92c6ffb169..2cefbc4e26 100644
--- a/src/gpu/effects/GrConvolutionEffect.cpp
+++ b/src/gpu/effects/GrConvolutionEffect.cpp
@@ -69,7 +69,7 @@ void GrGLConvolutionEffect::emitFS(GrGLShaderBuilder* builder,
SkString* code = &builder->fFSCode;
code->appendf("\t\t%s = vec4(0, 0, 0, 0);\n", outputColor);
-
+
int width = this ->width();
const GrGLShaderVar& kernel = builder->getUniformVariable(fKernelUni);
const char* imgInc = builder->getUniformCStr(fImageIncrementUni);
diff --git a/src/gpu/effects/GrConvolutionEffect.h b/src/gpu/effects/GrConvolutionEffect.h
index 21c022d85f..4c42a6ce41 100644
--- a/src/gpu/effects/GrConvolutionEffect.h
+++ b/src/gpu/effects/GrConvolutionEffect.h
@@ -13,7 +13,7 @@
class GrGLConvolutionEffect;
/**
- * A convolution effect. The kernel is specified as an array of 2 * half-width
+ * A convolution effect. The kernel is specified as an array of 2 * half-width
* + 1 weights. Each texel is multiplied by it's weight and summed to determine
* the output color. The output color is modulated by the input color.
*/
diff --git a/src/gpu/effects/GrTextureStripAtlas.cpp b/src/gpu/effects/GrTextureStripAtlas.cpp
index 3462e9243b..a43f9d6f68 100644
--- a/src/gpu/effects/GrTextureStripAtlas.cpp
+++ b/src/gpu/effects/GrTextureStripAtlas.cpp
@@ -51,7 +51,7 @@ GrTextureStripAtlas* GrTextureStripAtlas::GetAtlas(const GrTextureStripAtlas::De
}
}
-GrTextureStripAtlas::GrTextureStripAtlas(GrTextureStripAtlas::Desc desc)
+GrTextureStripAtlas::GrTextureStripAtlas(GrTextureStripAtlas::Desc desc)
: fCacheID(sk_atomic_inc(&gCacheCount))
, fLockedRows(0)
, fDesc(desc)
@@ -88,9 +88,9 @@ int GrTextureStripAtlas::lockRow(const SkBitmap& data) {
++row->fLocks;
++fLockedRows;
- // Since all the rows are always stored in a contiguous array, we can save the memory
+ // Since all the rows are always stored in a contiguous array, we can save the memory
// required for storing row numbers and just compute it with some pointer arithmetic
- rowNumber = static_cast<int>(row - fRows);
+ rowNumber = static_cast<int>(row - fRows);
} else {
// ~index is the index where we will insert the new key to keep things sorted
index = ~index;
@@ -131,7 +131,7 @@ int GrTextureStripAtlas::lockRow(const SkBitmap& data) {
row->fKey = key;
row->fLocks = 1;
fKeyTable.insert(index, 1, &row);
- rowNumber = static_cast<int>(row - fRows);
+ rowNumber = static_cast<int>(row - fRows);
SkAutoLockPixels lock(data);
@@ -139,7 +139,7 @@ int GrTextureStripAtlas::lockRow(const SkBitmap& data) {
// that is not currently in use
fDesc.fContext->writeTexturePixels(fTexture,
0, rowNumber * fDesc.fRowHeight,
- fDesc.fWidth, fDesc.fRowHeight,
+ fDesc.fWidth, fDesc.fRowHeight,
SkBitmapConfig2GrPixelConfig(data.config()),
data.getPixels(),
data.rowBytes(),
@@ -239,7 +239,7 @@ void GrTextureStripAtlas::removeFromLRU(AtlasRow* row) {
if (fLRUFront) {
fLRUFront->fPrev = NULL;
}
- }
+ }
}
row->fNext = NULL;
row->fPrev = NULL;
@@ -249,8 +249,8 @@ int GrTextureStripAtlas::searchByKey(uint32_t key) {
AtlasRow target;
target.fKey = key;
return SkTSearch<AtlasRow, GrTextureStripAtlas::compareKeys>((const AtlasRow**)fKeyTable.begin(),
- fKeyTable.count(),
- &target,
+ fKeyTable.count(),
+ &target,
sizeof(AtlasRow*));
}
diff --git a/src/gpu/effects/GrTextureStripAtlas.h b/src/gpu/effects/GrTextureStripAtlas.h
index c763599963..1a4c371b69 100644
--- a/src/gpu/effects/GrTextureStripAtlas.h
+++ b/src/gpu/effects/GrTextureStripAtlas.h
@@ -15,7 +15,7 @@
#include "SkTDArray.h"
/**
- * Maintains a single large texture whose rows store many textures of a small fixed height,
+ * Maintains a single large texture whose rows store many textures of a small fixed height,
* stored in rows across the x-axis such that we can safely wrap/repeat them horizontally.
*/
class GrTextureStripAtlas {
@@ -49,20 +49,20 @@ public:
int lockRow(const SkBitmap& data);
void unlockRow(int row);
- /**
- * These functions help turn an integer row index in [0, 1, 2, ... numRows] into a scalar y
+ /**
+ * These functions help turn an integer row index in [0, 1, 2, ... numRows] into a scalar y
* texture coordinate in [0, 1] that we can use in a shader.
*
- * If a regular texture access without using the atlas looks like:
+ * If a regular texture access without using the atlas looks like:
*
* texture2D(sampler, vec2(x, y))
*
- * Then when using the atlas we'd replace it with:
+ * Then when using the atlas we'd replace it with:
*
- * texture2D(sampler, vec2(x, yOffset + y * scaleFactor))
+ * texture2D(sampler, vec2(x, yOffset + y * scaleFactor))
*
* Where yOffset, returned by getYOffset(), is the offset to the start of the row within the
- * atlas and scaleFactor, returned by getVerticalScaleFactor(), is the y-scale of the row,
+ * atlas and scaleFactor, returned by getVerticalScaleFactor(), is the y-scale of the row,
* relative to the height of the overall atlas texture.
*/
GrScalar getYOffset(int row) const { return SkIntToScalar(row) / fNumRows; }
@@ -76,30 +76,30 @@ private:
// Key to indicate an atlas row without any meaningful data stored in it
const static uint32_t kEmptyAtlasRowKey = 0xffffffff;
- /**
+ /**
* The state of a single row in our cache, next/prev pointers allow these to be chained
* together to represent LRU status
*/
struct AtlasRow : public GrNoncopyable {
AtlasRow() : fKey(kEmptyAtlasRowKey), fLocks(0), fNext(NULL), fPrev(NULL) { }
// GenerationID of the bitmap that is represented by this row, 0xffffffff means "empty"
- uint32_t fKey;
+ uint32_t fKey;
// How many times this has been locked (0 == unlocked)
- int32_t fLocks;
+ int32_t fLocks;
// We maintain an LRU linked list between unlocked nodes with these pointers
AtlasRow* fNext;
AtlasRow* fPrev;
};
- /**
+ /**
* We'll only allow construction via the static GrTextureStripAtlas::GetAtlas
*/
GrTextureStripAtlas(Desc desc);
-
+
void lockTexture();
void unlockTexture();
- /**
+ /**
* Initialize our LRU list (if one already exists, clear it and start anew)
*/
void initLRU();
@@ -112,8 +112,8 @@ private:
void appendLRU(AtlasRow* row);
void removeFromLRU(AtlasRow* row);
- /**
- * Searches the key table for a key and returns the index if found; if not found, it returns
+ /**
+ * Searches the key table for a key and returns the index if found; if not found, it returns
* the bitwise not of the index at which we could insert the key to maintain a sorted list.
**/
int searchByKey(uint32_t key);
@@ -144,7 +144,7 @@ private:
GrTexture* fTexture;
// Array of AtlasRows which store the state of all our rows. Stored in a contiguous array, in
- // order that they appear in our texture, this means we can subtract this pointer from a row
+ // order that they appear in our texture, this means we can subtract this pointer from a row
// pointer to get its index in the texture, and can save storing a row number in AtlasRow.
AtlasRow* fRows;