Formatting cleanup: remove extra whitespace
Change by arthurhsu@chromium.org, original CL: http://codereview.appspot.com/5587049/
Review URL: https://codereview.appspot.com/5594043
git-svn-id: http://skia.googlecode.com/svn/trunk@3098 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 25ded63..5a34ef2 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -149,18 +149,18 @@
this->initFromRenderTarget(context, renderTarget);
}
-void SkGpuDevice::initFromRenderTarget(GrContext* context,
+void SkGpuDevice::initFromRenderTarget(GrContext* context,
GrRenderTarget* renderTarget) {
fNeedPrepareRenderTarget = false;
fDrawProcs = NULL;
-
+
fContext = context;
fContext->ref();
-
+
fTexture = NULL;
fRenderTarget = NULL;
fNeedClear = false;
-
+
GrAssert(NULL != renderTarget);
fRenderTarget = renderTarget;
fRenderTarget->ref();
@@ -202,7 +202,7 @@
bm.setConfig(config, width, height);
#if CACHE_LAYER_TEXTURES
- TexType type = (kSaveLayer_Usage == usage) ?
+ TexType type = (kSaveLayer_Usage == usage) ?
kSaveLayerDeviceRenderTarget_TexType :
kDeviceRenderTarget_TexType;
fCache = this->lockCachedTexture(bm, NULL, type);
@@ -254,7 +254,7 @@
GrAssert(NULL != fTexture);
GrAssert(fRenderTarget == fTexture->asRenderTarget());
fContext->unlockTexture(fCache);
- }
+ }
fContext->unref();
}
@@ -385,8 +385,8 @@
}
}
-SkGpuRenderTarget* SkGpuDevice::accessRenderTarget() {
- return (SkGpuRenderTarget*)fRenderTarget;
+SkGpuRenderTarget* SkGpuDevice::accessRenderTarget() {
+ return (SkGpuRenderTarget*)fRenderTarget;
}
bool SkGpuDevice::bindDeviceAsTexture(GrPaint* paint) {
@@ -737,7 +737,7 @@
// Apply a Gaussian blur to srcTexture by sigmaX and sigmaY, within the given
// rect.
// temp1 and temp2 are used for allocation of intermediate textures.
-// If temp2 is non-NULL, srcTexture will be untouched, and the return
+// If temp2 is non-NULL, srcTexture will be untouched, and the return
// value will be either temp1 or temp2.
// If temp2 is NULL, srcTexture will be overwritten with intermediate
// results, and the return value will either be temp1 or srcTexture.
@@ -784,7 +784,7 @@
srcTexture->height());
context->setRenderTarget(dstTexture->asRenderTarget());
SkRect dstRect(srcRect);
- scaleRect(&dstRect, i < scaleFactorX ? 0.5f : 1.0f,
+ scaleRect(&dstRect, i < scaleFactorX ? 0.5f : 1.0f,
i < scaleFactorY ? 0.5f : 1.0f);
paint.setTexture(0, srcTexture);
context->drawRectToRect(paint, dstRect, srcRect);
@@ -974,7 +974,7 @@
}
context->setRenderTarget(oldRenderTarget);
context->setClip(oldClip);
-
+
if (grp->hasTextureOrMask()) {
GrMatrix inverse;
if (!matrix.invert(&inverse)) {
@@ -1084,7 +1084,7 @@
if (SkDrawTreatAsHairline(paint, *draw.fMatrix, &coverage)) {
doFill = false;
}
-
+
GrPaint grPaint;
SkAutoCachedTexture act;
if (!this->skPaint2GrPaintShader(paint,
@@ -1118,7 +1118,7 @@
// at this point we're done with prePathMatrix
SkDEBUGCODE(prePathMatrix = (const SkMatrix*)0x50FF8001;)
- if (doFill && (paint.getPathEffect() ||
+ if (doFill && (paint.getPathEffect() ||
paint.getStyle() != SkPaint::kFill_Style)) {
// it is safe to use tmpPath here, even if we already used it for the
// prepathmatrix, since getFillPath can take the same object for its
@@ -1176,7 +1176,7 @@
return tilesX * tilesY;
}
-inline int determine_tile_size(const SkBitmap& bitmap,
+inline int determine_tile_size(const SkBitmap& bitmap,
const SkIRect* srcRectPtr,
int maxTextureSize) {
static const int kSmallTileSize = 1 << 10;
@@ -1300,7 +1300,7 @@
ScalarRect.set(srcRect);
// Transform 'm' needs to be concatenated to the draw matrix,
- // rather than transforming the primitive directly, so that 'm' will
+ // rather than transforming the primitive directly, so that 'm' will
// also affect the behavior of the mask filter.
SkMatrix drawMatrix;
drawMatrix.setConcat(*draw.fMatrix, m);
@@ -1427,7 +1427,7 @@
GrFixedToScalar((srcRect.fBottom << 16) / bitmap.height()));
if (GrSamplerState::kNearest_Filter != sampler->getFilter() &&
- (srcRect.width() < bitmap.width() ||
+ (srcRect.width() < bitmap.width() ||
srcRect.height() < bitmap.height())) {
// If drawing a subrect of the bitmap and filtering is enabled,
// use a constrained texture domain to avoid color bleeding
@@ -1583,7 +1583,7 @@
if (NULL == texs) {
if (!this->skPaint2GrPaintNoShader(paint,
false,
- &grPaint,
+ &grPaint,
NULL == colors)) {
return;
}
@@ -1803,7 +1803,7 @@
if (!bitmap.isVolatile()) {
GrContext::TextureKey key = bitmap.getGenerationID();
key |= ((uint64_t) bitmap.pixelRefOffset()) << 32;
-
+
entry = ctx->findAndLockTexture(key, bitmap.width(),
bitmap.height(), sampler);
if (NULL == entry.texture()) {
@@ -1836,11 +1836,11 @@
}
-SkDevice* SkGpuDevice::onCreateCompatibleDevice(SkBitmap::Config config,
- int width, int height,
+SkDevice* SkGpuDevice::onCreateCompatibleDevice(SkBitmap::Config config,
+ int width, int height,
bool isOpaque,
Usage usage) {
- return SkNEW_ARGS(SkGpuDevice,(this->context(), config,
+ return SkNEW_ARGS(SkGpuDevice,(this->context(), config,
width, height, usage));
}