Respect strict constraint in drawEdgeAAImageSet

Bug: skia:
Change-Id: I840a4d12e9b7b09b64ef6c386714e813f75a86a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201613
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Michael Ludwig 2019-03-19 13:35:31 -04:00 committed by Skia Commit-Bot
parent 78e6a4c1ff
commit 4da3f3d5bd

View File

@ -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) {