Lines Matching defs:context
205 ERRORF(reporter, "Could not create %s surface context.", encoding_as_str(contextEncoding));
222 ERRORF(reporter, "Could not write %s to %s surface context.",
230 testName.printf("write %s data to a %s context and read as %s.", encoding_as_str(writeEncoding),
236 // Test all combinations of writePixels/readPixels where the surface context/write source/read dst
239 auto context = ctxInfo.directContext();
240 if (!context->priv().caps()->getDefaultBackendFormat(GrColorType::kRGBA_8888_SRGB,
245 float error = context->priv().caps()->shaderCaps()->halfIs32Bits() ? 0.5f : 1.2f;
249 float smallError = context->priv().caps()->shaderCaps()->halfIs32Bits() ? 0.0f : 1.f;
252 // Write sRGB data to a sRGB context - no conversion on the write.
256 check_no_conversion, context, reporter);
259 check_no_conversion, context, reporter);
263 check_srgb_to_linear_conversion, context, reporter);
267 check_no_conversion, context, reporter);
270 // Write linear data to a sRGB context. It gets converted to sRGB on write. The reads
273 check_linear_to_srgb_conversion, context, reporter);
276 check_linear_to_srgb_conversion, context, reporter);
278 check_linear_to_srgb_to_linear_conversion, context, reporter);
281 // Write data to an untagged context. The write does no conversion no matter what encoding the
286 check_no_conversion, context, reporter);
289 check_no_conversion, context, reporter);
290 // Reading untagged back as linear does convert (context is source, so treated as sRGB),
293 check_srgb_to_linear_conversion, context, reporter);
297 // Write sRGB data to a linear context - converts to sRGB on the write.
301 check_srgb_to_linear_to_srgb_conversion, context, reporter);
304 check_srgb_to_linear_conversion, context, reporter);
307 check_srgb_to_linear_conversion, context, reporter);
311 check_srgb_to_linear_to_srgb_conversion, context, reporter);
314 // Write linear data to a linear context. Does no conversion.
318 check_linear_to_srgb_conversion, context, reporter);
321 check_no_conversion, context, reporter);
324 check_no_conversion, context, reporter);