aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ops/GrAADistanceFieldPathRenderer.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-03-01 14:32:46 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-02 12:29:16 +0000
commit256c37bc9ea2a0420b8ac1084f6d645aaeb919f0 (patch)
tree27c6ec1766362477c7d50292c6cbc1f54757bdb9 /src/gpu/ops/GrAADistanceFieldPathRenderer.cpp
parent9c10df3b60f4a7d50c1070a5d8c4aaadb79ba9b7 (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/gpu/ops/GrAADistanceFieldPathRenderer.cpp')
-rw-r--r--src/gpu/ops/GrAADistanceFieldPathRenderer.cpp23
1 files changed, 11 insertions, 12 deletions
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);