Separate Canvas JNI code from the implementation.
This introduces Canvas.h which is a pure virtual interface that
is intended to be used by both Skia and HWUI implementation. To help
stage this transition this CL only introduces the interface and Skia
implementation. The interface is not intended to be final and will
undoubtedly go through iterations in both style and location as we
look to introduce the HWUI implementation.
BUG:15672762
Change-Id: Ibaccdddb87d3b9358f4f0c1d317ead5282d4ee16
diff --git a/core/jni/android/graphics/Picture.h b/core/jni/android/graphics/Picture.h
index abb0403..a2e5d4a 100644
--- a/core/jni/android/graphics/Picture.h
+++ b/core/jni/android/graphics/Picture.h
@@ -22,14 +22,13 @@
#include "SkRefCnt.h"
#include "SkTemplates.h"
-class SkCanvas;
-class SkPicture;
-class SkPictureRecorder;
class SkStream;
class SkWStream;
namespace android {
+class Canvas;
+
// Skia's SkPicture class has been split into an SkPictureRecorder
// and an SkPicture. AndroidPicture recreates the functionality
// of the old SkPicture interface by flip-flopping between the two
@@ -38,7 +37,7 @@
public:
explicit Picture(const Picture* src = NULL);
- SkCanvas* beginRecording(int width, int height);
+ Canvas* beginRecording(int width, int height);
void endRecording();
@@ -50,7 +49,7 @@
void serialize(SkWStream* stream) const;
- void draw(SkCanvas* canvas);
+ void draw(Canvas* canvas);
private:
int mWidth;