25 const std::shared_ptr<impeller::Context>& context,
26 bool render_to_surface =
true);
32 bool IsValid()
override;
39 std::shared_ptr<impeller::Renderer> impeller_renderer_;
40 std::shared_ptr<impeller::AiksContext> aiks_context_;
46 bool render_to_surface_ =
true;
47 bool disable_partial_repaint_ =
false;
50 std::shared_ptr<std::map<uintptr_t, SkIRect>> damage_ =
51 std::make_shared<std::map<uintptr_t, SkIRect>>();
54 std::unique_ptr<SurfaceFrame> AcquireFrame(
55 const SkISize& frame_size)
override;
57 std::unique_ptr<SurfaceFrame> AcquireFrameFromCAMetalLayer(
60 std::unique_ptr<SurfaceFrame> AcquireFrameFromMTLTexture(
64 SkMatrix GetRootTransformation()
const override;
70 std::unique_ptr<GLContextResult> MakeRenderContextCurrent()
override;
73 bool AllowsDrawingWhenGpuDisabled()
const override;
76 bool EnableRasterCache()
const override;
79 std::shared_ptr<impeller::AiksContext> GetAiksContext()
const override;
#define IMPELLER_CA_METAL_LAYER_AVAILABLE