From 4da3f3d5bd2c7878f60a3295d7ca56e37acfb093 Mon Sep 17 00:00:00 2001 From: Michael Ludwig Date: Tue, 19 Mar 2019 13:35:31 -0400 Subject: [PATCH] Respect strict constraint in drawEdgeAAImageSet Bug: skia: Change-Id: I840a4d12e9b7b09b64ef6c386714e813f75a86a7 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201613 Commit-Queue: Michael Ludwig Commit-Queue: Brian Salomon Auto-Submit: Michael Ludwig Reviewed-by: Brian Salomon --- src/gpu/SkGpuDevice_drawTexture.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gpu/SkGpuDevice_drawTexture.cpp b/src/gpu/SkGpuDevice_drawTexture.cpp index 4fd0d00925..fa933a406a 100644 --- a/src/gpu/SkGpuDevice_drawTexture.cpp +++ b/src/gpu/SkGpuDevice_drawTexture.cpp @@ -458,8 +458,10 @@ void SkGpuDevice::drawEdgeAAImageSet(const SkCanvas::ImageSetEntry set[], int co const SkPoint dstClips[], const SkMatrix preViewMatrices[], const SkPaint& paint, SkCanvas::SrcRectConstraint constraint) { SkASSERT(count > 0); - - if (!can_use_draw_texture(paint)) { + // FIXME (michaelludwig) - If strict is truly important for SkiaRenderer, we can make + // GrRTC::drawTextureSet support taking the constraint, or adding constraint to each entry. + // For now, at least respect the constraint argument instead of silently downgrading to fast. + if (constraint == SkCanvas::kStrict_SrcRectConstraint || !can_use_draw_texture(paint)) { // Send every entry through drawImageQuad() to handle the more complicated paint int dstClipIndex = 0; for (int i = 0; i < count; ++i) {