aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGpuDevice.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-07-31 13:59:30 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-31 13:59:31 -0700
commiteae6200acbec2255ac00ab363ffbe16758ec9076 (patch)
treea37be1fb02820c40d0ad99366b557997d6b78831 /src/gpu/SkGpuDevice.cpp
parent77d89f7dd243a17452d3a5f16a98622993e6bdd9 (diff)
Some cleanup in GrTextureProvider and GrResourceProvider.
Diffstat (limited to 'src/gpu/SkGpuDevice.cpp')
-rw-r--r--src/gpu/SkGpuDevice.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 867c2edac8..4a835bb18d 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1806,10 +1806,11 @@ SkBaseDevice* SkGpuDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint
// layers are never draw in repeat modes, so we can request an approx
// match and ignore any padding.
- const GrTextureProvider::ScratchTexMatch match = (kNever_TileUsage == cinfo.fTileUsage) ?
- GrTextureProvider::kApprox_ScratchTexMatch :
- GrTextureProvider::kExact_ScratchTexMatch;
- texture.reset(fContext->textureProvider()->refScratchTexture(desc, match));
+ if (kNever_TileUsage == cinfo.fTileUsage) {
+ texture.reset(fContext->textureProvider()->createApproxTexture(desc));
+ } else {
+ texture.reset(fContext->textureProvider()->createTexture(desc, true));
+ }
if (texture) {
SkSurfaceProps props(this->surfaceProps().flags(), cinfo.fPixelGeometry);