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

Unified Diff: src/gpu/GrResourceProvider.cpp

Issue 1412663011: Fix for atlas doesn't call eviction functions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrResourceProvider.cpp
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp
index bd9cc9ac6b04d1845098b63f261c22b6c4e7919c..5fa4e4beacb4f2eac2715463d5d4de1f87b1560c 100644
--- a/src/gpu/GrResourceProvider.cpp
+++ b/src/gpu/GrResourceProvider.cpp
@@ -164,7 +164,9 @@ GrBatchAtlas* GrResourceProvider::createAtlas(GrPixelConfig config,
if (!texture) {
return nullptr;
}
- return new GrBatchAtlas(texture, numPlotsX, numPlotsY);
+ GrBatchAtlas* atlas = new GrBatchAtlas(texture, numPlotsX, numPlotsY);
+ atlas->registerEvictionCallback(func, data);
+ return atlas;
}
GrStencilAttachment* GrResourceProvider::attachStencilAttachment(GrRenderTarget* rt) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698