Index: src/gpu/SkGpuDevice.cpp |
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp |
index bba352569abe80026824e8c0d4435ba2b0c16e1b..63c152144a242ec8b141ae5ce3a2f76f48a0091e 100644 |
--- a/src/gpu/SkGpuDevice.cpp |
+++ b/src/gpu/SkGpuDevice.cpp |
@@ -1065,9 +1065,13 @@ void SkGpuDevice::drawBitmapCommon(const SkDraw& draw, |
srcRect = *srcRectPtr; |
dstSize = *dstSizePtr; |
} |
- GrTexture* tex = bitmap.getTexture(); |
- int width = tex ? tex->width() : bitmap.width(); |
- int height = tex ? tex->height() : bitmap.height(); |
+ |
robertphillips
2015/09/16 16:23:27
It seems like this should be:
// Does 'srcRect' c
reed1
2015/09/16 17:03:31
Done.
|
+ int width, height; |
+ { |
+ GrTexture* tex = bitmap.getTexture(); |
+ width = tex ? tex->width() : bitmap.width(); |
+ height = tex ? tex->height() : bitmap.height(); |
+ } |
if (srcRect.fLeft <= 0 && srcRect.fTop <= 0 && |
srcRect.fRight >= width && srcRect.fBottom >= height) { |
constraint = SkCanvas::kFast_SrcRectConstraint; |