diff options
author | Jim Van Verth <jvanverth@google.com> | 2017-09-15 12:14:26 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-15 16:34:34 +0000 |
commit | 03168b8a62a0d3d14b7a0d14642df4d82203b87c (patch) | |
tree | 011df89efc1f6416ec08f6b1d6de173ff3000b1b /src/gpu/effects/GrBitmapTextGeoProc.cpp | |
parent | a4083c97d48e8a4f88e2797d7363f141e3d42553 (diff) |
Allow GrDrawOpAtlas to grow as needed
Bug: skia:3550
Change-Id: Ib5312c8c06ba8549d90545658df6686c45058255
Reviewed-on: https://skia-review.googlesource.com/45841
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/effects/GrBitmapTextGeoProc.cpp')
-rw-r--r-- | src/gpu/effects/GrBitmapTextGeoProc.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp index 2d665c50cb..4df5cdf4a4 100644 --- a/src/gpu/effects/GrBitmapTextGeoProc.cpp +++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp @@ -149,6 +149,17 @@ GrBitmapTextGeoProc::GrBitmapTextGeoProc(GrColor color, } } +void GrBitmapTextGeoProc::resetProxies(const sk_sp<GrTextureProxy> proxies[kMaxTextures], + const GrSamplerState& params) { + this->resetTextureSamplers(); + for (int i = 0; i < kMaxTextures; ++i) { + if (proxies[i]) { + 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); |