diff options
author | 2018-03-06 08:20:37 -0500 | |
---|---|---|
committer | 2018-03-06 14:23:45 +0000 | |
commit | 0c4b7b1f2f1dd37204d401a6993119e5431942a6 (patch) | |
tree | af37ee06f3a29a0aeeba00f8bbcf67fbfd0bbea4 /src/image | |
parent | 2f8622029d265e79eb11df8eb06a29ff3faa7ac0 (diff) |
Move internal calls from GrContext to GrContextPriv
A mechanical bulk move just to get these out of the public API.
TBR=bsalomon@google.com
Change-Id: I813efbd54a09dd448275697c0e50947753a5cfd3
Reviewed-on: https://skia-review.googlesource.com/112262
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/image')
-rw-r--r-- | src/image/SkImage.cpp | 2 | ||||
-rw-r--r-- | src/image/SkImage_Gpu.cpp | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp index 2337a36882..7b90d6e7ed 100644 --- a/src/image/SkImage.cpp +++ b/src/image/SkImage.cpp @@ -164,7 +164,7 @@ GrBackendObject SkImage::getTextureHandle(bool flushPendingGrContextIO, } bool SkImage::isValid(GrContext* context) const { - if (context && context->abandoned()) { + if (context && context->contextPriv().abandoned()) { return false; } return as_IB(this)->onIsValid(context); diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp index 1ce53c6c7f..0ba3f03d37 100644 --- a/src/image/SkImage_Gpu.cpp +++ b/src/image/SkImage_Gpu.cpp @@ -441,9 +441,10 @@ static sk_sp<SkImage> make_from_yuv_textures_copy(GrContext* ctx, SkYUVColorSpac const int height = yuvSizes[0].fHeight; // Needs to be a render target in order to draw to it for the yuv->rgb conversion. - sk_sp<GrRenderTargetContext> renderTargetContext(ctx->makeDeferredRenderTargetContext( - SkBackingFit::kExact, width, height, kRGBA_8888_GrPixelConfig, - std::move(imageColorSpace), 1, GrMipMapped::kNo, origin)); + sk_sp<GrRenderTargetContext> renderTargetContext( + ctx->contextPriv().makeDeferredRenderTargetContext( + SkBackingFit::kExact, width, height, kRGBA_8888_GrPixelConfig, + std::move(imageColorSpace), 1, GrMipMapped::kNo, origin)); if (!renderTargetContext) { return nullptr; } @@ -766,8 +767,10 @@ sk_sp<SkImage> SkImage_Gpu::onMakeColorSpace(sk_sp<SkColorSpace> target, SkColor return sk_ref_sp(const_cast<SkImage_Gpu*>(this)); } - sk_sp<GrRenderTargetContext> renderTargetContext(fContext->makeDeferredRenderTargetContext( - SkBackingFit::kExact, this->width(), this->height(), kRGBA_8888_GrPixelConfig, nullptr)); + sk_sp<GrRenderTargetContext> renderTargetContext( + fContext->contextPriv().makeDeferredRenderTargetContext( + SkBackingFit::kExact, this->width(), this->height(), + kRGBA_8888_GrPixelConfig, nullptr)); if (!renderTargetContext) { return nullptr; } @@ -794,7 +797,7 @@ sk_sp<SkImage> SkImage_Gpu::onMakeColorSpace(sk_sp<SkColorSpace> target, SkColor bool SkImage_Gpu::onIsValid(GrContext* context) const { // The base class has already checked that context isn't abandoned (if it's not nullptr) - if (fContext->abandoned()) { + if (fContext->contextPriv().abandoned()) { return false; } |