Revert "Revert "Allow GrDrawOpAtlas to grow as needed""
Bug: skia:3550
Change-Id: I11a3b39ed7470542447f0e46141a26eef7a9bdaf
Reviewed-on: https://skia-review.googlesource.com/47240
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp
index 2d665c5..b10bdb1 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.cpp
+++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp
@@ -149,6 +149,16 @@
}
}
+void GrBitmapTextGeoProc::addNewProxies(const sk_sp<GrTextureProxy> proxies[kMaxTextures],
+ const GrSamplerState& params) {
+ for (int i = 0; i < kMaxTextures; ++i) {
+ if (proxies[i] && !fTextureSamplers[i].isInitialized()) {
+ fTextureSamplers[i].reset(std::move(proxies[i]), params);
+ this->addTextureSampler(&fTextureSamplers[i]);
+ }
+ }
+}
+
void GrBitmapTextGeoProc::getGLSLProcessorKey(const GrShaderCaps& caps,
GrProcessorKeyBuilder* b) const {
GrGLBitmapTextGeoProc::GenKey(*this, caps, b);