Index: src/gpu/GrLayerHoister.cpp |
diff --git a/src/gpu/GrLayerHoister.cpp b/src/gpu/GrLayerHoister.cpp |
index ab27f08493ecc261770b85947ab9464282bcbff2..7d6f5ab1b3879b4f1648d459ec6bc3111405622c 100644 |
--- a/src/gpu/GrLayerHoister.cpp |
+++ b/src/gpu/GrLayerHoister.cpp |
@@ -82,8 +82,7 @@ static void prepare_for_hoisting(GrLayerCache* layerCache, |
hl->fPreMat.preConcat(info.fPreMat); |
} |
-// Compute the source rect if possible and return false if further processing |
-// on the layer should be abandoned based on its source rect. |
+// Compute the source rect and return false if it is empty. |
static bool compute_source_rect(const SkLayerInfo::BlockInfo& info, const SkMatrix& initialMat, |
const SkIRect& dstIR, SkIRect* srcIR) { |
SkIRect clipBounds = dstIR; |
@@ -109,10 +108,6 @@ static bool compute_source_rect(const SkLayerInfo::BlockInfo& info, const SkMatr |
*srcIR = clipBounds; |
} |
- if (!GrLayerCache::PlausiblyAtlasable(srcIR->width(), srcIR->height())) { |
- return false; |
- } |
- |
return true; |
} |
@@ -170,7 +165,8 @@ void GrLayerHoister::FindLayersToAtlas(GrContext* context, |
SkIRect srcIR; |
- if (!compute_source_rect(info, initialMat, dstIR, &srcIR)) { |
+ if (!compute_source_rect(info, initialMat, dstIR, &srcIR) || |
+ !GrLayerCache::PlausiblyAtlasable(srcIR.width(), srcIR.height())) { |
continue; |
} |