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

Unified Diff: src/image/SkImage_Gpu.cpp

Issue 1421493003: tunnel down texture-size-constraint to imagefilters (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix formating Created 5 years, 2 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/image/SkImage.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Gpu.cpp
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index b1f78513ecfe394e1f1a1d6ba5e241add7426836..e5f3aeea25bd33ea29863618ef4e601e9e4823a7 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -24,7 +24,10 @@ SkImage_Gpu::SkImage_Gpu(int w, int h, uint32_t uniqueID, SkAlphaType at, GrText
, fAlphaType(at)
, fBudgeted(budgeted)
, fAddedRasterVersionToCache(false)
- {}
+{
+ SkASSERT(tex->width() == w);
+ SkASSERT(tex->height() == h);
+}
SkImage_Gpu::~SkImage_Gpu() {
if (fAddedRasterVersionToCache.load()) {
@@ -236,7 +239,7 @@ SkImage* SkImage_Gpu::onApplyFilter(SkImageFilter* filter, SkIPoint* offsetResul
const SkIRect clipBounds = srcBounds;
SkGpuImageFilterProxy proxy(fTexture->getContext());
SkAutoTUnref<SkImageFilter::Cache> cache(SkGpuDevice::NewImageFilterCache());
- SkImageFilter::Context ctx(SkMatrix::I(), clipBounds, cache);
+ SkImageFilter::Context ctx(SkMatrix::I(), clipBounds, cache, SkImageFilter::kExact_SizeConstraint);
SkBitmap dst;
if (!filter->filterImage(&proxy, src, ctx, &dst, offsetResult)) {
« no previous file with comments | « src/image/SkImage.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698