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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 1149773005: Add direct getter for GrCaps to GrContext. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: init caps in the right place Created 5 years, 7 months 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/GrSWMaskHelper.cpp ('k') | src/gpu/SkGr.cpp » ('j') | 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 0008540cb57defbc420f583e1f26383b43fc3581..b941865e226c71fb5a2eb66a7fb24f2ab1e125da 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, &params, &texture);
« no previous file with comments | « src/gpu/GrSWMaskHelper.cpp ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698