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

Unified Diff: src/gpu/GrAtlas.cpp

Issue 636183005: Fix color emoji. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Check for atlas ownership when searching ClientPlotUsage. Created 6 years, 2 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
« no previous file with comments | « include/gpu/GrGlyph.h ('k') | src/gpu/GrBitmapTextContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « include/gpu/GrGlyph.h ('k') | src/gpu/GrBitmapTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698