Index: src/gpu/GrAtlas.cpp |
diff --git a/src/gpu/GrAtlas.cpp b/src/gpu/GrAtlas.cpp |
index e75f859fec5e3bea4e3498101593cd32a7004a88..0491eeda02ecfe1870199327634630080122dde7 100644 |
--- a/src/gpu/GrAtlas.cpp |
+++ b/src/gpu/GrAtlas.cpp |
@@ -216,7 +216,8 @@ GrPlot* GrAtlas::addToAtlas(ClientPlotUsage* usage, |
// last one was most recently added and probably most empty |
for (int i = usage->fPlots.count()-1; i >= 0; --i) { |
GrPlot* plot = usage->fPlots[i]; |
- if (plot->addSubImage(width, height, image, loc)) { |
+ // client may have plots from more than one atlas, must check for ours before adding |
+ if (this == plot->fAtlas && plot->addSubImage(width, height, image, loc)) { |
this->makeMRU(plot); |
return plot; |
} |