Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 1426253002: Add bleed GM variants for bmp backed by an oversized texture (Closed) Base URL: https://skia.googlesource.com/skia.git@maxtile
Patch Set: fix no gpu build? Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/bleed.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « gm/bleed.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698