From 762286309545c8a1e4bbc05dcd1fe3085d2a1f47 Mon Sep 17 00:00:00 2001 From: bsalomon Date: Fri, 29 May 2015 08:02:10 -0700 Subject: Add direct getter for GrCaps to GrContext. TBR=joshualitt@google.com Committed: https://skia.googlesource.com/skia/+/9138c46e572085870638b6f7ad7fcdfcdf3cac99 Review URL: https://codereview.chromium.org/1149773005 --- src/gpu/SkGpuDevice.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gpu/SkGpuDevice.cpp') diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 90e53a0b10..beed2fab28 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -910,7 +910,7 @@ 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->getMaxTextureSize(); + int maxTextureSize = fContext->caps()->maxTextureSize(); bool directDraw = fRenderTarget->isMultisampled() || !paint.isAntiAlias() || bitmap.width() > maxTextureSize || @@ -1034,7 +1034,7 @@ void SkGpuDevice::drawBitmapCommon(const SkDraw& draw, } params.setFilterMode(textureFilterMode); - int maxTileSize = fContext->getMaxTextureSize() - 2 * tileFilterPad; + int maxTileSize = fContext->caps()->maxTextureSize() - 2 * tileFilterPad; int tileSize; SkIRect clippedSrcRect; @@ -1163,8 +1163,8 @@ void SkGpuDevice::internalDrawBitmap(const SkBitmap& bitmap, SkCanvas::DrawBitmapRectFlags flags, bool bicubic, bool needsTextureDomain) { - SkASSERT(bitmap.width() <= fContext->getMaxTextureSize() && - bitmap.height() <= fContext->getMaxTextureSize()); + SkASSERT(bitmap.width() <= fContext->caps()->maxTextureSize() && + bitmap.height() <= fContext->caps()->maxTextureSize()); GrTexture* texture; AutoBitmapTexture abt(fContext, bitmap, ¶ms, &texture); -- cgit v1.2.3