diff options
author | Stan Iliev <stani@google.com> | 2019-08-19 10:48:31 -0400 |
---|---|---|
committer | Stan Iliev <stani@google.com> | 2019-08-27 17:39:33 -0400 |
commit | ff2c36b7dec33755636c8c26654458aedda9ac27 (patch) | |
tree | efac7dd120676035f1446ca043a1ef7bab54fcca /libs/hwui/RecordingCanvas.h | |
parent | 0e2113b5fc62455c579602cd3797712b975e295b (diff) |
Fix VkFunctorDrawable crash
Fix WebView crash, which is specific for Vulkan pipeline
introduced by ag/8550137.
VkFunctorDrawable expects SkDrawable::onSnapGpuDrawHandler
callback instead of SkDrawable::onDraw.
This CL invokes SkCanvas::drawDrawable/SkGpuDevice::drawDrawable,
which has the logic to invoke onSnapGpuDrawHandler.
Test: Don't crash WebView with Vulkan pipeline, pass CTS
Change-Id: Ia98f159511f4ad2dbdbe0d53f0aec2f8c6db263b
Diffstat (limited to 'libs/hwui/RecordingCanvas.h')
-rw-r--r-- | libs/hwui/RecordingCanvas.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/RecordingCanvas.h b/libs/hwui/RecordingCanvas.h index 16ec877002f7..a79b7c00ba04 100644 --- a/libs/hwui/RecordingCanvas.h +++ b/libs/hwui/RecordingCanvas.h @@ -36,6 +36,10 @@ namespace android { namespace uirenderer { +namespace skiapipeline { +class FunctorDrawable; +} + enum class DisplayListOpType : uint8_t { #define X(T) T, #include "DisplayListOps.in" @@ -119,6 +123,7 @@ private: SkBlendMode, const SkRect*, const SkPaint*); void drawShadowRec(const SkPath&, const SkDrawShadowRec&); void drawVectorDrawable(VectorDrawableRoot* tree); + void drawWebView(skiapipeline::FunctorDrawable*); template <typename T, typename... Args> void* push(size_t, Args&&...); @@ -203,6 +208,7 @@ public: void onDrawShadowRec(const SkPath&, const SkDrawShadowRec&) override; void drawVectorDrawable(VectorDrawableRoot* tree); + void drawWebView(skiapipeline::FunctorDrawable*); /** * If "isClipMayBeComplex" returns false, it is guaranteed the current clip is a rectangle. |