aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-03-20 13:48:41 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-21 19:08:59 +0000
commit42409c2efacd6de4ae504fe8946ff76d6cbeebcc (patch)
treee22f7d1df2379536dc50f451940418d65cdaff49 /src
parenta2513c14c4e143984b2eec07f5263b5cdc6c84bb (diff)
Remove deprecated version of SkImage::MakeFromAdoptedTexture that does not take SkColorType
Bug: skia:6718 Change-Id: Ia2762855078bcbad8faf2f538f0afc64913e5e9b Reviewed-on: https://skia-review.googlesource.com/115364 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/image/SkImage.cpp6
-rw-r--r--src/image/SkImage_Gpu.cpp16
2 files changed, 5 insertions, 17 deletions
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp
index 126470ec4b..40daa6fbc3 100644
--- a/src/image/SkImage.cpp
+++ b/src/image/SkImage.cpp
@@ -363,12 +363,6 @@ bool SkImage::MakeBackendTextureFromSkImage(GrContext*,
sk_sp<SkImage> SkImage::MakeFromAdoptedTexture(GrContext* ctx,
const GrBackendTexture& tex, GrSurfaceOrigin origin,
- SkAlphaType at, sk_sp<SkColorSpace> cs) {
- return nullptr;
-}
-
-sk_sp<SkImage> SkImage::MakeFromAdoptedTexture(GrContext* ctx,
- const GrBackendTexture& tex, GrSurfaceOrigin origin,
SkColorType ct, SkAlphaType at,
sk_sp<SkColorSpace> cs) {
return nullptr;
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index 6342512837..e2b461f801 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -350,24 +350,18 @@ sk_sp<SkImage> SkImage::MakeFromTexture(GrContext* ctx,
sk_sp<SkImage> SkImage::MakeFromAdoptedTexture(GrContext* ctx,
const GrBackendTexture& tex, GrSurfaceOrigin origin,
- SkAlphaType at, sk_sp<SkColorSpace> cs) {
- if (!ctx->contextPriv().resourceProvider()) {
+ SkColorType ct, SkAlphaType at,
+ sk_sp<SkColorSpace> cs) {
+ if (!ctx || !ctx->contextPriv().resourceProvider()) {
// We have a DDL context and we don't support adopted textures for them.
return nullptr;
}
- return new_wrapped_texture_common(ctx, tex, origin, at, std::move(cs), kAdopt_GrWrapOwnership,
- nullptr, nullptr);
-}
-
-sk_sp<SkImage> SkImage::MakeFromAdoptedTexture(GrContext* ctx,
- const GrBackendTexture& tex, GrSurfaceOrigin origin,
- SkColorType ct, SkAlphaType at,
- sk_sp<SkColorSpace> cs) {
GrBackendTexture texCopy = tex;
if (!validate_backend_texture(ctx, texCopy, &texCopy.fConfig, ct, at, cs)) {
return nullptr;
}
- return MakeFromAdoptedTexture(ctx, texCopy, origin, at, cs);
+ return new_wrapped_texture_common(ctx, texCopy, origin, at, std::move(cs),
+ kAdopt_GrWrapOwnership, nullptr, nullptr);
}
sk_sp<SkImage> SkImage_Gpu::MakeFromYUVTexturesCopyImpl(