aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGr.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-09-07 12:36:34 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-07 16:58:31 +0000
commit2bbdcc44c63974f29f3743bb58d929601a3f65c6 (patch)
treed420f298f606b061054e56866d1930ab84f00ed5 /src/gpu/SkGr.h
parent4df0092eac6e9bb5afc516773a0c618630193dc6 (diff)
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>
Diffstat (limited to 'src/gpu/SkGr.h')
-rw-r--r--src/gpu/SkGr.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gpu/SkGr.h b/src/gpu/SkGr.h
index d228894bc5..66b625ad09 100644
--- a/src/gpu/SkGr.h
+++ b/src/gpu/SkGr.h
@@ -10,8 +10,9 @@
#include "GrBlend.h"
#include "GrColor.h"
-#include "GrSamplerParams.h"
+#include "GrSamplerState.h"
#include "GrTypes.h"
+#include "SkBlendModePriv.h"
#include "SkCanvas.h"
#include "SkColor.h"
#include "SkColorPriv.h"
@@ -20,7 +21,6 @@
#include "SkMatrix.h"
#include "SkPM4f.h"
#include "SkVertices.h"
-#include "SkBlendModePriv.h"
class GrCaps;
class GrColorSpaceXform;
@@ -156,10 +156,10 @@ GrPixelConfig SkImageInfo2GrPixelConfig(const SkImageInfo& info, const GrCaps& c
bool GrPixelConfigToColorType(GrPixelConfig, SkColorType*);
-GrSamplerParams::FilterMode GrSkFilterQualityToGrFilterMode(SkFilterQuality paintFilterQuality,
- const SkMatrix& viewM,
- const SkMatrix& localM,
- bool* doBicubic);
+GrSamplerState::Filter GrSkFilterQualityToGrFilterMode(SkFilterQuality paintFilterQuality,
+ const SkMatrix& viewM,
+ const SkMatrix& localM,
+ bool* doBicubic);
//////////////////////////////////////////////////////////////////////////////
@@ -195,7 +195,7 @@ GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkBlendModeCoeff::kIDA);
////////////////////////////////////////////////////////////////////////////////
// Texture management
-/** Returns a texture representing the bitmap that is compatible with the GrSamplerParams. The
+/** Returns a texture representing the bitmap that is compatible with the GrSamplerState. The
* texture is inserted into the cache (unless the bitmap is marked volatile) and can be
* retrieved again via this function.
* The 'scaleAdjust' in/out parameter will be updated to hold any rescaling that needs to be
@@ -204,7 +204,7 @@ GR_STATIC_ASSERT((int)kIDA_GrBlendCoeff == (int)SkBlendModeCoeff::kIDA);
*/
sk_sp<GrTextureProxy> GrRefCachedBitmapTextureProxy(GrContext*,
const SkBitmap&,
- const GrSamplerParams&,
+ const GrSamplerState&,
SkScalar scaleAdjust[2]);
/**
@@ -238,7 +238,7 @@ sk_sp<GrTextureProxy> GrUploadMipMapToTextureProxy(GrContext*, const SkImageInfo
// return nullptr;
// }
// sk_sp<GrTexture> texture = GrMakeCachedBitmapTexture(fContext.get(), bitmap,
-// GrSamplerParams::ClampNoFilter(),
+// GrSamplerState::ClampNearest(),
// nullptr);
// if (!texture) {
// return nullptr;