aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGr.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-02-09 16:40:32 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-12 14:33:12 +0000
commitbc54fadf610b8d17165735d55de431a47fde9349 (patch)
tree885cda4ded3074ebe54fb6183ecf1414bcca34fc /src/gpu/SkGr.cpp
parentda2b4f2796330f5c9cce2cbf1f5238c1a1d5ecec (diff)
Refactor GrUploadPixmap logic into MakeCrossContextFromPixmap
MakeCrossContextPixmap was the only place we were using the helper in SkGr, so this just shifts the logic into MakeCrosscontextFromPixmap. Bug: skia: Change-Id: I90126227ebacf889f9899ef7af9608a5664c582d Reviewed-on: https://skia-review.googlesource.com/106280 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/SkGr.cpp')
-rw-r--r--src/gpu/SkGr.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index 6359693f6d..32907ae274 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -94,24 +94,6 @@ sk_sp<GrTextureProxy> GrUploadBitmapToTextureProxy(GrProxyProvider* proxyProvide
SkBackingFit::kExact);
}
-sk_sp<GrTextureProxy> GrUploadPixmapToTextureProxy(GrProxyProvider* proxyProvider,
- const SkPixmap& pixmap,
- SkBudgeted budgeted,
- SkColorSpace* dstColorSpace) {
- SkDestinationSurfaceColorMode colorMode = dstColorSpace
- ? SkDestinationSurfaceColorMode::kGammaAndColorSpaceAware
- : SkDestinationSurfaceColorMode::kLegacy;
-
- if (!SkImageInfoIsValid(pixmap.info(), colorMode)) {
- return nullptr;
- }
-
- ATRACE_ANDROID_FRAMEWORK("Upload Texture [%ux%u]", pixmap.width(), pixmap.height());
- GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(pixmap.info(), *proxyProvider->caps());
-
- return proxyProvider->createTextureProxy(desc, budgeted, pixmap.addr(), pixmap.rowBytes());
-}
-
////////////////////////////////////////////////////////////////////////////////
void GrInstallBitmapUniqueKeyInvalidator(const GrUniqueKey& key, SkPixelRef* pixelRef) {