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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 1418473004: Allow max tile size to be overridden separately from max texture size. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix comment spelling 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 | « src/gpu/GrCaps.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 cdbda58e62ad845dbefbf2a7d794dc0cbebdce40..725c26b248a2f3c235ba270275f52669feeffc4c 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -827,7 +827,7 @@ bool SkGpuDevice::shouldTileImage(const SkImage* image, const SkRect* srcRectPtr
}
params.setFilterMode(textureFilterMode);
- int maxTileSize = fContext->caps()->maxTextureSize() - 2 * tileFilterPad;
+ int maxTileSize = fContext->caps()->maxTileSize() - 2 * tileFilterPad;
// these are output, which we safely ignore, as we just want to know the predicate
int outTileSize;
@@ -1071,11 +1071,11 @@ void SkGpuDevice::drawBitmapCommon(const SkDraw& draw,
// FIXME: the tiled bitmap code path doesn't currently support
// anti-aliased edges, we work around that for now by drawing directly
// if the image size exceeds maximum texture size.
- int maxTextureSize = fContext->caps()->maxTextureSize();
+ int maxTileSize = fContext->caps()->maxTileSize();
bool drawAA = !fRenderTarget->isUnifiedMultisampled() &&
paint.isAntiAlias() &&
- bitmap.width() <= maxTextureSize &&
- bitmap.height() <= maxTextureSize;
+ bitmap.width() <= maxTileSize &&
+ bitmap.height() <= maxTileSize;
if (paint.getMaskFilter() || drawAA) {
// Convert the bitmap to a shader so that the rect can be drawn
@@ -1150,7 +1150,7 @@ void SkGpuDevice::drawBitmapCommon(const SkDraw& draw,
}
params.setFilterMode(textureFilterMode);
- int maxTileSize = fContext->caps()->maxTextureSize() - 2 * tileFilterPad;
+ maxTileSize = fContext->caps()->maxTileSize() - 2 * tileFilterPad;
int tileSize;
SkIRect clippedSrcRect;
@@ -1279,8 +1279,8 @@ void SkGpuDevice::internalDrawBitmap(const SkBitmap& bitmap,
SkCanvas::SrcRectConstraint constraint,
bool bicubic,
bool needsTextureDomain) {
- SkASSERT(bitmap.width() <= fContext->caps()->maxTextureSize() &&
- bitmap.height() <= fContext->caps()->maxTextureSize());
+ SkASSERT(bitmap.width() <= fContext->caps()->maxTileSize() &&
+ bitmap.height() <= fContext->caps()->maxTileSize());
GrTexture* texture;
AutoBitmapTexture abt(fContext, bitmap, params, &texture);
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698