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

Unified Diff: src/gpu/GrBatchFontCache.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/GrBatchFontCache.cpp
diff --git a/src/gpu/GrBatchFontCache.cpp b/src/gpu/GrBatchFontCache.cpp
index 64d6bb1a1c8cf069bd4bfff79c6232dd8c09316e..b85c5bd59569bf91cacb673caa768a413fb9c02f 100644
--- a/src/gpu/GrBatchFontCache.cpp
+++ b/src/gpu/GrBatchFontCache.cpp
@@ -10,6 +10,7 @@
#include "GrFontAtlasSizes.h"
#include "GrGpu.h"
#include "GrRectanizer.h"
+#include "GrResourceProvider.h"
#include "GrSurfacePriv.h"
#include "SkString.h"
@@ -28,8 +29,9 @@ static GrBatchAtlas* make_atlas(GrContext* context, GrPixelConfig config,
// We don't want to flush the context so we claim we're in the middle of flushing so as to
// guarantee we do not recieve a texture with pending IO
- GrTexture* texture = context->textureProvider()->refScratchTexture(
- desc, GrTextureProvider::kApprox_ScratchTexMatch, true);
+ // TODO: Determine how to avoid having to do this. (http://skbug.com/4156)
+ static const uint32_t kFlags = GrResourceProvider::kNoPendingIO_Flag;
+ GrTexture* texture = context->resourceProvider()->createApproxTexture(desc, kFlags);
if (!texture) {
return NULL;
}

Powered by Google App Engine
This is Rietveld 408576698