Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Unified Diff: src/gpu/SkGpuDevice_drawTexture.cpp

Issue 1507973005: Make "alpha only" be a property of GrTextureProducer (Closed) Base URL: https://skia.googlesource.com/skia.git@producernine
Patch Set: fix unused var Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice_drawTexture.cpp
diff --git a/src/gpu/SkGpuDevice_drawTexture.cpp b/src/gpu/SkGpuDevice_drawTexture.cpp
index 0b1d3f1f08af81010827de44d4486471169214fa..efbc6c98d599587e08bc28578b91f903e853b443 100644
--- a/src/gpu/SkGpuDevice_drawTexture.cpp
+++ b/src/gpu/SkGpuDevice_drawTexture.cpp
@@ -88,7 +88,6 @@ static bool can_ignore_bilerp_constraint(const GrTextureProducer& producer,
//////////////////////////////////////////////////////////////////////////////
void SkGpuDevice::drawTextureProducer(GrTextureProducer* producer,
- bool alphaOnly,
const SkRect* srcRect,
const SkRect* dstRect,
SkCanvas::SrcRectConstraint constraint,
@@ -135,12 +134,11 @@ void SkGpuDevice::drawTextureProducer(GrTextureProducer* producer,
}
}
- this->drawTextureProducerImpl(producer, alphaOnly, clippedSrcRect, clippedDstRect, constraint,
- viewMatrix, srcToDstMatrix, clip, paint);
+ this->drawTextureProducerImpl(producer, clippedSrcRect, clippedDstRect, constraint, viewMatrix,
+ srcToDstMatrix, clip, paint);
}
void SkGpuDevice::drawTextureProducerImpl(GrTextureProducer* producer,
- bool alphaTexture,
const SkRect& clippedSrcRect,
const SkRect& clippedDstRect,
SkCanvas::SrcRectConstraint constraint,
@@ -156,7 +154,7 @@ void SkGpuDevice::drawTextureProducerImpl(GrTextureProducer* producer,
// The shader expects proper local coords, so we can't replace local coords with texture coords
// if the shader will be used. If we have a mask filter we will change the underlying geometry
// that is rendered.
- bool canUseTextureCoordsAsLocalCoords = !use_shader(alphaTexture, paint) && !mf;
+ bool canUseTextureCoordsAsLocalCoords = !use_shader(producer->isAlphaOnly(), paint) && !mf;
bool doBicubic;
GrTextureParams::FilterMode fm =
@@ -204,7 +202,8 @@ void SkGpuDevice::drawTextureProducerImpl(GrTextureProducer* producer,
}
GrPaint grPaint;
- if (!SkPaintToGrPaintWithTexture(fContext, paint, viewMatrix, fp, alphaTexture, &grPaint)) {
+ if (!SkPaintToGrPaintWithTexture(fContext, paint, viewMatrix, fp, producer->isAlphaOnly(),
+ &grPaint)) {
return;
}
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698