From be46e24d57537f7ab6854fcd6f6ec07e2c50495c Mon Sep 17 00:00:00 2001 From: Hal Canary Date: Tue, 16 Jan 2018 18:33:07 +0000 Subject: Revert "Move resourceProvider accessor to GrContextPriv" This reverts commit 1f9ed8501b0007846b3032f4bfc38aee98c175a1. Reason for revert: 1. breaking android roll 2. breaking Build-Debian9-Clang-arm-Release-Android_API26 Original change's description: > Move resourceProvider accessor to GrContextPriv > > Change-Id: I5cddd620a7ec4b006b7359864ede58e9d4dd684e > Reviewed-on: https://skia-review.googlesource.com/94340 > Reviewed-by: Brian Salomon > Reviewed-by: Greg Daniel > Commit-Queue: Robert Phillips TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I20b2d267c0925f20453b635663654967199a1197 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/94964 Reviewed-by: Hal Canary Commit-Queue: Hal Canary --- tools/fiddle/fiddle_main.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'tools/fiddle') diff --git a/tools/fiddle/fiddle_main.cpp b/tools/fiddle/fiddle_main.cpp index 4ba84f38ca..b22ec55d03 100644 --- a/tools/fiddle/fiddle_main.cpp +++ b/tools/fiddle/fiddle_main.cpp @@ -124,8 +124,6 @@ static bool setup_backend_objects(GrContext* context, return false; } - auto resourceProvider = context->contextPriv().resourceProvider(); - GrSurfaceDesc backingDesc; backingDesc.fFlags = kNone_GrSurfaceFlags; backingDesc.fOrigin = kTopLeft_GrSurfaceOrigin; @@ -165,9 +163,10 @@ static bool setup_backend_objects(GrContext* context, texels[i].fRowBytes = 0; } - backingTexture = resourceProvider->createTexture(backingDesc, SkBudgeted::kNo, - texels.get(), mipLevelCount, - SkDestinationSurfaceColorMode::kLegacy); + backingTexture = context->resourceProvider()->createTexture( + backingDesc, SkBudgeted::kNo, + texels.get(), mipLevelCount, + SkDestinationSurfaceColorMode::kLegacy); if (!backingTexture) { return false; } @@ -193,7 +192,7 @@ static bool setup_backend_objects(GrContext* context, // We use this fact to initialize it with data but don't allow mipmaps GrMipLevel level0 = { data.get(), backingDesc.fWidth*sizeof(uint32_t) }; - sk_sp tmp = resourceProvider->createTexture( + sk_sp tmp = context->resourceProvider()->createTexture( backingDesc, SkBudgeted::kNo, &level0, 1, SkDestinationSurfaceColorMode::kLegacy); @@ -223,7 +222,7 @@ static bool setup_backend_objects(GrContext* context, texels[i].fRowBytes = 0; } - backingTextureRenderTarget = resourceProvider->createTexture( + backingTextureRenderTarget = context->resourceProvider()->createTexture( backingDesc, SkBudgeted::kNo, texels.get(), mipLevelCount, SkDestinationSurfaceColorMode::kLegacy); -- cgit v1.2.3