diff options
author | 2017-03-01 14:32:46 -0500 | |
---|---|---|
committer | 2017-03-02 12:29:16 +0000 | |
commit | 256c37bc9ea2a0420b8ac1084f6d645aaeb919f0 (patch) | |
tree | 27c6ec1766362477c7d50292c6cbc1f54757bdb9 /src | |
parent | 9c10df3b60f4a7d50c1070a5d8c4aaadb79ba9b7 (diff) |
Remove atlas creation from GrResourceProvider
This is pulled out of: https://skia-review.googlesource.com/c/6680/ (Make SkImage_Gpu be deferred) and is only tangentially related to the goal of that CL.
Change-Id: I6b6db4869597070f85ab3b9fea178fc88c104f87
Reviewed-on: https://skia-review.googlesource.com/9106
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkSpecialImage.cpp | 4 | ||||
-rw-r--r-- | src/gpu/GrBitmapTextureMaker.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrClipStackClip.cpp | 4 | ||||
-rw-r--r-- | src/gpu/GrDrawOpAtlas.cpp | 82 | ||||
-rw-r--r-- | src/gpu/GrDrawOpAtlas.h | 25 | ||||
-rw-r--r-- | src/gpu/GrPathRenderer.h | 12 | ||||
-rw-r--r-- | src/gpu/GrReducedClip.cpp | 6 | ||||
-rw-r--r-- | src/gpu/GrRenderTargetContext.cpp | 4 | ||||
-rw-r--r-- | src/gpu/GrResourceProvider.cpp | 36 | ||||
-rw-r--r-- | src/gpu/GrResourceProvider.h | 20 | ||||
-rw-r--r-- | src/gpu/GrSoftwarePathRenderer.cpp | 2 | ||||
-rw-r--r-- | src/gpu/ops/GrAADistanceFieldPathRenderer.cpp | 23 | ||||
-rw-r--r-- | src/gpu/text/GrAtlasGlyphCache.cpp | 2 |
13 files changed, 116 insertions, 106 deletions
diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp index c523ae833f..ad5ef4d869 100644 --- a/src/core/SkSpecialImage.cpp +++ b/src/core/SkSpecialImage.cpp @@ -196,7 +196,7 @@ sk_sp<SkSpecialImage> SkSpecialImage::MakeFromImage(const SkIRect& subset, GrContext* context = ((SkImage_Gpu*) as_IB(image))->context(); return MakeDeferredFromGpu(context, subset, image->uniqueID(), std::move(proxy), - sk_ref_sp(as_IB(image)->onImageInfo().colorSpace()), props); + as_IB(image)->onImageInfo().refColorSpace(), props); } else #endif { @@ -479,7 +479,7 @@ public: if (subset) { // TODO: if this becomes a bottle neck we could base this logic on what the size // will be when it is finally instantiated - but that is more fraught. - if (//fSurfaceProxy->priv().isExact() && + if (fTextureProxy->priv().isExact() && 0 == subset->fLeft && 0 == subset->fTop && fTextureProxy->width() == subset->width() && fTextureProxy->height() == subset->height()) { diff --git a/src/gpu/GrBitmapTextureMaker.cpp b/src/gpu/GrBitmapTextureMaker.cpp index 184640f3b1..e4ea772cc5 100644 --- a/src/gpu/GrBitmapTextureMaker.cpp +++ b/src/gpu/GrBitmapTextureMaker.cpp @@ -67,5 +67,5 @@ SkAlphaType GrBitmapTextureMaker::alphaType() const { sk_sp<SkColorSpace> GrBitmapTextureMaker::getColorSpace(SkColorSpace* dstColorSpace) { // Color space doesn't depend on destination color space - it's just whatever is in the bitmap - return sk_ref_sp(fBitmap.colorSpace()); + return fBitmap.refColorSpace(); } diff --git a/src/gpu/GrClipStackClip.cpp b/src/gpu/GrClipStackClip.cpp index 375ee8ba13..0b3089bd2e 100644 --- a/src/gpu/GrClipStackClip.cpp +++ b/src/gpu/GrClipStackClip.cpp @@ -413,11 +413,11 @@ static void add_invalidate_on_pop_message(const SkClipStack& stack, int32_t clip // MDB TODO (caching): this side-steps the issue of texture proxies cached by unique ID sk_sp<GrTextureProxy> GrClipStackClip::createAlphaClipMask(GrContext* context, const GrReducedClip& reducedClip) const { - GrResourceProvider* resourceProvider = context->resourceProvider(); + GrTextureProvider* texProvider = context->textureProvider(); GrUniqueKey key; create_clip_mask_key(reducedClip.elementsGenID(), reducedClip.ibounds(), &key); - sk_sp<GrTexture> texture(resourceProvider->findAndRefTextureByUniqueKey(key)); + sk_sp<GrTexture> texture(texProvider->findAndRefTextureByUniqueKey(key)); if (texture) { return GrSurfaceProxy::MakeWrapped(std::move(texture)); } diff --git a/src/gpu/GrDrawOpAtlas.cpp b/src/gpu/GrDrawOpAtlas.cpp index 6661b4855c..e9fd356ca3 100644 --- a/src/gpu/GrDrawOpAtlas.cpp +++ b/src/gpu/GrDrawOpAtlas.cpp @@ -10,8 +10,46 @@ #include "GrContext.h" #include "GrOpFlushState.h" #include "GrRectanizer.h" +#include "GrResourceProvider.h" #include "GrTracing.h" +std::unique_ptr<GrDrawOpAtlas> GrDrawOpAtlas::Make(GrContext* ctx, GrPixelConfig config, + int width, int height, + int numPlotsX, int numPlotsY, + GrDrawOpAtlas::EvictionFunc func, + void* data) { + GrSurfaceDesc desc; + desc.fFlags = kNone_GrSurfaceFlags; + desc.fWidth = width; + desc.fHeight = height; + desc.fConfig = config; + + // We don't want to flush the context so we claim we're in the middle of flushing so as to + // guarantee we do not recieve a texture with pending IO + // TODO: Determine how to avoid having to do this. (https://bug.skia.org/4156) + static const uint32_t kFlags = GrResourceProvider::kNoPendingIO_Flag; + sk_sp<GrTexture> texture(ctx->textureProvider()->createApproxTexture(desc, kFlags)); + if (!texture) { + return nullptr; + } + + // MDB TODO: for now, wrap an instantiated texture. Having the deferred instantiation + // possess the correct properties (e.g., no pendingIO) should fall out of the system but + // should receive special attention. + // Note: When switching over to the deferred proxy, use the kExact flag to create + // the atlas and assert that the width & height are powers of 2. + sk_sp<GrTextureProxy> proxy = GrSurfaceProxy::MakeWrapped(std::move(texture)); + if (!proxy) { + return nullptr; + } + + std::unique_ptr<GrDrawOpAtlas> atlas( + new GrDrawOpAtlas(ctx, std::move(proxy), numPlotsX, numPlotsY)); + atlas->registerEvictionCallback(func, data); + return atlas; +} + + //////////////////////////////////////////////////////////////////////////////// GrDrawOpAtlas::Plot::Plot(int index, uint64_t genID, int offX, int offY, int width, int height, @@ -160,7 +198,7 @@ void GrDrawOpAtlas::processEviction(AtlasID id) { } } -inline void GrDrawOpAtlas::updatePlot(GrDrawOp::Target* target, AtlasID* id, Plot* plot) { +inline bool GrDrawOpAtlas::updatePlot(GrDrawOp::Target* target, AtlasID* id, Plot* plot) { this->makeMRU(plot); // If our most recent upload has already occurred then we have to insert a new @@ -169,19 +207,23 @@ inline void GrDrawOpAtlas::updatePlot(GrDrawOp::Target* target, AtlasID* id, Plo if (target->hasDrawBeenFlushed(plot->lastUploadToken())) { // With c+14 we could move sk_sp into lamba to only ref once. sk_sp<Plot> plotsp(SkRef(plot)); + // MDB TODO: this is currently fine since the atlas' proxy is always pre-instantiated. // Once it is deferred more care must be taken upon instantiation failure. GrTexture* texture = fProxy->instantiate(fContext->textureProvider()); - if (texture) { - GrDrawOpUploadToken lastUploadToken = target->addAsapUpload( - [plotsp, texture] (GrDrawOp::WritePixelsFn& writePixels) { - plotsp->uploadToTexture(writePixels, texture); - } - ); - plot->setLastUploadToken(lastUploadToken); + if (!texture) { + return false; } + + GrDrawOpUploadToken lastUploadToken = target->addAsapUpload( + [plotsp, texture] (GrDrawOp::WritePixelsFn& writePixels) { + plotsp->uploadToTexture(writePixels, texture); + } + ); + plot->setLastUploadToken(lastUploadToken); } *id = plot->id(); + return true; } bool GrDrawOpAtlas::addToAtlas(AtlasID* id, GrDrawOp::Target* target, int width, int height, @@ -199,8 +241,7 @@ bool GrDrawOpAtlas::addToAtlas(AtlasID* id, GrDrawOp::Target* target, int width, while ((plot = plotIter.get())) { SkASSERT(GrBytesPerPixel(fProxy->desc().fConfig) == plot->bpp()); if (plot->addSubImage(width, height, image, loc)) { - this->updatePlot(target, id, plot); - return true; + return this->updatePlot(target, id, plot); } plotIter.next(); } @@ -215,7 +256,10 @@ bool GrDrawOpAtlas::addToAtlas(AtlasID* id, GrDrawOp::Target* target, int width, SkASSERT(GrBytesPerPixel(fProxy->desc().fConfig) == plot->bpp()); SkDEBUGCODE(bool verify = )plot->addSubImage(width, height, image, loc); SkASSERT(verify); - this->updatePlot(target, id, plot); + if (!this->updatePlot(target, id, plot)) { + return false; + } + fAtlasGeneration++; return true; } @@ -246,15 +290,17 @@ bool GrDrawOpAtlas::addToAtlas(AtlasID* id, GrDrawOp::Target* target, int width, // MDB TODO: this is currently fine since the atlas' proxy is always pre-instantiated. // Once it is deferred more care must be taken upon instantiation failure. GrTexture* texture = fProxy->instantiate(fContext->textureProvider()); - if (texture) { - GrDrawOpUploadToken lastUploadToken = target->addInlineUpload( - [plotsp, texture] (GrDrawOp::WritePixelsFn& writePixels) { - plotsp->uploadToTexture(writePixels, texture); - } - ); - newPlot->setLastUploadToken(lastUploadToken); + if (!texture) { + return false; } + GrDrawOpUploadToken lastUploadToken = target->addInlineUpload( + [plotsp, texture] (GrDrawOp::WritePixelsFn& writePixels) { + plotsp->uploadToTexture(writePixels, texture); + } + ); + newPlot->setLastUploadToken(lastUploadToken); + *id = newPlot->id(); fAtlasGeneration++; diff --git a/src/gpu/GrDrawOpAtlas.h b/src/gpu/GrDrawOpAtlas.h index 917d4ecab6..c857d07703 100644 --- a/src/gpu/GrDrawOpAtlas.h +++ b/src/gpu/GrDrawOpAtlas.h @@ -55,7 +55,26 @@ public: */ typedef void (*EvictionFunc)(GrDrawOpAtlas::AtlasID, void*); - GrDrawOpAtlas(GrContext*, sk_sp<GrTextureProxy>, int numPlotsX, int numPlotsY); + /** + * Returns a GrDrawOpAtlas. This function can be called anywhere, but the returned atlas + * should only be used inside of GrMeshDrawOp::onPrepareDraws. + * @param GrPixelConfig The pixel config which this atlas will store + * @param width width in pixels of the atlas + * @param height height in pixels of the atlas + * @param numPlotsX The number of plots the atlas should be broken up into in the X + * direction + * @param numPlotsY The number of plots the atlas should be broken up into in the Y + * direction + * @param func An eviction function which will be called whenever the atlas has to + * evict data + * @param data User supplied data which will be passed into func whenver an + * eviction occurs + * @return An initialized GrDrawOpAtlas, or nullptr if creation fails + */ + static std::unique_ptr<GrDrawOpAtlas> Make(GrContext*, GrPixelConfig, + int width, int height, + int numPlotsX, int numPlotsY, + GrDrawOpAtlas::EvictionFunc func, void* data); /** * Adds a width x height subimage to the atlas. Upon success it returns an ID and the subimage's @@ -158,6 +177,8 @@ public: } private: + GrDrawOpAtlas(GrContext*, sk_sp<GrTextureProxy>, int numPlotsX, int numPlotsY); + /** * The backing GrTexture for a GrDrawOpAtlas is broken into a spatial grid of Plots. The Plots * keep track of subimage placement via their GrRectanizer. A Plot manages the lifetime of its @@ -253,7 +274,7 @@ private: return (id >> 16) & 0xffffffffffff; } - inline void updatePlot(GrDrawOp::Target*, AtlasID*, Plot*); + inline bool updatePlot(GrDrawOp::Target*, AtlasID*, Plot*); inline void makeMRU(Plot* plot) { if (fPlotList.head() == plot) { diff --git a/src/gpu/GrPathRenderer.h b/src/gpu/GrPathRenderer.h index f1164a9503..05673d5f86 100644 --- a/src/gpu/GrPathRenderer.h +++ b/src/gpu/GrPathRenderer.h @@ -124,7 +124,7 @@ public: * fGammaCorrect true if gamma-correct rendering is to be used. */ struct DrawPathArgs { - GrResourceProvider* fResourceProvider; + GrContext* fContext; GrPaint&& fPaint; const GrUserStencilSettings* fUserStencilSettings; GrRenderTargetContext* fRenderTargetContext; @@ -135,7 +135,7 @@ public: bool fGammaCorrect; #ifdef SK_DEBUG void validate() const { - SkASSERT(fResourceProvider); + SkASSERT(fContext); SkASSERT(fUserStencilSettings); SkASSERT(fRenderTargetContext); SkASSERT(fClip); @@ -153,7 +153,7 @@ public: SkDEBUGCODE(args.validate();) #ifdef SK_DEBUG CanDrawPathArgs canArgs; - canArgs.fShaderCaps = args.fResourceProvider->caps()->shaderCaps(); + canArgs.fShaderCaps = args.fContext->caps()->shaderCaps(); canArgs.fViewMatrix = args.fViewMatrix; canArgs.fShape = args.fShape; canArgs.fAAType = args.fAAType; @@ -183,7 +183,7 @@ public: * fAAType The type of AA, cannot be kCoverage. */ struct StencilPathArgs { - GrResourceProvider* fResourceProvider; + GrContext* fContext; GrRenderTargetContext* fRenderTargetContext; const GrClip* fClip; const SkMatrix* fViewMatrix; @@ -192,7 +192,7 @@ public: #ifdef SK_DEBUG void validate() const { - SkASSERT(fResourceProvider); + SkASSERT(fContext); SkASSERT(fRenderTargetContext); SkASSERT(fViewMatrix); SkASSERT(fShape); @@ -277,7 +277,7 @@ private: GrPaint paint; - DrawPathArgs drawArgs{args.fResourceProvider, + DrawPathArgs drawArgs{args.fContext, std::move(paint), &kIncrementStencil, args.fRenderTargetContext, diff --git a/src/gpu/GrReducedClip.cpp b/src/gpu/GrReducedClip.cpp index 4dd81c26ce..8105ed46bf 100644 --- a/src/gpu/GrReducedClip.cpp +++ b/src/gpu/GrReducedClip.cpp @@ -781,7 +781,7 @@ bool GrReducedClip::drawStencilClipMask(GrContext* context, GrPaint paint; paint.setXPFactory(GrDisableColorXPFactory::Get()); - GrPathRenderer::DrawPathArgs args{context->resourceProvider(), + GrPathRenderer::DrawPathArgs args{context, std::move(paint), &kDrawToStencil, renderTargetContext, @@ -793,7 +793,7 @@ bool GrReducedClip::drawStencilClipMask(GrContext* context, pr->drawPath(args); } else { GrPathRenderer::StencilPathArgs args; - args.fResourceProvider = context->resourceProvider(); + args.fContext = context; args.fRenderTargetContext = renderTargetContext; args.fClip = &stencilClip.fixedClip(); args.fViewMatrix = &viewMatrix; @@ -816,7 +816,7 @@ bool GrReducedClip::drawStencilClipMask(GrContext* context, GrShape shape(clipPath, GrStyle::SimpleFill()); GrPaint paint; paint.setXPFactory(GrDisableColorXPFactory::Get()); - GrPathRenderer::DrawPathArgs args{context->resourceProvider(), + GrPathRenderer::DrawPathArgs args{context, std::move(paint), *pass, renderTargetContext, diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp index a980818cc1..8b6de51e64 100644 --- a/src/gpu/GrRenderTargetContext.cpp +++ b/src/gpu/GrRenderTargetContext.cpp @@ -1496,7 +1496,7 @@ bool GrRenderTargetContextPriv::drawAndStencilPath(const GrClip& clip, paint.setCoverageSetOpXPFactory(op, invert); GrPathRenderer::DrawPathArgs args{ - fRenderTargetContext->drawingManager()->getContext()->resourceProvider(), + fRenderTargetContext->drawingManager()->getContext(), std::move(paint), ss, fRenderTargetContext, @@ -1593,7 +1593,7 @@ void GrRenderTargetContext::internalDrawPath(const GrClip& clip, return; } - GrPathRenderer::DrawPathArgs args{this->drawingManager()->getContext()->resourceProvider(), + GrPathRenderer::DrawPathArgs args{this->drawingManager()->getContext(), std::move(paint), &GrUserStencilSettings::kUnused, this, diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp index 2dd17b7569..deb400c371 100644 --- a/src/gpu/GrResourceProvider.cpp +++ b/src/gpu/GrResourceProvider.cpp @@ -135,42 +135,6 @@ GrBuffer* GrResourceProvider::createBuffer(size_t size, GrBufferType intendedTyp return buffer; } -std::unique_ptr<GrDrawOpAtlas> GrResourceProvider::makeAtlas(GrContext* context, - GrPixelConfig config, int width, - int height, int numPlotsX, - int numPlotsY, - GrDrawOpAtlas::EvictionFunc func, - void* data) { - GrSurfaceDesc desc; - desc.fFlags = kNone_GrSurfaceFlags; - desc.fWidth = width; - desc.fHeight = height; - desc.fConfig = config; - - // We don't want to flush the context so we claim we're in the middle of flushing so as to - // guarantee we do not recieve a texture with pending IO - // TODO: Determine how to avoid having to do this. (https://bug.skia.org/4156) - static const uint32_t kFlags = GrResourceProvider::kNoPendingIO_Flag; - sk_sp<GrTexture> texture(this->createApproxTexture(desc, kFlags)); - if (!texture) { - return nullptr; - } - // MDB TODO: for now, wrap an instantiated texture. Having the deferred instantiation - // possess the correct properties (e.g., no pendingIO) should fall out of the system but - // should receive special attention. - // Note: When switching over to the deferred proxy, use the kExact flag to create - // the atlas. - sk_sp<GrTextureProxy> proxy = GrSurfaceProxy::MakeWrapped(std::move(texture)); - if (!proxy) { - return nullptr; - } - - std::unique_ptr<GrDrawOpAtlas> atlas( - new GrDrawOpAtlas(context, std::move(proxy), numPlotsX, numPlotsY)); - atlas->registerEvictionCallback(func, data); - return atlas; -} - GrStencilAttachment* GrResourceProvider::attachStencilAttachment(GrRenderTarget* rt) { SkASSERT(rt); if (rt->renderTargetPriv().getStencilAttachment()) { diff --git a/src/gpu/GrResourceProvider.h b/src/gpu/GrResourceProvider.h index 091d2dbf16..c0d1a50230 100644 --- a/src/gpu/GrResourceProvider.h +++ b/src/gpu/GrResourceProvider.h @@ -131,26 +131,6 @@ public: } /** - * Returns a GrDrawOpAtlas. This function can be called anywhere, but the returned atlas - * should only be used inside of GrMeshDrawOp::onPrepareDraws. - * @param GrPixelConfig The pixel config which this atlas will store - * @param width width in pixels of the atlas - * @param height height in pixels of the atlas - * @param numPlotsX The number of plots the atlas should be broken up into in the X - * direction - * @param numPlotsY The number of plots the atlas should be broken up into in the Y - * direction - * @param func An eviction function which will be called whenever the atlas has to - * evict data - * @param data User supplied data which will be passed into func whenver an - * eviction occurs - * @return An initialized GrDrawOpAtlas, or nullptr if creation fails - */ - std::unique_ptr<GrDrawOpAtlas> makeAtlas(GrContext*, GrPixelConfig, int width, int height, - int numPlotsX, int numPlotsY, - GrDrawOpAtlas::EvictionFunc func, void* data); - - /** * If passed in render target already has a stencil buffer, return it. Otherwise attempt to * attach one. */ diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp index 695796b13e..5ed9f42446 100644 --- a/src/gpu/GrSoftwarePathRenderer.cpp +++ b/src/gpu/GrSoftwarePathRenderer.cpp @@ -206,7 +206,7 @@ bool GrSoftwarePathRenderer::onDrawPath(const DrawPathArgs& args) { sk_sp<GrTexture> texture; if (useCache) { - texture.reset(args.fResourceProvider->findAndRefTextureByUniqueKey(maskKey)); + texture.reset(args.fContext->textureProvider()->findAndRefTextureByUniqueKey(maskKey)); } if (!texture) { SkBackingFit fit = useCache ? SkBackingFit::kExact : SkBackingFit::kApprox; diff --git a/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp b/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp index b4c0c526fb..a856ba6f58 100644 --- a/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp +++ b/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp @@ -746,12 +746,12 @@ bool GrAADistanceFieldPathRenderer::onDrawPath(const DrawPathArgs& args) { SkASSERT(!args.fShape->isEmpty()); SkASSERT(args.fShape->hasUnstyledKey()); if (!fAtlas) { - fAtlas = args.fResourceProvider->makeAtlas(args.fResourceProvider->context(), - kAlpha_8_GrPixelConfig, - ATLAS_TEXTURE_WIDTH, ATLAS_TEXTURE_HEIGHT, - NUM_PLOTS_X, NUM_PLOTS_Y, - &GrAADistanceFieldPathRenderer::HandleEviction, - (void*)this); + fAtlas = GrDrawOpAtlas::Make(args.fContext, + kAlpha_8_GrPixelConfig, + ATLAS_TEXTURE_WIDTH, ATLAS_TEXTURE_HEIGHT, + NUM_PLOTS_X, NUM_PLOTS_Y, + &GrAADistanceFieldPathRenderer::HandleEviction, + (void*)this); if (!fAtlas) { return false; } @@ -820,12 +820,11 @@ DRAW_OP_TEST_DEFINE(AADistanceFieldPathOp) { if (context->uniqueID() != gTestStruct.fContextID) { gTestStruct.fContextID = context->uniqueID(); gTestStruct.reset(); - gTestStruct.fAtlas = - context->resourceProvider()->makeAtlas(context, kAlpha_8_GrPixelConfig, - ATLAS_TEXTURE_WIDTH, ATLAS_TEXTURE_HEIGHT, - NUM_PLOTS_X, NUM_PLOTS_Y, - &PathTestStruct::HandleEviction, - (void*)&gTestStruct); + gTestStruct.fAtlas = GrDrawOpAtlas::Make(context, kAlpha_8_GrPixelConfig, + ATLAS_TEXTURE_WIDTH, ATLAS_TEXTURE_HEIGHT, + NUM_PLOTS_X, NUM_PLOTS_Y, + &PathTestStruct::HandleEviction, + (void*)&gTestStruct); } SkMatrix viewMatrix = GrTest::TestMatrix(random); diff --git a/src/gpu/text/GrAtlasGlyphCache.cpp b/src/gpu/text/GrAtlasGlyphCache.cpp index cf56c897d6..213ecfc3da 100644 --- a/src/gpu/text/GrAtlasGlyphCache.cpp +++ b/src/gpu/text/GrAtlasGlyphCache.cpp @@ -26,7 +26,7 @@ bool GrAtlasGlyphCache::initAtlas(GrMaskFormat format) { int numPlotsX = fAtlasConfigs[index].numPlotsX(); int numPlotsY = fAtlasConfigs[index].numPlotsY(); - fAtlases[index] = fContext->resourceProvider()->makeAtlas( + fAtlases[index] = GrDrawOpAtlas::Make( fContext, config, width, height, numPlotsX, numPlotsY, &GrAtlasGlyphCache::HandleEviction, (void*)this); if (!fAtlases[index]) { |