Lines Matching defs:surface

41 // Draws the image to a surface, does a asyncRescaleAndReadPixels of the image, and then sticks
195 // Turn the image into a surface in order to call the read and rescale API
197 auto surface = canvas->makeSurface(surfInfo);
198 if (!surface && surfInfo.colorType() == kBGRA_8888_SkColorType) {
200 surface = canvas->makeSurface(surfInfo);
202 if (!surface) {
203 *errorMsg = "Could not create surface for image.";
204 // When testing abandoned GrContext we expect surface creation to fail.
212 surface->getCanvas()->drawImage(image, 0, 0, SkSamplingOptions(), &paint);
213 return do_rescale_grid(canvas, surface.get(), dContext, srcRect, newSize,
219 // When testing abandoned GrContext we expect surface creation to fail.
278 // Exercises non-scaling YUV420. Reads from the original canvas's surface in order to
279 // exercise case where source surface is not a texture (in glbert config).
281 auto surface = canvas->getSurface();
282 if (!surface) {
287 auto dContext = GrAsDirectContext(surface->recordingContext());
288 if (!dContext && surface->recordingContext()) {
302 surface, dContext, kRec601_SkYUVColorSpace, SkIRect::MakeWH(400, 300),
329 auto surface = canvas->makeSurface(surfaceII);
330 if (!surface) {
331 *errorMsg = "Could not create surface for image.";
332 // When testing abandoned GrContext we expect surface creation to fail.
338 surface->getCanvas()->clear(SK_ColorRED);
339 surface->getCanvas()->save();
340 surface->getCanvas()->clipRect(SkRect::Make(srcRect), SkClipOp::kIntersect, false);
341 surface->getCanvas()->clear(SK_ColorBLUE);
342 surface->getCanvas()->restore();
347 result = do_rescale_grid(canvas, surface.get(), dContext, srcRect, downSize, false, errorMsg,
355 result = do_rescale_grid(canvas, surface.get(), dContext, srcRect, upSize, false, errorMsg,