129 {
130 using namespace skgpu;
131
132 auto direct = ctxInfo.directContext();
135 const GrCaps& caps = *direct->priv().caps();
136
138
139 for (auto widthHeight : {100, 128, 1048576}) {
143 for (auto budgeted : { Budgeted::kYes, Budgeted::kNo }) {
144 for (auto numSamples : {1, 4, 16, 128}) {
145 SkISize dims = {widthHeight, widthHeight};
146
149 continue;
150 }
151
152
153 {
159 GrRenderable::kYes,
160 numSamples,
161 isProtected,
162 {});
163 } else {
167 GrRenderable::kYes,
168 numSamples,
169 Mipmapped::kNo,
170 budgeted,
171 isProtected,
172 {});
173 }
174
177 dims,
178 GrRenderable::kYes,
179 numSamples,
180 Mipmapped::kNo,
181 fit,
182 budgeted,
183 isProtected,
184 {});
186 if (proxy) {
188
189
190
191
192
193 proxy->gpuMemorySize();
194
196 budgeted);
197 int supportedSamples =
200 proxy->asRenderTargetProxy(), supportedSamples,
202 }
203 }
204
205
206 {
212 GrRenderable::kNo,
213 numSamples,
214 isProtected,
215 {});
216 } else {
220 GrRenderable::kNo,
221 numSamples,
222 Mipmapped::kNo,
223 budgeted,
224 isProtected,
225 {});
226 }
227
230 dims,
231 GrRenderable::kNo,
232 numSamples,
233 Mipmapped::kNo,
234 fit,
235 budgeted,
236 isProtected,
237 {}));
239 if (proxy) {
240
241
242
243
244
245 proxy->gpuMemorySize();
246
248 budgeted);
250 fit);
251 }
252 }
253 }
254 }
255 }
256 }
257 }
258}
skgpu::Protected Protected
static void check_surface(skiatest::Reporter *reporter, GrSurfaceProxy *proxy, int width, int height, skgpu::Budgeted budgeted)
static void check_texture(skiatest::Reporter *reporter, GrResourceProvider *provider, GrTextureProxy *texProxy, SkBackingFit fit)
static void check_rendertarget(skiatest::Reporter *reporter, const GrCaps &caps, GrResourceProvider *provider, GrRenderTargetProxy *rtProxy, int numSamples, SkBackingFit fit, int expectedMaxWindowRects)
static constexpr bool SkToBool(const T &x)
bool supportsProtectedContent() const
GrBackendFormat getDefaultBackendFormat(GrColorType, GrRenderable) const
virtual int getRenderTargetSampleCount(int requestedCount, const GrBackendFormat &) const =0
int maxWindowRectangles() const
sk_sp< GrTextureProxy > createProxy(const GrBackendFormat &, SkISize dimensions, GrRenderable, int renderTargetSampleCnt, skgpu::Mipmapped, SkBackingFit, skgpu::Budgeted, GrProtected, std::string_view label, GrInternalSurfaceFlags=GrInternalSurfaceFlags::kNone, UseAllocator useAllocator=UseAllocator::kYes)
sk_sp< GrTexture > createApproxTexture(SkISize dimensions, const GrBackendFormat &format, GrTextureType textureType, skgpu::Renderable renderable, int renderTargetSampleCnt, skgpu::Protected isProtected, std::string_view label)
GrResourceProviderPriv priv()
sk_sp< GrTexture > createTexture(SkISize dimensions, const GrBackendFormat &format, GrTextureType textureType, skgpu::Renderable renderable, int renderTargetSampleCnt, skgpu::Mipmapped mipmapped, skgpu::Budgeted budgeted, skgpu::Protected isProtected, std::string_view label)
uint32_t uint32_t * format