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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 22209002: Added ctm matrix to GPU path (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Removed dummy matrix Created 7 years, 4 months 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/effects/SkXfermodeImageFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 61de9822f48ed44770b86534ae0da1906ca270a7..be56eb67dcd7eb0d877883142441dddfdee6e5c4 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1372,7 +1372,8 @@ void SkGpuDevice::internalDrawBitmap(const SkBitmap& bitmap,
static bool filter_texture(SkDevice* device, GrContext* context,
GrTexture* texture, SkImageFilter* filter,
- int w, int h, SkBitmap* result, SkIPoint* offset) {
+ int w, int h, const SkMatrix& ctm, SkBitmap* result,
+ SkIPoint* offset) {
GrAssert(filter);
SkDeviceImageFilterProxy proxy(device);
@@ -1380,7 +1381,7 @@ static bool filter_texture(SkDevice* device, GrContext* context,
// 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);
- return filter->filterImageGPU(&proxy, wrap_texture(texture), result, offset);
+ return filter->filterImageGPU(&proxy, wrap_texture(texture), ctm, result, offset);
} else {
return false;
}
@@ -1409,7 +1410,8 @@ void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap,
SkBitmap filteredBitmap;
if (NULL != filter) {
- if (filter_texture(this, fContext, texture, filter, w, h, &filteredBitmap, &offset)) {
+ if (filter_texture(this, fContext, texture, filter, w, h, SkMatrix::I(), &filteredBitmap,
+ &offset)) {
texture = (GrTexture*) filteredBitmap.getTexture();
w = filteredBitmap.width();
h = filteredBitmap.height();
@@ -1494,7 +1496,8 @@ void SkGpuDevice::drawDevice(const SkDraw& draw, SkDevice* device,
if (NULL != filter) {
SkIPoint offset = SkIPoint::Make(0, 0);
- if (filter_texture(this, fContext, devTex, filter, w, h, &filteredBitmap, &offset)) {
+ if (filter_texture(this, fContext, devTex, filter, w, h, SkMatrix::I(), &filteredBitmap,
+ &offset)) {
devTex = filteredBitmap.getTexture();
w = filteredBitmap.width();
h = filteredBitmap.height();
@@ -1547,7 +1550,8 @@ bool SkGpuDevice::filterImage(SkImageFilter* filter, const SkBitmap& src,
// must be pushed upstack.
SkAutoCachedTexture act(this, src, NULL, &texture);
- return filter_texture(this, fContext, texture, filter, src.width(), src.height(), result, offset);
+ return filter_texture(this, fContext, texture, filter, src.width(), src.height(), ctm, result,
+ offset);
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/effects/SkXfermodeImageFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698