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

Unified Diff: src/gpu/GrSWMaskHelper.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/GrPathRendererChain.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrSWMaskHelper.cpp
diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp
index c978866c3fdeea5cd1ac0208e2b1e51a12daaba6..cc5fb0065341a151f570cf7a803ed46c84cfb56c 100644
--- a/src/gpu/GrSWMaskHelper.cpp
+++ b/src/gpu/GrSWMaskHelper.cpp
@@ -174,8 +174,8 @@ bool GrSWMaskHelper::init(const SkIRect& resultBounds,
resultBounds.height());
if (allowCompression &&
- fContext->getGpu()->caps()->drawPathMasksToCompressedTexturesSupport() &&
- choose_compressed_fmt(fContext->getGpu()->caps(), &fCompressedFormat)) {
+ fContext->caps()->drawPathMasksToCompressedTexturesSupport() &&
+ choose_compressed_fmt(fContext->caps(), &fCompressedFormat)) {
fCompressionMode = kCompress_CompressionMode;
}
@@ -245,7 +245,7 @@ GrTexture* GrSWMaskHelper::createTexture() {
#endif
desc.fConfig = fmt_to_config(fCompressedFormat);
- SkASSERT(fContext->getGpu()->caps()->isConfigTexturable(desc.fConfig));
+ SkASSERT(fContext->caps()->isConfigTexturable(desc.fConfig));
}
return fContext->textureProvider()->refScratchTexture(
@@ -256,7 +256,7 @@ void GrSWMaskHelper::sendTextureData(GrTexture *texture, const GrSurfaceDesc& de
const void *data, size_t rowbytes) {
// If we aren't reusing scratch textures we don't need to flush before
// writing since no one else will be using 'texture'
- bool reuseScratch = fContext->getGpu()->caps()->reuseScratchTextures();
+ bool reuseScratch = fContext->caps()->reuseScratchTextures();
// Since we're uploading to it, and it's compressed, 'texture' shouldn't
// have a render target.
« no previous file with comments | « src/gpu/GrPathRendererChain.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698