Remove atlas creation from GrResourceProvider
This is pulled out of: https://skia-review.googlesource.com/c/6680/ (Make SkImage_Gpu be deferred) and is only tangentially related to the goal of that CL.
Change-Id: I6b6db4869597070f85ab3b9fea178fc88c104f87
Reviewed-on: https://skia-review.googlesource.com/9106
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp
index c523ae8..ad5ef4d 100644
--- a/src/core/SkSpecialImage.cpp
+++ b/src/core/SkSpecialImage.cpp
@@ -196,7 +196,7 @@
GrContext* context = ((SkImage_Gpu*) as_IB(image))->context();
return MakeDeferredFromGpu(context, subset, image->uniqueID(), std::move(proxy),
- sk_ref_sp(as_IB(image)->onImageInfo().colorSpace()), props);
+ as_IB(image)->onImageInfo().refColorSpace(), props);
} else
#endif
{
@@ -479,7 +479,7 @@
if (subset) {
// TODO: if this becomes a bottle neck we could base this logic on what the size
// will be when it is finally instantiated - but that is more fraught.
- if (//fSurfaceProxy->priv().isExact() &&
+ if (fTextureProxy->priv().isExact() &&
0 == subset->fLeft && 0 == subset->fTop &&
fTextureProxy->width() == subset->width() &&
fTextureProxy->height() == subset->height()) {