Index: src/gpu/SkGpuDevice.cpp |
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp |
index 725c26b248a2f3c235ba270275f52669feeffc4c..21b2b725401da42f674b3a1d3b370109bf87fa07 100644 |
--- a/src/gpu/SkGpuDevice.cpp |
+++ b/src/gpu/SkGpuDevice.cpp |
@@ -1279,8 +1279,14 @@ void SkGpuDevice::internalDrawBitmap(const SkBitmap& bitmap, |
SkCanvas::SrcRectConstraint constraint, |
bool bicubic, |
bool needsTextureDomain) { |
- SkASSERT(bitmap.width() <= fContext->caps()->maxTileSize() && |
- bitmap.height() <= fContext->caps()->maxTileSize()); |
+ // We should have already handled bitmaps larger than the max texture size. |
+ SkASSERT(bitmap.width() <= fContext->caps()->maxTextureSize() && |
+ bitmap.height() <= fContext->caps()->maxTextureSize()); |
+ // Unless the bitmap is inherently texture-backed, we should be respecting the max tile size |
+ // by the time we get here. |
+ SkASSERT(bitmap.getTexture() || |
+ (bitmap.width() <= fContext->caps()->maxTileSize() && |
+ bitmap.height() <= fContext->caps()->maxTileSize())); |
GrTexture* texture; |
AutoBitmapTexture abt(fContext, bitmap, params, &texture); |