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

Unified Diff: src/gpu/GrAADistanceFieldPathRenderer.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/GrAADistanceFieldPathRenderer.cpp
diff --git a/src/gpu/GrAADistanceFieldPathRenderer.cpp b/src/gpu/GrAADistanceFieldPathRenderer.cpp
index 960d7b4222be0c8d5a3f13f468acca3cb4b11dc1..086db5dd851c688a377e76bc484341bac42c1af7 100755
--- a/src/gpu/GrAADistanceFieldPathRenderer.cpp
+++ b/src/gpu/GrAADistanceFieldPathRenderer.cpp
@@ -529,7 +529,8 @@ private:
PathDataList* fPathList;
};
-static GrBatchAtlas* create_atlas(GrTextureProvider* provider, GrBatchAtlas::EvictionFunc func, void* data) {
+static GrBatchAtlas* create_atlas(GrResourceProvider* provider, GrBatchAtlas::EvictionFunc func,
+ void* data) {
GrBatchAtlas* atlas;
// Create a new atlas
GrSurfaceDesc desc;
@@ -540,8 +541,9 @@ static GrBatchAtlas* create_atlas(GrTextureProvider* provider, GrBatchAtlas::Evi
// 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 = provider->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 = provider->createApproxTexture(desc, kFlags);
if (texture) {
atlas = SkNEW_ARGS(GrBatchAtlas, (texture, NUM_PLOTS_X, NUM_PLOTS_Y));
} else {

Powered by Google App Engine
This is Rietveld 408576698