aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMatrixImageFilter.cpp
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-09-23 08:49:50 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-23 08:49:51 -0700
commita76554d2ae7f676776c1d472aa433b048f418ea9 (patch)
tree9c035426cb129653838b72242387c2de9fdf5634 /src/core/SkMatrixImageFilter.cpp
parent1cd88c4b759b3c5cbf663c55d1f1c30a4114ded9 (diff)
Revert of Create special surfaces according to original device (not always in N32) (patchset #9 id:160001 of https://codereview.chromium.org/2349373004/ )
Reason for revert: DM crash and/or TSAN failure Original issue's description: > Change SkSpecialImage::makeSurface and makeTightSurface to take output > properties (color space), bounds, and (optional) alphaType. > > We were being pretty inconsistent before. Raster was honoring all > components of the info. GPU was using the supplied color type, but > propagating the source's color space. All call sites were saying N32. > > What we want to do is propagate the original device's color space, and > pick a good format from that. Rather than force all the clients to > jump through hoops constructing an SkImageInfo that meets our criteria, > just have them supply the few bits we care about, and do everything else > internally. > > This also lets us always use RGBA on GPU, but N32 on raster. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2349373004 > > Committed: https://skia.googlesource.com/skia/+/53c38087949252d27cde668368a3eeb59cc2eb00 TBR=robertphillips@google.com,reed@google.com,bsalomon@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2366723004
Diffstat (limited to 'src/core/SkMatrixImageFilter.cpp')
-rw-r--r--src/core/SkMatrixImageFilter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/SkMatrixImageFilter.cpp b/src/core/SkMatrixImageFilter.cpp
index 12efc64683..2e827d82a6 100644
--- a/src/core/SkMatrixImageFilter.cpp
+++ b/src/core/SkMatrixImageFilter.cpp
@@ -70,7 +70,9 @@ sk_sp<SkSpecialImage> SkMatrixImageFilter::onFilterImage(SkSpecialImage* source,
SkIRect dstBounds;
dstRect.roundOut(&dstBounds);
- sk_sp<SkSpecialSurface> surf(input->makeSurface(ctx.outputProperties(), dstBounds.size()));
+ const SkImageInfo info = SkImageInfo::MakeN32Premul(dstBounds.width(), dstBounds.height());
+
+ sk_sp<SkSpecialSurface> surf(input->makeSurface(info));
if (!surf) {
return nullptr;
}