diff options
author | 2012-07-13 19:54:19 +0000 | |
---|---|---|
committer | 2012-07-13 19:54:19 +0000 | |
commit | e742bf0ab19659145325ac894f7e0b78c8efbd89 (patch) | |
tree | 8b71be2327a6d43a669161908c0f64ac632f80fa /src/gpu/SkGpuDevice.cpp | |
parent | 3cbbb543ef111ce55150835ef3e98de3be895e84 (diff) |
Start removing calls to GrDrawState::setTexture() (and GrPaint::setTexture()?) when there's
a GrSingleTextureEffect involved holding the texture.
http://codereview.appspot.com/6353094/
git-svn-id: http://skia.googlecode.com/svn/trunk@4608 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/SkGpuDevice.cpp')
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 6443fa28e7..dfded26c65 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -562,7 +562,6 @@ inline bool skPaint2GrPaintShader(SkGpuDevice* dev, SkDebugf("Couldn't convert bitmap to texture.\n"); return false; } - grPaint->setTexture(kShaderTextureIdx, texture); switch (bmptype) { case SkShader::kRadial_BitmapType: @@ -595,6 +594,9 @@ inline bool skPaint2GrPaintShader(SkGpuDevice* dev, } else { sampler->setFilter(GrSamplerState::kNearest_Filter); } + // TODO - once we have a trivial GrCustomStage for texture drawing, + // create that here & get rid of the paint's texture + grPaint->setTexture(kShaderTextureIdx, texture); break; } sampler->setWrapX(sk_tile_mode_to_grwrap(tileModes[0])); @@ -1476,7 +1478,6 @@ void apply_custom_stage(GrContext* context, paint.textureSampler(0)->setFilter(GrSamplerState::kBilinear_Filter); paint.textureSampler(0)->reset(sampleM); paint.textureSampler(0)->setCustomStage(stage); - paint.setTexture(0, srcTexture); context->drawRect(paint, rect); } |