Rework GrSamplerParams to be more compact and use its own wrap mode enum.
The main change is to make GrSamplerParams smaller by making its enums have byte-sized underlying types. The rest is cosmetic.
Change-Id: Ib71ea50612d24619a85e463826c6b8dfb9b445e3
Reviewed-on: https://skia-review.googlesource.com/43200
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/image/SkImage_Lazy.cpp b/src/image/SkImage_Lazy.cpp
index 14c8e19..41be5bf 100644
--- a/src/image/SkImage_Lazy.cpp
+++ b/src/image/SkImage_Lazy.cpp
@@ -24,7 +24,7 @@
#include "GrImageTextureMaker.h"
#include "GrResourceKey.h"
#include "GrResourceProvider.h"
-#include "GrSamplerParams.h"
+#include "GrSamplerState.h"
#include "GrYUVProvider.h"
#include "SkGr.h"
#endif
@@ -78,8 +78,9 @@
bool onReadPixels(const SkImageInfo&, void*, size_t, int srcX, int srcY,
CachingHint) const override;
#if SK_SUPPORT_GPU
- sk_sp<GrTextureProxy> asTextureProxyRef(GrContext*, const GrSamplerParams&,
- SkColorSpace*, sk_sp<SkColorSpace>*,
+ sk_sp<GrTextureProxy> asTextureProxyRef(GrContext*,
+ const GrSamplerState&, SkColorSpace*,
+ sk_sp<SkColorSpace>*,
SkScalar scaleAdjust[2]) const override;
#endif
SkData* onRefEncoded() const override;
@@ -613,7 +614,7 @@
#if SK_SUPPORT_GPU
sk_sp<GrTextureProxy> SkImage_Lazy::asTextureProxyRef(GrContext* context,
- const GrSamplerParams& params,
+ const GrSamplerState& params,
SkColorSpace* dstColorSpace,
sk_sp<SkColorSpace>* texColorSpace,
SkScalar scaleAdjust[2]) const {