A bunch more cleanups
Switch a few places to using android::canvas
instead of SkCanvas as well which eliminated
some JNI
Change-Id: I8f98b56442a06362b82b984cd1bd3a92398d8dbc
diff --git a/libs/hwui/Canvas.h b/libs/hwui/Canvas.h
index 7ad0683..aa24673 100644
--- a/libs/hwui/Canvas.h
+++ b/libs/hwui/Canvas.h
@@ -29,7 +29,7 @@
public:
virtual ~Canvas() {};
- static Canvas* create_canvas(SkBitmap* bitmap);
+ static Canvas* create_canvas(const SkBitmap& bitmap);
/**
* Create a new Canvas object which delegates to an SkCanvas.
@@ -52,7 +52,7 @@
*/
virtual SkCanvas* asSkCanvas() = 0;
- virtual void setBitmap(SkBitmap* bitmap, bool copyState) = 0;
+ virtual void setBitmap(const SkBitmap& bitmap) = 0;
virtual bool isOpaque() = 0;
virtual int width() = 0;
@@ -87,7 +87,8 @@
virtual bool quickRejectRect(float left, float top, float right, float bottom) const = 0;
virtual bool quickRejectPath(const SkPath& path) const = 0;
- virtual bool clipRect(float left, float top, float right, float bottom, SkRegion::Op op) = 0;
+ virtual bool clipRect(float left, float top, float right, float bottom,
+ SkRegion::Op op = SkRegion::kIntersect_Op) = 0;
virtual bool clipPath(const SkPath* path, SkRegion::Op op) = 0;
virtual bool clipRegion(const SkRegion* region, SkRegion::Op op) = 0;