Fix bug, change crashes to warnings
Improve behavior when we get a call to draw 0 points.
Replace one ALWAYS_FATAL statements with noop.
Change-Id: I864b7a9633dfa3dc6eefa403beca4cc7ae14074f
diff --git a/libs/hwui/SkiaCanvasProxy.h b/libs/hwui/SkiaCanvasProxy.h
index 4322fcf..0de9650 100644
--- a/libs/hwui/SkiaCanvasProxy.h
+++ b/libs/hwui/SkiaCanvasProxy.h
@@ -27,16 +27,19 @@
/**
* This class serves as a proxy between Skia's SkCanvas and Android Framework's
- * Canvas. The class does not maintain any state and will pass through any request
- * directly to the Canvas provided in the constructor.
+ * Canvas. The class does not maintain any draw-related state and will pass
+ * through most requests directly to the Canvas provided in the constructor.
*
* Upon construction it is expected that the provided Canvas has already been
* prepared for recording and will continue to be in the recording state while
* this proxy class is being used.
+ *
+ * If filterHwuiCalls is true, the proxy silently ignores away draw calls that
+ * aren't supported by HWUI.
*/
class ANDROID_API SkiaCanvasProxy : public SkCanvas {
public:
- SkiaCanvasProxy(Canvas* canvas);
+ SkiaCanvasProxy(Canvas* canvas, bool filterHwuiCalls = false);
virtual ~SkiaCanvasProxy() {}
protected:
@@ -94,6 +97,7 @@
private:
Canvas* mCanvas;
+ bool mFilterHwuiCalls;
typedef SkCanvas INHERITED;
};