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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 1261643004: Some cleanup in GrTextureProvider and GrResourceProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@pathargs
Patch Set: fix Created 5 years, 5 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
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 867c2edac8519d51eb88368b4ad9b6b7a9d5e861..4a835bb18de72b89172026fca9de278f06bec310 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);
« src/gpu/GrTextureProvider.cpp ('K') | « src/gpu/GrVertexBuffer.h ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698