Home
last modified time | relevance | path

Searched refs:GrSamplerState (Results 1 – 25 of 215) sorted by relevance

123456789

/external/skqp/include/gpu/
DGrSamplerState.h16 class GrSamplerState {
21 static constexpr GrSamplerState ClampNearest() { return GrSamplerState(); } in ClampNearest()
22 static constexpr GrSamplerState ClampBilerp() { in ClampBilerp()
23 return GrSamplerState(WrapMode::kClamp, Filter::kBilerp); in ClampBilerp()
26 constexpr GrSamplerState() : GrSamplerState(WrapMode::kClamp, Filter::kNearest) {} in GrSamplerState() function
28 constexpr GrSamplerState(WrapMode wrapXAndY, Filter filter) in GrSamplerState() function
31 constexpr GrSamplerState(const WrapMode wrapModes[2], Filter filter) in GrSamplerState() function
34 constexpr GrSamplerState(const GrSamplerState&) = default;
36 GrSamplerState& operator=(const GrSamplerState& that) {
58 bool operator==(const GrSamplerState& that) const {
[all …]
/external/skqp/src/gpu/effects/
DGrSimpleTextureEffect.fp12 GrSamplerState samplerParams
28GrSamplerState(GrSamplerState::WrapMode::kClamp, GrSamplerState::Filter::kNearest)));
34 GrSamplerState::Filter filter) {
37 GrSamplerState(GrSamplerState::WrapMode::kClamp, filter)));
42 const GrSamplerState& p) {
50 samplerParams.wrapModeX() == GrSamplerState::WrapMode::kClampToBorder ||
51 samplerParams.wrapModeY() == GrSamplerState::WrapMode::kClampToBorder)
61 GrSamplerState::WrapMode wrapModes[2];
66 wrapModes[0] = GrSamplerState::WrapMode::kClamp;
67 wrapModes[1] = GrSamplerState::WrapMode::kClamp;
[all …]
DGrSimpleTextureEffect.h24 GrSamplerState(GrSamplerState::WrapMode::kClamp, in Make()
25 GrSamplerState::Filter::kNearest))); in Make()
31 GrSamplerState::Filter filter) { in Make()
34 GrSamplerState(GrSamplerState::WrapMode::kClamp, filter))); in Make()
39 const GrSamplerState& p) { in Make()
49 GrSamplerState samplerParams) in GrSimpleTextureEffect()
54 GrSamplerState::WrapMode::kClampToBorder || in GrSimpleTextureEffect()
56 GrSamplerState::WrapMode::kClampToBorder)) in GrSimpleTextureEffect()
DGrBicubicEffect.cpp122 const GrSamplerState::WrapMode wrapModes[2], in GrBicubicEffect()
133 GrSamplerState(wrapModes, GrSamplerState::Filter::kNearest)) {
146 SkASSERT(fTextureSampler.samplerState().wrapModeX() == GrSamplerState::WrapMode::kClamp && in GrBicubicEffect()
147 fTextureSampler.samplerState().wrapModeY() == GrSamplerState::WrapMode::kClamp); in GrBicubicEffect()
181 static const GrSamplerState::WrapMode kClampClamp[] = {GrSamplerState::WrapMode::kClamp, in TestCreate()
182 GrSamplerState::WrapMode::kClamp}; in TestCreate()
189 bool GrBicubicEffect::ShouldUseBicubic(const SkMatrix& matrix, GrSamplerState::Filter* filterMode) { in ShouldUseBicubic()
191 *filterMode = GrSamplerState::Filter::kNearest; in ShouldUseBicubic()
199 *filterMode = GrSamplerState::Filter::kMipMap; in ShouldUseBicubic()
206 *filterMode = GrSamplerState::Filter::kNearest; in ShouldUseBicubic()
[all …]
DGrSimpleTextureEffect.cpp72 GrSamplerState::WrapMode wrapModes[2]; in TestCreate()
77 wrapModes[0] = GrSamplerState::WrapMode::kClamp; in TestCreate()
78 wrapModes[1] = GrSamplerState::WrapMode::kClamp; in TestCreate()
81 GrSamplerState params(wrapModes, testData->fRandom->nextBool() in TestCreate()
82 ? GrSamplerState::Filter::kBilerp in TestCreate()
83 : GrSamplerState::Filter::kNearest); in TestCreate()
DGrTextureDomain.h84 static bool IsDecalSampled(GrSamplerState::WrapMode wrapX, GrSamplerState::WrapMode wrapY, in IsDecalSampled()
86 return wrapX == GrSamplerState::WrapMode::kClampToBorder || in IsDecalSampled()
87 wrapY == GrSamplerState::WrapMode::kClampToBorder || in IsDecalSampled()
92 static bool IsDecalSampled(const GrSamplerState::WrapMode wraps[2], Mode modeX, Mode modeY) { in IsDecalSampled()
96 static bool IsDecalSampled(const GrSamplerState& sampler, Mode modeX, Mode modeY) { in IsDecalSampled()
147 const GrSamplerState& sampler);
194 GrSamplerState::Filter filterMode);
201 const GrSamplerState& sampler);
230 const GrSamplerState&);
DGrDistanceFieldGeoProc.h63 const GrSamplerState& params, float lum, uint32_t flags, in Make()
72 const GrSamplerState& params, uint32_t flags, in Make()
93 void addNewProxies(const sk_sp<GrTextureProxy>* proxies, int numProxies, const GrSamplerState&);
103 const GrSamplerState& params,
143 const GrSamplerState& params, uint32_t flags) { in Make()
160 void addNewProxies(const sk_sp<GrTextureProxy>*, int numActiveProxies, const GrSamplerState&);
172 const GrSamplerState&, uint32_t flags);
217 const GrSamplerState& params, in Make()
238 void addNewProxies(const sk_sp<GrTextureProxy>*, int numActiveProxies, const GrSamplerState&);
246 int numActiveProxies, const GrSamplerState& params,
/external/skia/src/gpu/
DGrSamplerState.h18 class GrSamplerState {
34 constexpr GrSamplerState() = default;
36 constexpr GrSamplerState(WrapMode wrapXAndY, Filter filter, MipmapMode mm = MipmapMode::kNone)
39 constexpr GrSamplerState(WrapMode wrapX,
45 constexpr GrSamplerState(const WrapMode wrapModes[2],
50 constexpr /*explicit*/ GrSamplerState(Filter filter) : fFilter(filter) {} in GrSamplerState() function
51 constexpr GrSamplerState(Filter filter, MipmapMode mm) : fFilter(filter), fMipmapMode(mm) {} in GrSamplerState() function
53 constexpr GrSamplerState(const GrSamplerState&) = default;
55 constexpr GrSamplerState& operator=(const GrSamplerState&) = default;
89 constexpr bool operator==(GrSamplerState that) const {
[all …]
DGrGeometryProcessor.cpp51 static inline GrSamplerState::Filter clamp_filter(GrTextureType type, in clamp_filter()
52 GrSamplerState::Filter requestedFilter) { in clamp_filter()
54 return std::min(requestedFilter, GrSamplerState::Filter::kLinear); in clamp_filter()
59 GrGeometryProcessor::TextureSampler::TextureSampler(GrSamplerState samplerState, in TextureSampler()
65 void GrGeometryProcessor::TextureSampler::reset(GrSamplerState samplerState, in reset()
/external/skqp/src/gpu/
DGrTextureProducer.cpp35 if (copyParams.fFilter != GrSamplerState::Filter::kNearest) { in CopyOnGpu()
41 if (copyParams.fFilter == GrSamplerState::Filter::kNearest && !needsDomain && !resizing && in CopyOnGpu()
68 SkASSERT(copyParams.fFilter != GrSamplerState::Filter::kMipMap); in CopyOnGpu()
73 GrSamplerState samplerState(GrSamplerState::WrapMode::kClamp, copyParams.fFilter); in CopyOnGpu()
100 const GrSamplerState::Filter* filterModeOrNullForBicubic, in DetermineDomainMode()
126 case GrSamplerState::Filter::kNearest: in DetermineDomainMode()
133 case GrSamplerState::Filter::kBilerp: in DetermineDomainMode()
136 case GrSamplerState::Filter::kMipMap: in DetermineDomainMode()
203 const GrSamplerState::Filter* filterOrNullForBicubic) { in CreateFragmentProcessorForDomainAndFilter()
211 GrSamplerState samplerState(GrSamplerState::WrapMode::kClamp, *filterOrNullForBicubic); in CreateFragmentProcessorForDomainAndFilter()
[all …]
DGrPrimitiveProcessor.cpp48 static inline GrSamplerState::Filter clamp_filter(GrTextureType type, in clamp_filter()
49 GrSamplerState::Filter requestedFilter) { in clamp_filter()
51 return SkTMin(requestedFilter, GrSamplerState::Filter::kBilerp); in clamp_filter()
58 const GrSamplerState& samplerState, in TextureSampler()
65 GrSamplerState::Filter filterMode, in TextureSampler()
66 GrSamplerState::WrapMode wrapXAndY) { in TextureSampler()
72 const GrSamplerState& samplerState, in reset()
85 GrSamplerState::Filter filterMode, in reset()
86 GrSamplerState::WrapMode wrapXAndY) { in reset()
89 fSamplerState = GrSamplerState(wrapXAndY, filterMode); in reset()
DGrTextureProducer.h35 GrSamplerState::Filter fFilter;
70 const GrSamplerState::Filter* filterOrNullForBicubic) = 0;
85 sk_sp<GrTextureProxy> refTextureProxyForParams(const GrSamplerState&,
88 sk_sp<GrTextureProxy> refTextureProxyForParams(GrSamplerState::Filter filter, in refTextureProxyForParams()
91 GrSamplerState(GrSamplerState::WrapMode::kClamp, filter), scaleAdjust); in refTextureProxyForParams()
168 const GrSamplerState::Filter* filterModeOrNullForBicubic,
176 const GrSamplerState::Filter* filterOrNullForBicubic);
181 virtual sk_sp<GrTextureProxy> onRefTextureProxyForParams(const GrSamplerState&,
DGrTextureMaker.cpp16 sk_sp<GrTextureProxy> GrTextureMaker::onRefTextureProxyForParams(const GrSamplerState& params, in onRefTextureProxyForParams()
111 const GrSamplerState::Filter* filterOrNullForBicubic) { in createFragmentProcessor()
112 const GrSamplerState::Filter* fmForDetermineDomain = filterOrNullForBicubic; in createFragmentProcessor()
113 if (filterOrNullForBicubic && GrSamplerState::Filter::kMipMap == *filterOrNullForBicubic && in createFragmentProcessor()
120 static const GrSamplerState::Filter kBilerp = GrSamplerState::Filter::kBilerp; in createFragmentProcessor()
124 GrSamplerState samplerState; in createFragmentProcessor()
126 samplerState = GrSamplerState(GrSamplerState::WrapMode::kClamp, *filterOrNullForBicubic); in createFragmentProcessor()
129 samplerState = GrSamplerState::ClampNearest(); in createFragmentProcessor()
DGrFragmentProcessor.h413 TextureSampler(sk_sp<GrTextureProxy>, const GrSamplerState&);
416 GrSamplerState::Filter = GrSamplerState::Filter::kNearest,
417 GrSamplerState::WrapMode wrapXAndY = GrSamplerState::WrapMode::kClamp);
421 void reset(sk_sp<GrTextureProxy>, const GrSamplerState&);
423 GrSamplerState::Filter = GrSamplerState::Filter::kNearest,
424 GrSamplerState::WrapMode wrapXAndY = GrSamplerState::WrapMode::kClamp);
445 const GrSamplerState& samplerState() const { return fSamplerState; } in samplerState()
455 GrSamplerState fSamplerState;
DGrPrimitiveProcessor.h258 TextureSampler(GrTextureType, GrPixelConfig, const GrSamplerState&, uint32_t extraSamplerKey);
261 GrSamplerState::Filter = GrSamplerState::Filter::kNearest,
262 GrSamplerState::WrapMode wrapXAndY = GrSamplerState::WrapMode::kClamp);
267 void reset(GrTextureType, GrPixelConfig, const GrSamplerState&, uint32_t extraSamplerKey = 0);
269 GrSamplerState::Filter,
270 GrSamplerState::WrapMode wrapXAndY);
275 const GrSamplerState& samplerState() const { return fSamplerState; } in samplerState()
282 GrSamplerState fSamplerState;
/external/skia/src/gpu/effects/
DGrTextureEffect.h26 GrSamplerState::Filter = GrSamplerState::Filter::kNearest,
27 GrSamplerState::MipmapMode mipmapMode = GrSamplerState::MipmapMode::kNone);
34 const SkMatrix&, GrSamplerState,
53 GrSamplerState,
68 GrSamplerState,
88 GrSamplerState::WrapMode wx,
89 GrSamplerState::WrapMode wy,
100 GrSamplerState samplerState() const { return fSamplerState; } in samplerState()
147 static ShaderMode GetShaderMode(GrSamplerState::WrapMode,
148 GrSamplerState::Filter,
[all …]
DGrBicubicEffect.h55 const GrSamplerState::WrapMode wrapX,
56 const GrSamplerState::WrapMode wrapY,
68 const GrSamplerState::WrapMode wrapX,
69 const GrSamplerState::WrapMode wrapY,
82 const GrSamplerState::WrapMode wrapX,
83 const GrSamplerState::WrapMode wrapY,
DGrDistanceFieldGeoProc.h65 GrSamplerState params, in Make()
79 GrSamplerState params, in Make()
103 void addNewViews(const GrSurfaceProxyView* views, int numViews, GrSamplerState);
113 GrSamplerState params,
152 GrSamplerState params, uint32_t flags) { in Make()
170 void addNewViews(const GrSurfaceProxyView*, int numActiveViews, GrSamplerState);
182 GrSamplerState,
229 GrSamplerState params, in Make()
252 void addNewViews(const GrSurfaceProxyView*, int numActiveViews, GrSamplerState);
260 int numActiveViews, GrSamplerState params, DistanceAdjust wa,
/external/skia/src/gpu/mtl/
DGrMtlSampler.mm19 GrSamplerState::WrapMode wrapMode, const GrCaps& caps) {
21 case GrSamplerState::WrapMode::kClamp:
23 case GrSamplerState::WrapMode::kRepeat:
25 case GrSamplerState::WrapMode::kMirrorRepeat:
27 case GrSamplerState::WrapMode::kClampToBorder:
45 GrMtlSampler* GrMtlSampler::Create(const GrMtlGpu* gpu, GrSamplerState samplerState) {
48 case GrSamplerState::Filter::kNearest: return MTLSamplerMinMagFilterNearest;
49 case GrSamplerState::Filter::kLinear: return MTLSamplerMinMagFilterLinear;
56 case GrSamplerState::MipmapMode::kNone: return MTLSamplerMipFilterNotMipmapped;
57 case GrSamplerState::MipmapMode::kNearest: return MTLSamplerMipFilterNearest;
[all …]
/external/skia/src/gpu/vk/
DGrVkSampler.cpp13 static VkSamplerAddressMode wrap_mode_to_vk_sampler_address(GrSamplerState::WrapMode wrapMode) { in wrap_mode_to_vk_sampler_address()
15 case GrSamplerState::WrapMode::kClamp: in wrap_mode_to_vk_sampler_address()
17 case GrSamplerState::WrapMode::kRepeat: in wrap_mode_to_vk_sampler_address()
19 case GrSamplerState::WrapMode::kMirrorRepeat: in wrap_mode_to_vk_sampler_address()
21 case GrSamplerState::WrapMode::kClampToBorder: in wrap_mode_to_vk_sampler_address()
27 static VkSamplerMipmapMode mipmap_mode_to_vk_sampler_mipmap_mode(GrSamplerState::MipmapMode mm) { in mipmap_mode_to_vk_sampler_mipmap_mode()
32 case GrSamplerState::MipmapMode::kNone: return VK_SAMPLER_MIPMAP_MODE_LINEAR; in mipmap_mode_to_vk_sampler_mipmap_mode()
33 case GrSamplerState::MipmapMode::kNearest: return VK_SAMPLER_MIPMAP_MODE_NEAREST; in mipmap_mode_to_vk_sampler_mipmap_mode()
34 case GrSamplerState::MipmapMode::kLinear: return VK_SAMPLER_MIPMAP_MODE_LINEAR; in mipmap_mode_to_vk_sampler_mipmap_mode()
39 GrVkSampler* GrVkSampler::Create(GrVkGpu* gpu, GrSamplerState samplerState, in Create()
[all …]
/external/skqp/src/gpu/mtl/
DGrMtlSampler.mm13 GrSamplerState::WrapMode wrapMode, const GrCaps& caps) {
15 case GrSamplerState::WrapMode::kClamp:
17 case GrSamplerState::WrapMode::kRepeat:
19 case GrSamplerState::WrapMode::kMirrorRepeat:
21 case GrSamplerState::WrapMode::kClampToBorder:
36 GrMtlSampler* GrMtlSampler::Create(const GrMtlGpu* gpu, const GrSamplerState& samplerState,
44 GR_STATIC_ASSERT((int)GrSamplerState::Filter::kNearest == 0);
45 GR_STATIC_ASSERT((int)GrSamplerState::Filter::kBilerp == 1);
46 GR_STATIC_ASSERT((int)GrSamplerState::Filter::kMipMap == 2);
58 bool useMipMaps = GrSamplerState::Filter::kMipMap == samplerState.filter() && maxMipLevel > 0;
/external/skia/src/gpu/d3d/
DGrD3DResourceProvider.cpp124 static D3D12_TEXTURE_ADDRESS_MODE wrap_mode_to_d3d_address_mode(GrSamplerState::WrapMode wrapMode) { in wrap_mode_to_d3d_address_mode()
126 case GrSamplerState::WrapMode::kClamp: in wrap_mode_to_d3d_address_mode()
128 case GrSamplerState::WrapMode::kRepeat: in wrap_mode_to_d3d_address_mode()
130 case GrSamplerState::WrapMode::kMirrorRepeat: in wrap_mode_to_d3d_address_mode()
132 case GrSamplerState::WrapMode::kClampToBorder: in wrap_mode_to_d3d_address_mode()
138 static D3D12_FILTER d3d_filter(GrSamplerState sampler) { in d3d_filter()
141 case GrSamplerState::MipmapMode::kNone: in d3d_filter()
142 case GrSamplerState::MipmapMode::kNearest: in d3d_filter()
144 case GrSamplerState::Filter::kNearest: return D3D12_FILTER_MIN_MAG_MIP_POINT; in d3d_filter()
145 case GrSamplerState::Filter::kLinear: return D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT; in d3d_filter()
[all …]
/external/skqp/src/gpu/vk/
DGrVkSampler.cpp14 GrSamplerState::WrapMode wrapMode) { in wrap_mode_to_vk_sampler_address()
16 case GrSamplerState::WrapMode::kClamp: in wrap_mode_to_vk_sampler_address()
18 case GrSamplerState::WrapMode::kRepeat: in wrap_mode_to_vk_sampler_address()
20 case GrSamplerState::WrapMode::kMirrorRepeat: in wrap_mode_to_vk_sampler_address()
22 case GrSamplerState::WrapMode::kClampToBorder: in wrap_mode_to_vk_sampler_address()
29 GrVkSampler* GrVkSampler::Create(GrVkGpu* gpu, const GrSamplerState& samplerState, in Create()
64 bool useMipMaps = GrSamplerState::Filter::kMipMap == samplerState.filter(); in Create()
129 GrVkSampler::Key GrVkSampler::GenerateKey(const GrSamplerState& samplerState, in GenerateKey()
/external/skia/src/gpu/ops/
DGrTextureOp.cpp131 static SkRect normalize_and_inset_subset(GrSamplerState::Filter filter, in normalize_and_inset_subset()
144 if (filter == GrSamplerState::Filter::kNearest) { in normalize_and_inset_subset()
192 static bool safe_to_ignore_subset_rect(GrAAType aaType, GrSamplerState::Filter filter, in safe_to_ignore_subset_rect()
200 filter == GrSamplerState::Filter::kNearest && in safe_to_ignore_subset_rect()
227 GrSamplerState::Filter filter, in Make()
228 GrSamplerState::MipmapMode mm, in Make()
243 GrSamplerState::Filter filter, in Make()
244 GrSamplerState::MipmapMode mm, in Make()
267 bool mipped = (fMetadata.mipmapMode() != GrSamplerState::MipmapMode::kNone); in visitProxies()
347 GrSamplerState::Filter filter, in Metadata()
[all …]
/external/skqp/gm/
Dtexturedomaineffect.cpp30 TextureDomainEffect(GrSamplerState::Filter filter) in TextureDomainEffect()
38 if (fFilter == GrSamplerState::Filter::kBilerp) { in onShortName()
40 } else if (fFilter == GrSamplerState::Filter::kMipMap) { in onShortName()
100 if (fFilter == GrSamplerState::Filter::kMipMap) { in onDraw()
136 if (fFilter != GrSamplerState::Filter::kNearest && in onDraw()
170 GrSamplerState::Filter fFilter;
175 DEF_GM(return new TextureDomainEffect(GrSamplerState::Filter::kNearest);)
176 DEF_GM(return new TextureDomainEffect(GrSamplerState::Filter::kBilerp);)
177 DEF_GM(return new TextureDomainEffect(GrSamplerState::Filter::kMipMap);)

123456789