aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProxyProvider.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-02-08 09:15:33 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-08 15:03:54 +0000
commit7e1912a8ab48134eb3a631f188ad8aa262e8eaa0 (patch)
tree4340aad809ff02d1cacb88b57c9b941611c106a3 /src/gpu/GrProxyProvider.cpp
parentaee01c298519c9d08d7cc13fd7c4264d01f8630e (diff)
Move GrMakeCachedBitmapProxy work in lazy mode
This basically wraps the bitmap in an SkImage and uses the GrMakeCachedImageProxy call to create the proxy. Bug: skia: Change-Id: I648a9cac3a316231bfb1bcedaae2009b7de0356c Reviewed-on: https://skia-review.googlesource.com/105360 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrProxyProvider.cpp')
-rw-r--r--src/gpu/GrProxyProvider.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp
index b73d92446d..0076a1a82d 100644
--- a/src/gpu/GrProxyProvider.cpp
+++ b/src/gpu/GrProxyProvider.cpp
@@ -341,8 +341,8 @@ sk_sp<GrTextureProxy> GrProxyProvider::createMipMapProxyFromBitmap(const SkBitma
// In non-ddl we will always instantiate right away. Thus we never want to copy the SkBitmap
// even if its mutable. In ddl, if the bitmap is mutable then we must make a copy since the
// upload of the data to the gpu can happen at anytime and the bitmap may change by then.
- SkCopyPixelsMode copyMode = fResourceProvider ? kNever_SkCopyPixelsMode
- : kIfMutable_SkCopyPixelsMode;
+ SkCopyPixelsMode copyMode = this->mutableBitmapsNeedCopy() ? kIfMutable_SkCopyPixelsMode
+ : kNever_SkCopyPixelsMode;
sk_sp<SkImage> baseLevel = SkMakeImageFromRasterBitmap(bitmap, copyMode);
if (!baseLevel) {