From c4f30b1074e1068d6fc0f368428f410ed6d4b2b5 Mon Sep 17 00:00:00 2001 From: robertphillips Date: Sun, 13 Jul 2014 10:09:42 -0700 Subject: [PATCH] Make GrAtlas::removePlot static This CL just calves off a small chunk of (Add atlased layer purging - https://codereview.chromium.org/367073002/). R=jvanverth@google.com TBR=jvanverth@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/388103002 --- src/gpu/GrAtlas.cpp | 2 +- src/gpu/GrAtlas.h | 2 +- src/gpu/GrTextStrike.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gpu/GrAtlas.cpp b/src/gpu/GrAtlas.cpp index 1bff42a..a9b8ae9 100644 --- a/src/gpu/GrAtlas.cpp +++ b/src/gpu/GrAtlas.cpp @@ -255,7 +255,7 @@ GrPlot* GrAtlas::addToAtlas(ClientPlotUsage* usage, return NULL; } -void GrAtlas::removePlot(ClientPlotUsage* usage, const GrPlot* plot) { +void GrAtlas::RemovePlot(ClientPlotUsage* usage, const GrPlot* plot) { int index = usage->fPlots.find(const_cast(plot)); if (index >= 0) { usage->fPlots.remove(index); diff --git a/src/gpu/GrAtlas.h b/src/gpu/GrAtlas.h index d63c8b9..f990408 100644 --- a/src/gpu/GrAtlas.h +++ b/src/gpu/GrAtlas.h @@ -94,7 +94,7 @@ public: GrPlot* addToAtlas(ClientPlotUsage*, int width, int height, const void* image, SkIPoint16* loc); // remove reference to this plot - void removePlot(ClientPlotUsage* usage, const GrPlot* plot); + static void RemovePlot(ClientPlotUsage* usage, const GrPlot* plot); // get a plot that's not being used by the current draw // this allows us to overwrite this plot without flushing diff --git a/src/gpu/GrTextStrike.cpp b/src/gpu/GrTextStrike.cpp index b290d6c..4079893 100644 --- a/src/gpu/GrTextStrike.cpp +++ b/src/gpu/GrTextStrike.cpp @@ -278,7 +278,7 @@ void GrTextStrike::removePlot(const GrPlot* plot) { } } - fAtlas->removePlot(&fPlotUsage, plot); + GrAtlas::RemovePlot(&fPlotUsage, plot); } -- 2.7.4