#include "include/gpu/GrContext.h" int main() { GrContext context(GrContextOptions()); return 0; }
GrBackendRenderTarget backendRenderTarget(width, height, samples, stencilBits, GrPixelConfig::kRGBA_8888_SRGB); if (!backendRenderTarget.isValid()) { // handle error }This code creates a GrBackendRenderTarget object with the given width, height, samples, stencil bits, and pixel configuration. Library Package: GrContext is a part of the Skia Graphics Library package.