aboutsummaryrefslogtreecommitdiff
path: root/src/gpu/GrDrawOpAtlas.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrDrawOpAtlas.h')
-rw-r--r--src/gpu/GrDrawOpAtlas.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gpu/GrDrawOpAtlas.h b/src/gpu/GrDrawOpAtlas.h
index b849d9e067..4178f478a6 100644
--- a/src/gpu/GrDrawOpAtlas.h
+++ b/src/gpu/GrDrawOpAtlas.h
@@ -162,12 +162,14 @@ public:
memcpy(fPlotAlreadyUpdated, that.fPlotAlreadyUpdated, sizeof(fPlotAlreadyUpdated));
}
- void add(AtlasID id) {
+ bool add(AtlasID id) {
int index = GrDrawOpAtlas::GetPlotIndexFromID(id);
int pageIdx = GrDrawOpAtlas::GetPageIndexFromID(id);
- if (!this->find(pageIdx, index)) {
- this->set(pageIdx, index);
+ if (this->find(pageIdx, index)) {
+ return false;
}
+ this->set(pageIdx, index);
+ return true;
}
void reset() {