Remove GrBitmapTextureMaker.
Replace with two methods in SkGr.h that make cached/uncached texture
proxies from SkBitmap. Move code that makes a GrFP from the proxy
to SkImage_Raster::asFragmentProcessor.
Bug: skia:11877
Change-Id: I51a0ae687561be9b0e44b98ee50f171e42476d94
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401920
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp
index d477534..22df7e7 100644
--- a/src/gpu/GrSWMaskHelper.cpp
+++ b/src/gpu/GrSWMaskHelper.cpp
@@ -9,12 +9,12 @@
#include "include/gpu/GrRecordingContext.h"
#include "src/core/SkMatrixProvider.h"
-#include "src/gpu/GrBitmapTextureMaker.h"
#include "src/gpu/GrCaps.h"
#include "src/gpu/GrProxyProvider.h"
#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/GrSurfaceContext.h"
#include "src/gpu/GrTextureProxy.h"
+#include "src/gpu/SkGr.h"
#include "src/gpu/geometry/GrStyledShape.h"
/*
@@ -145,7 +145,7 @@
return true;
}
-GrSurfaceProxyView GrSWMaskHelper::toTextureView(GrRecordingContext* context, SkBackingFit fit) {
+GrSurfaceProxyView GrSWMaskHelper::toTextureView(GrRecordingContext* rContext, SkBackingFit fit) {
SkImageInfo ii = SkImageInfo::MakeA8(fPixels->width(), fPixels->height());
size_t rowBytes = fPixels->rowBytes();
@@ -155,6 +155,5 @@
nullptr));
bitmap.setImmutable();
- GrBitmapTextureMaker maker(context, bitmap, fit);
- return maker.view(GrMipmapped::kNo);
+ return std::get<0>(GrMakeUncachedBitmapProxyView(rContext, bitmap, GrMipmapped::kNo, fit));
}