diff options
author | 2012-10-25 12:47:42 +0000 | |
---|---|---|
committer | 2012-10-25 12:47:42 +0000 | |
commit | 021fc736f89fddac4f26b3f32f50263ff8fe3279 (patch) | |
tree | d284042c593d840c591753bfc849fe675980960b /src/gpu/SkGpuDevice.cpp | |
parent | 8b0e2340e11e973d27aea39ec65e6bc9738224a5 (diff) |
GrCustomStage Renaming Part 5
Stuff found by searching for "stage".
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6772043
git-svn-id: http://skia.googlecode.com/svn/trunk@6089 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/SkGpuDevice.cpp')
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 5cdecdb553..b7de9add29 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -512,9 +512,9 @@ inline bool skPaint2GrPaintNoShader(SkGpuDevice* dev, SkColor filtered = colorFilter->filterColor(skPaint.getColor()); grPaint->setColor(SkColor2GrColor(filtered)); } else { - SkAutoTUnref<GrEffect> stage(colorFilter->asNewEffect(dev->context())); - if (NULL != stage.get()) { - grPaint->colorSampler(kColorFilterTextureIdx)->setEffect(stage); + SkAutoTUnref<GrEffect> effect(colorFilter->asNewEffect(dev->context())); + if (NULL != effect.get()) { + grPaint->colorSampler(kColorFilterTextureIdx)->setEffect(effect); } else { // TODO: rewrite this using asNewEffect() SkColor color; @@ -1415,7 +1415,7 @@ void SkGpuDevice::internalDrawBitmap(const SkBitmap& bitmap, } GrRect textureDomain = GrRect::MakeEmpty(); - SkAutoTUnref<GrEffect> stage; + SkAutoTUnref<GrEffect> effect; if (needsTextureDomain) { // Use a constrained texture domain to avoid color bleeding GrScalar left, top, right, bottom; @@ -1434,11 +1434,11 @@ void SkGpuDevice::internalDrawBitmap(const SkBitmap& bitmap, top = bottom = GrScalarHalf(paintRect.top() + paintRect.bottom()); } textureDomain.setLTRB(left, top, right, bottom); - stage.reset(SkNEW_ARGS(GrTextureDomainEffect, (texture, textureDomain, params))); + effect.reset(SkNEW_ARGS(GrTextureDomainEffect, (texture, textureDomain, params))); } else { - stage.reset(SkNEW_ARGS(GrSingleTextureEffect, (texture, params))); + effect.reset(SkNEW_ARGS(GrSingleTextureEffect, (texture, params))); } - grPaint->colorSampler(kBitmapTextureIdx)->setEffect(stage); + grPaint->colorSampler(kBitmapTextureIdx)->setEffect(effect); fContext->drawRectToRect(*grPaint, dstRect, paintRect, &m); } @@ -1475,18 +1475,18 @@ static GrTexture* filter_texture(SkDevice* device, GrContext* context, desc.fWidth = SkScalarCeilToInt(rect.width()); desc.fHeight = SkScalarCeilToInt(rect.height()); desc.fConfig = kRGBA_8888_GrPixelConfig; - GrEffect* stage; + GrEffect* effect; if (filter->canFilterImageGPU()) { // Save the render target and set it to NULL, so we don't accidentally draw to it in the // filter. Also set the clip wide open and the matrix to identity. GrContext::AutoWideOpenIdentityDraw awo(context, NULL); texture = filter->onFilterImageGPU(&proxy, texture, rect); - } else if (filter->asNewEffect(&stage, texture)) { + } else if (filter->asNewEffect(&effect, texture)) { GrAutoScratchTexture dst(context, desc); - apply_effect(context, texture, dst.texture(), rect, stage); + apply_effect(context, texture, dst.texture(), rect, effect); texture = dst.detach(); - stage->unref(); + effect->unref(); } return texture; } |